@@ -634,7 +634,7 @@ CONFIG_FEATURE_FDISK_WRITABLE=y
# CONFIG_FEATURE_OSF_LABEL is not set
# CONFIG_FEATURE_GPT_LABEL is not set
# CONFIG_FEATURE_FDISK_ADVANCED is not set
-# CONFIG_FINDFS is not set
+CONFIG_FINDFS=y
CONFIG_FLOCK=y
# CONFIG_FDFLUSH is not set
# CONFIG_FREERAMDISK is not set
@@ -43,6 +43,18 @@ udev_trigger_root_device() {
PARTUUID=?*)
root_match="PARTUUID=${bootparam_root#PARTUUID=}"
;;
+ LABEL=?*)
+ # The kernel does not export the filesystem LABEL in the
+ # uevent, so resolve it to a device node with findfs and
+ # match on that device's kernel-provided PARTUUID.
+ root_label="${bootparam_root#LABEL=}"
+ root_dev=$(findfs "LABEL=$root_label" 2>/dev/null) || return 1
+ [ -n "$root_dev" ] || return 1
+ root_partuuid=$(sed -n 's/^PARTUUID=//p' \
+ "/sys/class/block/${root_dev#/dev/}/uevent" 2>/dev/null)
+ [ -n "$root_partuuid" ] || return 1
+ root_match="PARTUUID=$root_partuuid"
+ ;;
*)
return 1
;;
Filesystem labels are not available in kernel uevents. Enable the BusyBox findfs applet and use it to resolve root=LABEL= to a device. Read the kernel-provided PARTUUID from sysfs and trigger only that partition. Fall back to the full trigger when the label cannot be resolved safely. Signed-off-by: Wenwen Fu <wenwfu@qti.qualcomm.com> --- meta/recipes-core/busybox/busybox/defconfig | 2 +- .../initrdscripts/initramfs-framework/udev | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)