summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDiego Rondini <diego.rondini@kynetics.com>2019-09-16 15:23:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 10:54:32 +0100
commit4b3656a978bf11d2d171a86d9eef00c03d3a43fc (patch)
treecd59338f2b06300271b89e2f04c4c4f50159448b /meta
parentfc94afe15e7c0e194bb7f93a2e39d461131b6e40 (diff)
downloadpoky-4b3656a978bf11d2d171a86d9eef00c03d3a43fc.tar.gz
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. (From OE-Core rev: e714b8982c2decbc24598af46f44c3a94834591f) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 76fa84d354..61baf73a60 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -31,6 +31,11 @@ rootfs_run() {
31 bootparam_root="/dev/disk/by-partuuid/$root_uuid" 31 bootparam_root="/dev/disk/by-partuuid/$root_uuid"
32 fi 32 fi
33 33
34 if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
35 root_uuid=`echo $bootparam_root | cut -c11-`
36 bootparam_root="/dev/disk/by-partlabel/$root_uuid"
37 fi
38
34 if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then 39 if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
35 root_label=`echo $bootparam_root | cut -c7-` 40 root_label=`echo $bootparam_root | cut -c7-`
36 bootparam_root="/dev/disk/by-label/$root_label" 41 bootparam_root="/dev/disk/by-label/$root_label"