| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Now, that we have TF-A, OP-TEE, barebox and kernel in-place, let's build
an image that combines all of them that can be booted by writing to the
SD-Card of the STM32MP135F-DK.
Notably missing is Ethernet support as that's not mainline yet.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20240315211240.3016716-13-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Starting with commit 9f868f78bc54 ("environment: use barebox environment from
GPT partitions"), barebox can look up its environment by partition type
UUID on GPT-partitioned media. To prepare making use of this in the
future, ensure that our GPT barebox partition has the correct type UUID.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The DistroKit image is capable of booting both from SD-Card and eMMC
user area. For boot from eMMC boot partition, we can keep reusing the
same image for the user area, but need to place the boot firmware into
the boot partition as well. Add an extra image that does just that.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20231213165014.1279779-2-a.fatoum@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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the 'reason' checker analyzes all <*>.dtb files in the imagedir and
assumes they are all kernel dtbs, rename the barebox dtb from
barebox-*.dtb to *.dtb-bb.
This silences a warning that kernel devicetrees should not contain
barebox,state nodes.
For a similar fix, see commit d16f98c910e20ee5a29da6ca0636b0fbad14f1b2.
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a somewhat ugly hack. The VideoCore will pass this device tree
to barebox, which doesn't care much for it. As a side effect of the
device tree passing, the VideoCore parses the device tree and will
detect that the mini-uart is enabled and take care not to scale clock
rate on the VideoCore, which the mini-uart is sourced from as that would
upset the baudrate.
There may be some config.txt entry we can use to avoid this, but for
now, just place the device tree into the boot partition.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20220930162159.814389-10-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generic barebox-dt-2nd.img mimics Linux and allows booting barebox
with an external device tree as if it were a kernel. We employ this for
using the same image for Rpi 2 and 3 by placing barebox device trees
into the FAT boot partition and having the VideoCore pass the correct
device tree to barebox.
While this works, it means the VideoCore won't patch the kernel device
tree, but many users depend on the VideoCore to apply overlays for
kernel consumption. While this could be done in barebox instead, it
doesn't have the familiar config.txt interface and it doesn't cover some
of the more obscure magic the videocore does: e.g. when applying an
overlay configuring the USBOTG, the VideCore will reconfigure clocks as
a side effect of applying the overlay.
For this reason, barebox now also has a barebox-raspberry-pi.img that
behaves the same as barebox-dt-2nd.img with the difference that it has
the multiple device trees built-in. It's already being generated since
updating to the new release, so let's make use of this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20220930162159.814389-6-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
We have everything in place now to switch from stm32image to FIP.
This gives us upstream support for factory bootstrap via DFU and
avoids the breakage on v2.8, which will be the first release removing
support of the deprecated stm32image format.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20220725120445.1295669-6-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
barebox has had the ability to generate an extra image that's bootable
like a kernel for a while now. With small adjustment, we can let the
videocore use this image and pass it the appropriate device tree
depending on the board used. Moving this decision into the VideoCore
allows us to use the same image for both Raspberry Pi 2, Rasperry Pi 3
and Raspberry Pi CM3.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.pengutronix.de/20220426083821.1829442-3-a.fatoum@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
A new ptxdist version has been released, update.
ptxdist-2021.12.0 has genimage-15 which has a strikter check for
partitions that overlay: specify holes in the barebox partition that
allow to overlap with MBR.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The current rootfs has a size of about 55 MiB, which does not leave much
space until 64 MiB if additional kernel features or userspace packages
are enabled. Increase the partition size so that vexpress.hdimg fills
the next larger power of two, which qemu is very picky about.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20210818205819.26285-1-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For partitions that are filled by another image, it does not make sense
to make partitions larger or smaller than their containing file system.
In those cases, genimage can already determine the partition sizes from
the referenced images, and calculates the partition offsets accordingly,
so in most cases we don't have to keep track of the sizes at all.
(A special case is vexpress.hdimg, which needs to have an empty block at
the end as a workaround for qemu, in which case it is clearer to have
all partition sizes and offsets explicitely in the config file. So don't
touch vexpress.hdimg here.)
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20210426060526.32029-2-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
genimage already supports human-readable syntax, which makes the config
easier to understand.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.pengutronix.de/20210426060526.32029-1-rhi@pengutronix.de
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, the two STM32MP1 boards we support had the same board name
string within the file names of first stage (TF-A) and second stage
(barebox) bootloaders. This will no longer be true when updating
to a more recent barebox version, as the dk2 image's name has been
changed to dkx to indicate support for both dk1 and dk2.
Prepare for this by splitting up STM32MP_BOARD_NAME.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The images sizes don't correspond to a specific SD-Card or eMMC size,
so software checking for the backup partition table at the end of
the device won't find it.
Dropping it will however reduce the STM32MP1 images size (618M -> 66M).
Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Both forms are accepted, but it looks more natural to not quote
non-string values. This is also what we do for the other genimage
configs (e.g. bootable = true).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The names of the TF-A files changed with the new PTXdist version. This was
necessary to support multiple platforms in one build: The platforms may
create images with the same name. Without the aditional prefix, the names
clash when copoed to images/.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
With the previous barebox and kernel changes, we can combine it with the
DistroKit-v7a rootfs to get an image to boot on the sama5d27-som1-ek.
Do this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
[rebased to master]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
| |
We don't need the whole 1 GiB image, the rootfs is only about 50 MiB in
size. Slim the image down to 64 MiB rootfs + 63 MiB data and 1 MiB of
padding at the end to keep the kernel happy.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
partition-type is specific to DOS partitions. The counterpart for GPT
partitions would be partition-type-uuid, which already defaults to "L",
which is ok for our purposes.
So far, this didn't have an impact, but starting with genimage v13,
commit 013b22f26b73 ("Add support for Hybrid MBR partitions"), support
for a partition-type key in a GPT partition was introduced:
Using this option with a GPT partition table will create a hybrid
MBR partition table with a maximum of 3 partition entries(this
limit does not effect the maximum number of GPT partition entries
in the same image).
The ARM TF-A can't cope with this new format and fails to boot barebox
with a "ERROR: Partition ssbl not found" message. Drop partition-type
to prevent the ptxdist 2020.06.0 upgrade that includes host-genimage v13
from breaking the stm32mp157c-dk2 and lxa-mc1 images.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Both STM32MP BootROM and TF-A expect the subsequent bootloader stage to
come from a GPT partition when booting from SD-Card.
Add a genimage config that describes this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|
|
|
|
|
|
| |
It's not needed and now the files are actually removed during 'clean'.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
|
|
|
|
|
|
|
|
| |
The disk signature is necessary so that barebox can auto-detect the boot
source and append it to the Linux command line in the 'root=' parameter.
A random but fixed value will suffice for this purpose.
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Roland Hieber <r.hieber@pengutronix.de>
|
|
|
|
|
|
|
| |
The vexpress patch series has recently been reworked. Use it.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
|
|
|
|
|
|
| |
This should help keeping the code-formatting consistent in this files.
Signed-off-by: Chris Fiege <c.fiege@pengutronix.de>
|
|
|
|
|
|
|
| |
Add missing select to BAREBOX_MX6
We need root.ext2, select it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for Versatile Express, with the configs+rules for image
creation and bootspec entries.
Note that vexpress in qemu can currently only boot from nor, so we put
the bootloader, environment and boot state there and the rest of the
system into mmc.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
[add vexpress.conf]
Signed-off-by: Chris Fiege <c.fiege@pengutronix.de>
[improve commit description]
[split from vexpress patches]
[fix and cleanupimage generation]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Add support for RIoTboard, with the configs+rules for image creation and
bootspec entries.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
[improve commit description, split from vexpress patches]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Add support for SabreLite, with the configs+rules for image creation and
bootspec entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[improve commit description]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Re-add support for Gute Fee, with the configs+rules for image creation
and bootspec entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[improve commit description]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Re-add support for beaglebone-white and beaglebone-black, with the
configs+rules for image creation and bootspec entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[improve commit description]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We will split up the image generation into one image per target hardware
in subsequent patches.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[improved commit message]
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|