]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
initramfs-framework: Add support for PartUUIDs
authorIgor Stoppa <igor.stoppa@intel.com>
Fri, 1 Jul 2016 13:53:52 +0000 (15:53 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Jul 2016 08:55:41 +0000 (09:55 +0100)
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>
meta/recipes-core/initrdscripts/initramfs-framework/rootfs

index 5790d8cb8b24a423ed3f4fd44f9321830c5208c1..14768f1cd40ec88892710fd83c41b1927ce73642 100644 (file)
@@ -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