summaryrefslogtreecommitdiffstats
path: root/projectroot/usr
Commit message (Collapse)AuthorAgeFilesLines
* rauc-udev: add entry for TQ MBa8MPxL boardLeonard Göhrs2024-01-291-0/+1
| | | | | | | | | | 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>
* v8a: add RAUC support for rock3aRoland Hieber2023-12-131-0/+1
| | | | | | | | | | | | | | | * 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>
* rauc-udev: generate symlinks based on GPT partition labelsRoland Hieber2023-12-131-34/+12
| | | | | | | | | | | | | | | | | | | | | 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>
* datapartition: add missing mount unitRoland Hieber2023-12-131-0/+6
| | | | | | | | | | | | 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>
* datapartition: generate partitions via systemd-repartRoland Hieber2023-12-132-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* v7a: add RAUC support for lxa-mc1Roland Hieber2023-10-201-0/+7
| | | | | | | | | | | | * 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>
* rauc: add initial supportRoland Hieber2023-09-151-0/+14
| | | | | | | | | | | | | | | | 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>
* v7a: add RAUC support for riotboardRoland Hieber2023-08-151-0/+7
| | | | | | | | | | | * 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>
* v7a: add RAUC support for rpi3Roland Hieber2023-08-151-0/+7
| | | | | | | | | | | | | * 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>
* v7a: add RAUC support for beaglebone blackRoland Hieber2023-08-151-0/+7
| | | | | | | | | | | * 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>
* v7a: add RAUC support for qemu-vexpressRoland Hieber2023-08-151-0/+6
| | | | | | | | | | | | | * 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>
* rauc-udev: add a compatibility layer for mapping partitionsRoland Hieber2023-08-152-0/+19
| | | | | | | | | | | | | | | | 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>
* rc-once: Remove file identical to that in ptxdistAlexander Dahl2021-08-271-56/+0
| | | | | | | | | | | | 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>
* rc-once: make sure ssh key material is synced to diskRobert Schwebel2020-08-101-0/+2
| | | | | | | | | 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>
* rc-once: copy upstream systemd-rc-once from ptxdist-2020.08.0Robert Schwebel2020-08-101-0/+54
| | | | | | This is the original file, which will be modified in the next commit. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
* datapartition: disable autoformat of non-MBR Linux partitionsAhmad Fatoum2020-03-051-1/+1
| | | | | | | | | | | | | | | | 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>
* projectroot: remove leftover urshd systemd service unit fileAhmad Fatoum2020-02-191-10/+0
| | | | | | | | | | | | | 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>
* datapartition: /usr mergeRobert Schwebel2017-06-303-0/+30
Since 69841205bc7e114c40ccd3303fae2c97d0c42184 in ptxdist, the systemd /usr merge is active. Adapt local rules as well. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>