| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
By default, TF-A located on eMMC boot partition will only boot
FIP from eMMC user area. Toggle STM32MP_EMMC_BOOT, so FIP image is first
looked for at offset 256K on the eMMC boot partition, before booting
from GPT partition in user area.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20231213165014.1279779-1-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
| |
We will use this to find out whether we can run systemd-repart.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231213144750.1899431-3-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
systemd v254 doesn't know about the partition type GUID for big-endian
MIPS root partitions yet, so systemd-repart fails to parse the
"Type=root" setting in its config, and fails to start. Backport a patch
from systemd 255-rc1, which will wire up the respective GUID.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231213144750.1899431-2-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
| |
'reason' suggests to enable an optimized SHA1 implementation on ARM.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rockchip RK35* and i.MX8M* share the same barebox environment, but RAUC
and bootchooser were only configured for the Rockchip boards, rendering
the i.MX boards unbootable. Fix this by adding bootchooser as boot
target only for the radxa,rock3a.
While at it, we switch to using the new of_compatible command. This is
likey more stable than the Model string and allows easy extension in
future by additional compatibles.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231205095929.3469672-3-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Boot up is broken on some of the Raspberry Pi and STM32MP1 board we
support, because boot method is changed to bootchooser, but state isn't
defined. Fix this by extending state definition to the missed boards.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231205095929.3469672-2-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This partly reverts commit e0ca556db7983a99acc3330dc32cdae395e84003.
As Ahmad reports, the kernel device tree of STM32MP157C-EV1 has no
aliases at all, which is a precondition for enabling MMCBLKDEV_ROOTARG
in barebox. Restore the old state which detects the PARTUUID of the root
partition and passes it to the kernel.
Link: https://lore.distrokit.org/distrokit/9afb1d8a-f90d-7d74-781d-c33f6b7a2efb@pengutronix.de
Fixes: e0ca556db7983a99acc3 (2023-10-20, "v7a: barebox: pass root=mmcblkXpN instead of root=PARTUUID=… to kernel")
Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Enable the update bundle so v8a platforms can be updated via RAUC, and
put something useful in the bundle description.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231104003525.1673736-5-rhi@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>
|
|
|
|
|
|
|
|
| |
Enable two useful commands for debugging.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231104003525.1673736-3-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Update to the new version with default options. This also includes
detection of GPT partitions with the barebox-state GUID for state
backends, which we'll make use of in the next commits.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231104003525.1673736-2-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that every image is in GPT format, we can use the devnodes that
include the partition label instead of the partition number to boot our
rootfs. These names are more readable and also more robust against
changing the order of the partitions. Make the change on all bareboxes
that didn't have that yet.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-11-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>
|
|
|
|
|
|
|
|
|
|
|
| |
These partitions are now generated on the first boot by systemd-repart.
The second rootfs is not needed for booting, and overwritten by RAUC
when a bundle is installed, so it can as well be empty. Remove the two
partitions to save space in the generated images.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-9-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The license is for the source of the package and this
package has none. Use 'ignore' here.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-8-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
[rsc: mol asked for 'ignore', as the license is not for the recipe. Fixed up.]
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
qemu sets the size of the emulated disk as the size of the underlying
image file. We want to fit two rootfs partitions and one data partition
of 200 MiB each in there, which will need at least 600 MiB of disk
space. Round up to the next power of two, so qemu can work with it,
which results in 1 GiB, which the other qemu images already have too.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-5-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With current rootfs sizes of below 200 MiB there is no need to have a
512 MiB root partition, which will be a lot larger than the file system
it contains, and which will also all have to be written to the SD card.
Let genimage determine the partition size based on the file system image
it contains, thereby reducing the size of the generated disk images.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-4-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
This was forgotten in commit 1022b05b735f6081cf1b.
Fixes: 1022b05b735f6081cf1b (2023-10-20, "images: convert to GPT format")
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-3-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The partition label is written to the GPT, and systemd-repart can match
on the partition label, which we'll use in a later commit. Set the name
of the first root partitions to the same name ("root-A") to give the
matching algorithm something to work with.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231103225253.1349209-2-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RAUC support for a lot of v7a platforms has been available for some time
now (see e.g. commits 559e482a643e to 8e204806f616, b869997d64ee5,
5f00115de864), but building the RAUC bundle that is actually needed to
update the targets has somehow slipped through. Enable the image, and
put something useful in the bundle description.
Reported-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231102095229.3096032-1-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
| |
The patches are meanwhile in upstream, and 6.4 isn't used any more.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
| |
Linux 6.5 has support for the RK809 PMIC. Enable it.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Currently we get this new error:
ERROR: stm32-rproc 10000000.m4@10000000.of: failed to get tz syscfg
Apply upstream patches from the mailing list.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
| |
Enable the hard lockup detector and panic on trigger. An embedded system
has probably nothing better to do than to reboot if the kernel locks up.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
| |
The devicetrees in mainline have changed their location, adapt our
devicetree paths and the includes accordingly.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
| |
The 9p patches are already part of 6.5, so they don't have to be ported
to the new kernel.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GUID Partition Table format has several advantages over the legacy
MBR format. Especially when we want to make use of systemd-repart
functionality later, the GPT format is a necessity. Therefore, migrate
all images to the GPT format.
For some platforms (Raspberry Pi, AM355x, AT91), we still need a legacy
MBR partition table so that the ROM code can find a bootable partition
(which contains our barebox image). For those cases, transform the image
into a hybrid format containing an MBR at offset 0, which contains the
VFAT boot partition for the ROM loader, and a protective GPT partition
of partition type 0xEE after it to claim the remaining space on the
storage medium for GPT purposes. Then a GPT header is added at the
default GPT offset of 0x200, which defines the boot partition as well as
the root partition, and which is read by Barebox and Linux to boot the
system.
For images that contain a raw barebox image at a fixed offset outside of
a GPT partition, make sure that the GPT does not conflict with the
barebox image, and write only the primary GPT header into the hole
specified by the barebox image (offset 440 to 1K), but move the GPT
partition array to an offset behind the barebox image. (genimage will
then also offset the following partitions accordingly.)
Remove any 'disk-signature' options, which are not compatible with GPT;
genimage will generate a random Disk UUID instead. Also remove any
'partition-type' options, and set the respective partition type GUIDs
specified by the Discoverable Partitions Specification [1], or let
genimage default to the 'linux-generic' partition type.
For the rpi1 image-hdimg, overwrite the upstream hd.config with a
hardcoded genimage config file since it is not possible to build a
hybrid MBR/GPT image with the image recipe from upstream PTXdist.
For the v7a image-hdimg, enable GPT support in the platformconfig menu,
and re-add the respective config lines from the upstream version of the
config file in order to make GPT work.
The images with fixed partition sizes for qemu need to stay below the
size specified in the 'size' option, so decrease the size of the last
partition further to make space for the secondary GPT header, which will
reside in the last block of the image.
Link: [1] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-6-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
genimage knows about the 'size' option for images to fill the image to a
certain size, and since genimage v14 it supports the 'fill' option to
write all zeroes at the end of the image and not cut them off to
optimise the image size. Use this to blow up the images that are used
with qemu to the next power of two so qemu can work with them, and
remove our invisible-partition-at-the-end hack.
Since the first MiB (when using 1 MiB alignment) is occupied by the
partition table, and the first partition only starts at offset 1 MiB,
the data partition now no longer fits into the available space. Set it
to 'autoresize' so that genimage computes the size to fill the remaining
space in the image.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-5-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We want to be able to boot from devices formatted with GPT, enable this
on the platforms that don't have it yet.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-4-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kernels prior to v5.10-rc1 could not ensure deterministic ordering for
MMC devices. For this reason, the default 'append-root' behaviour of
barebox for MMC block devices is to append a 'root=PARTUUID=XYZ' option
to the kernel command line. The PARTUUID is derived from the partition
table and is expected to be unique system-wide. This is however
susceptible to breakage if the exact same image is written to different
boot media in the system, e.g. SD and eMMC, so the PARTUUID will no
longer uniquely refer to a single partition.
Newer kernel versions honor the numbering used for 'mmc' aliases,
which makes 'root=mmcblkXpN' deterministic as long as barebox and
kernel aliases are identical. Since we're using kernel 6.4, enable this
option in barebox.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-3-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
genimage v16 complains that 'partition-table = false' is deprecated in
favour of 'partition-table-type = none'.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-2-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The 'gpt' option in genimage has been deprecated in favour of
'partition-table-type = gpt'.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20231020090519.3320460-1-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since there is no diod server ptxdist host tool available yet, this
script starts the version from debian.
It is also to be found how to best start the server.
For now this simple script works as proof of concept including
ugly hacks to run and stop diod around the qemu exec.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.pengutronix.de/distrokit/20230621224609.932551-1-m.grzeschik@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
| |
A new ptxdist version is out, update.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even when a selected_platformconfig symlink exists, ptxdist can still be
used with the --platformconfig=... option to override the platformconfig
during the build. In this case, running the qemu script will search in
the wrong build folder for the images.
Don't use the selected_platformconfig link to find out the platform,
instead determine it from the path of the qemu script itself.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/distrokit/20231010091028.3444582-1-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The recipe was forked to DistroKit because of missing support for the
mipsel target (which I just sent upstream). Just update the recipe to
the current version from PTXdist because the version of the recipe
currently in platform-mips complains about the '--meson' option.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/distrokit/20231009181251.2327015-1-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>
|
|
|
|
|
|
|
|
|
| |
Bootchooser will choose the correct redundant A/B partition for booting.
Enable it in the common barebox so it is available on all v7a boards.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/distrokit/20230926092713.3680509-4-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|