]> code.ossystems Code Review - openembedded-core.git/commitdiff
initramfs-framework: support PARTLABEL option
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Sep 2019 12:08:05 +0000 (13:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Sep 2019 12:09:18 +0000 (13:09 +0100)
Since commit (kernel >= 4.20):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f027c34d844013d9d6c902af8fa01a82d6e5073d
specifying rootfs by PARTLABEL is supported. This commit adds support to
specify root by GPT partition label.

RP: [Fixup to match v2 of the patch]

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initrdscripts/initramfs-framework/rootfs

index 61baf73a603706dac658cee624018b8ce1af9a14..2e400bff41e734e38659b369677c4f56b65a2a5e 100644 (file)
@@ -32,8 +32,8 @@ rootfs_run() {
                        fi
 
                        if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
-                               root_uuid=`echo $bootparam_root | cut -c11-`
-                               bootparam_root="/dev/disk/by-partlabel/$root_uuid"
+                               root_partlabel=`echo $bootparam_root | cut -c11-`
+                               bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
                        fi
 
                        if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then