[PATCH] distro_bootcmd: Set distro_bootpart_uuid for block devices

Tom Rini trini at konsulko.com
Fri Jan 13 01:17:04 CET 2023


On Thu, Jan 05, 2023 at 02:08:23PM +0100, Marek Vasut wrote:

> The assignment of block device nodes in Linux is not deterministic by
> default, i.e. a newly added eMMC controller or other block device can
> change the assignment of /dev/mmcblkN (or other block device node like
> e.g. /dev/sdXy) and prevent the system from picking the correct block
> device for root filesystem in case the root filesystem is specified on
> kernel command line using 'root=/dev/mmcblkNpM' (or 'root=/dev/sdXy'
> etc.).
> 
> One way out is to derive PARTUUID in U-Boot, which is unique identifier
> of a partition, and pass that as root=PARTUUID=<partuuid> to Linux via
> kernel command line. Linux would then find the partition using PARTUUID,
> no matter on which block device the partition resides and which node was
> assigned to that block device.
> 
> Derive the PARTUUID before scanning for extlinux presence and assign it
> into distro_bootpart_uuid environment variable, which can then be used
> in extlinux.conf kernel command line specifier.
> 
> Note that it is not possible to do this in scan_dev_for_extlinux script
> because this script is called from scan_dev_for_boot script, which is
> called for both block devices as well as UBI volumes, and we can not
> derive PARTUUID for UBI volumes.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230112/deeaba3d/attachment.sig>


More information about the U-Boot mailing list