summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDiego Rondini <diego.rondini@kynetics.com>2019-09-19 09:45:09 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-02 10:09:47 +0100
commit2657837f72f06966ed681c6e91e781134e990f75 (patch)
tree18861f0f36c63e84b73dd8a9ecdac8b7bb73c568 /meta
parentc21d6a80f9e82de6bf8e892694ca9fc50ec27e79 (diff)
downloadpoky-2657837f72f06966ed681c6e91e781134e990f75.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: ebc974be12c3e83e961c99c24fde267d6c8e8bfc) Signed-off-by: Diego Rondini <diego.rondini@kynetics.com> Signed-off-by: Ross Burton <ross.burton@intel.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 f8c73b9726..748c9391c0 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -36,6 +36,11 @@ rootfs_run() {
36 bootparam_root="/dev/disk/by-partlabel/$root_partlabel" 36 bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
37 fi 37 fi
38 38
39 if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
40 root_partlabel=`echo $bootparam_root | cut -c11-`
41 bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
42 fi
43
39 if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then 44 if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
40 root_label=`echo $bootparam_root | cut -c7-` 45 root_label=`echo $bootparam_root | cut -c7-`
41 bootparam_root="/dev/disk/by-label/$root_label" 46 bootparam_root="/dev/disk/by-label/$root_label"