initramfs-framework: rootfs: add support for LABEL

The rootfs can also be found via the partition label.

(From OE-Core rev: 037255f3c448bfc05f3e7373e1ddeee4bbea2164)

Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ricardo Salveti
2018-02-08 23:41:18 -02:00
committed by Richard Purdie
parent 848aa6541f
commit 51c6e1d1cb

View File

@@ -31,6 +31,11 @@ rootfs_run() {
bootparam_root="/dev/disk/by-partuuid/$root_uuid"
fi
if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
root_label=`echo $bootparam_root | cut -c7-`
bootparam_root="/dev/disk/by-label/$root_label"
fi
if [ -e "$bootparam_root" ]; then
flags=""
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then