| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
With this entry the /dev/disk/by-usage/rootfs0 and /dev/disk/by-usage/rootfs1
device links are created, that are required to install RAUC updates on this
board.
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Link: https://lore.pengutronix.de/20240129093259.172908-2-l.goehrs@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a state partition to the genimage configuration (offset is not
needed for the root partition since genimage can calculate that based
on the size of the previous partition and the alignment; and the
barebox-state partition is autodetected based on the partition GUID)
* Add a device tree fragment to barebox containing the state backend
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Map boot device (SD card) in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231104003525.1673736-4-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that all our images have a GPT header which contains partitions
with the labels "root-A", "root-B", and "data", we can use those to
generate the symlinks in /dev/disk/by-usage/ instead of using the
hardcoded, number-based kernel device names. This gives us the
flexibility to change the order of the partitions on disk as long as
their GPT partition labels stay the same.
Since the symlinks in /dev/disk/by-partlabel/ are not necessarily unique
(see [1]), we cannot use these here. Instead, rework the current match
clauses to determine the devpath of the boot device based on the board
compatible, and only create by-usage symlinks for partitions on the boot
device.
[1]: https://github.com/systemd/systemd/pull/29219
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-10-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The data partition has not been mounted since /etc/fstab was removed in
commit 5eb165a3722013d2c80d (2016-08-18, "ptxdist: version bump
2016.07.0 -> 2016.08.0"). Create the mount point, and add a systemd
mount unit based on the /dev/disk/by-usage/data symlink set up by our
custom rauc-udev rule.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-7-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generating the second rootfs and the data partition on the first boot
has the advantage that the generated images can get even smaller, and we
can resize the data partition on-the-fly to fill the available space on
the boot medium.
Specify a minimum of 200 MiB for the first and second root partitions
just so that both are of equal size. (This will fit any root.ext2 in any
of our platforms with about 25% of space left.) If the first root
partition in the image is smaller, it will get resized too, including
the filesystem it contains.
Remove the old systemd-autoformat service and the mkfs-ext4 udev rule,
which also only handled the case where the data partition was the third
partition on the disk (which is not always the case anymore since we
have partitions for barebox-state or device-specific firmware), and
replace it with a call to systemd-repart if the root partition is on a
disk that we can actually repartition (i.e. /dev/root is not emulated
via qemu; this should also match the case when we are running from
initrd, but this has not been tested.)
Use a custom Type UUID instead of "linux-generic" for the data partition
to prevent systemd-repart from matching any bootloader partitions that
could throw off the matching algorithm (e.g. on STM32MP1).
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-6-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a redundant root partition to the genimage config
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Add a state backend to the device tree fragment
* Map partitions in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/distrokit/20230926092713.3680509-5-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set up RAUC with a shared system.conf that uses the /dev symlinks which
the rauc-udev package creates based on the Device Tree compatible. Also
add a unit file that marks the booted partition as good after systemd
startup has finished successfully.
The key material for signing the RAUC bundles is provided by the
ptx-code-signing provider used for development, which is a build
dependency of RAUC. Since we can enable RAUC in the ptxconfig for all
platforms, all platforms also need a code signing provider.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.barebox.org/20230825110310.2948272-3-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable barebox bootchooser framework
* Add a redundant root partition to the genimage config
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Add a state backend to the device tree fragment
* Map partitions in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable barebox bootchooser framework
* Add a redundant root partition to the genimage config. The state and
environment partitions can live in the first 4 MiB of the SD card, so
move the the boot partition by the same amount.
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Add a state backend to the device tree fragment
* Map partitions in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable barebox bootchooser framework
* Add a redundant root partition to the genimage config
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Add a state backend to the device tree fragment
* Map partitions in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Enable barebox bootchooser framework
* Add a redundant root partition to the genimage config. The current
size of the rootfs is below 98 MiB, so we can add a second root
partition to the image while keeping the overall image size the same.
* Add appropriate variables to the barebox defaultenv so the bootchooser
can decide into which partition to boot
* Use the already existing bootstate in the upstream barebox Device Tree
* Map partitions in rauc-udev compatibility layer
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we add RAUC support for different platforms later, we need a way to
specify their respective root partitions in RAUC's system.conf; however,
the names of the actual partitions can differ on different hardware
platforms. Add a short udev rule that can add symlinks to the actual
partitions based on the device tree compatible. This way we can refer to
the partitions in system.conf using the symlinks on all boards that we
want to support.
This commit only adds a stub for now; we will add the code that creates
the actual symlinks for each hardware in later commits.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix introduced here with b3893427b94d ("rc-once: make sure ssh key
material is synced to disk") has made it into ptxdist-2020.09.0, the
file is basically identical now and therefor not needed in this BSP
anymore.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Fixes: 0734dacb1929 ("PTXdist: migrate 2020.08.0 -> 2020.09.0")
Link: https://lore.pengutronix.de/20210827072944.29276-1-ada@thorsis.com
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Without this sync, it might happen (and has been observed during tests)
that ssh keys are generated, then the board is switched off, before the
data made its way to the medium. This results in empty ssh keys, which
makes the sshd service fail.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
| |
This is the original file, which will be modified in the next commit.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The upcoming STM32MP157C-DK2 board will be the first DistroKit board
with a GPT based image and it has barebox as partition 3, unlike the
other boards where this is always the data partition.
This causes the data partition rule to brick the image by overwriting
barebox.
As a temporary measure, disable the data partition auto formatting
on GPT-images by explicitly checking for partition type 0x83 before
starting the service. Eventually we might want to match against
a UUID before autoformatting, or create the partition anew altogether.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PTXCONF_URSHD and PTXCONF_URSHD_SYSTEMD_UNIT options were disabled
in cb563ef79 ("ptxconfig: reduce active components"), so no one is
installing this file anymore. Drop it.
Should it be needed in future, the same file is part of the upstream
ptxdist rule since 900dfe2cbb8 ("telnetd/urshd: start only with
ptxdist-devel in the kernel command line").
Fixes: cb563ef79 ("ptxconfig: reduce active components")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
Since 69841205bc7e114c40ccd3303fae2c97d0c42184 in ptxdist, the systemd
/usr merge is active. Adapt local rules as well.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|