aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut2023-01-05 14:08:23 +0100
committerTom Rini2023-01-12 14:06:16 -0500
commitd0ba0ca45a49d6a062d0bc94b3380ea9b9616284 (patch)
treed9d1adf67f37b50b7a1ade3ef199bd467a039c63 /include
parentea3d28ec31d64cd059683947746ac71c8a90a1f9 (diff)
distro_bootcmd: Set distro_bootpart_uuid for block devices
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@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index c3a2414b914..9d2a225e7eb 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -521,6 +521,9 @@
"if fstype ${devtype} " \
"${devnum}:${distro_bootpart} " \
"bootfstype; then " \
+ "part uuid ${devtype} " \
+ "${devnum}:${distro_bootpart} " \
+ "distro_bootpart_uuid ; " \
"run scan_dev_for_boot; " \
"fi; " \
"done; " \