aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/initramfs-framework
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@opensourcefoundries.com>2018-02-08 23:41:18 -0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-16 18:05:25 +0000
commit037255f3c448bfc05f3e7373e1ddeee4bbea2164 (patch)
tree490b9bf0a711c41e8bd77c191297cd7d547c39b0 /meta/recipes-core/initrdscripts/initramfs-framework
parent2655f7d26847424ac207e6e468a78a4ad293c4e9 (diff)
downloadopenembedded-core-contrib-037255f3c448bfc05f3e7373e1ddeee4bbea2164.tar.gz
initramfs-framework: rootfs: add support for LABEL
The rootfs can also be found via the partition label. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/initrdscripts/initramfs-framework')
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/rootfs5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 14768f1cd4..76fa84d354 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -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