On Tue, Jul 31, 2018 at 01:20:12PM +0200, Giorgio Dal Molin wrote: > Hi all, > > I'm trying to find out the best method to define the root= > parameter when booting the linux kernel from barebox. > > My system boots from an sd card partitioned with a GPT. > The sd card has two independent set of partitions with > the following labels: > > 1) boot_1 + rootfs_1 > 2) boot_2 + rootfs_2 > > for redondance in case one set gets damaged while updating. > > 'boot_1' is formatted with ext4 and contains the kernel + dtb images > for the userland in 'rootfs_1'; and the same for 'boot_2' and 'rootfs_2'. > > Currently I hardcode the 'root' parameter to '/dev/mmcblk0p3' or > '/dev/mmcblk0p4' corresponding to the kernel in 'boot_1' or > 'boot_2' and it actually works but is there a better way to do > this ? You could use bootloader spec. That would at least allow you to store a suitable root= parameter in the config files in the boot_1 and boot_2 partitions. Not sure if that's what you are looking for though. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox