Multiple kernels and boot partitions selection
Quentin Schulz
quentin.schulz at theobroma-systems.com
Mon Oct 10 10:06:39 CEST 2022
Hi Gianluca,
On 10/10/22 09:06, gianluca wrote:
> Hello,
> I was wondering if there is/are some standard way(s) to achieve a
> multiple boot selection on u-boot startup.
>
> Let's say I have a bunch of partitions:
>
> 1- /dev/mmcblk0p7 with Debian 11 Bullseye
>
> 2- /dev/mmcblk0p5 with Debian 10 Buster
>
> All of these partitions have the /boot/uImage kernel images, the
> /lib/modules/$(uname -r) drivers folders and /boot/dtb device-trees into
> their partition section.
>
> u-boot has NOT the specific environment partition, i.e. it is located in
> the end of bootloader itself up to the maximum size of the bootloader
> partition. So, to be clear the /dev/mmcblk0p1 contains u-boot code &
> envar space.
>
> If needed I can have a MB85RC64 a 24LC64 FRAM/EEPROM compatible memory
> chip to store information on boot.
>
You can modify the U-Boot environment from userspace with fw_setenv from
libubootenv (formerly u-boot(-fw)-tools). You can store from there which
partition to use for the next boot in an environment variable.
Cheers,
Quentin
More information about the U-Boot
mailing list