[oe-commits] [openembedded-core] 24/24: initramfs-framework: support PARTLABEL option

git at git.openembedded.org git at git.openembedded.org
Wed Sep 18 17:03:51 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 0312e425a2e9cb6041a8cc881c5ca9b9cc78e8e3
Author: Diego Rondini <diego.rondini at kynetics.com>
AuthorDate: Mon Sep 16 15:23:15 2019 +0200

    initramfs-framework: support PARTLABEL option
    
    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.
    
    Signed-off-by: Diego Rondini <diego.rondini at kynetics.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/initrdscripts/initramfs-framework/rootfs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 76fa84d..61baf73 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-10`" = "PARTLABEL=" ]; then
+				root_uuid=`echo $bootparam_root | cut -c11-`
+				bootparam_root="/dev/disk/by-partlabel/$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"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list