aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Stoppa <igor.stoppa@intel.com>2016-07-01 15:53:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-08 09:55:41 +0100
commit1ab2ca141d3defe4b80212e28ac7c3f2271e2515 (patch)
treec81e850184222e5d1c9ddf62eb6003e36dbef35a
parent2a50bb9ee8838e3d026c82dc09aaccb880a264f4 (diff)
downloadopenembedded-core-contrib-1ab2ca141d3defe4b80212e28ac7c3f2271e2515.tar.gz
initramfs-framework: Add support for PartUUIDs
The rootfs can be addressed also by referring to the PartUUID value from the GPT. This patch enables such type of reference. Signed-off-by: Igor Stoppa <igor.stoppa@intel.com> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-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 5790d8cb8b..14768f1cd4 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -26,6 +26,11 @@ rootfs_run() {
bootparam_root="/dev/disk/by-uuid/$root_uuid"
fi
+ if [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
+ root_uuid=`echo $bootparam_root | cut -c10-`
+ bootparam_root="/dev/disk/by-partuuid/$root_uuid"
+ fi
+
if [ -e "$bootparam_root" ]; then
flags=""
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then