summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSchmidt, Adriaan <adriaan.schmidt@siemens.com>2021-11-23 08:33:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-24 09:55:05 +0000
commit2fb247c5ecf057bb96649a3c0234794b4991c050 (patch)
treec32f51179c2eec980f9f6a93010acc7455be7eeb /scripts
parentf5d136f5a9c14e6629a47bf3e796f1d951ed998b (diff)
downloadopenembedded-core-contrib-2fb247c5ecf057bb96649a3c0234794b4991c050.tar.gz
wic: support rootdev identified by partition label
We already support specifying the rootfs by PARTUUID. This adds general support for letting the kernel find the rootfs by PARTLABEL. Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index c7bc2469ab5..35fff7c1024 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -259,6 +259,8 @@ class DirectPlugin(ImagerPlugin):
if part.mountpoint == "/":
if part.uuid:
return "PARTUUID=%s" % part.uuid
+ elif part.label:
+ return "PARTLABEL=%s" % part.label
else:
suffix = 'p' if part.disk.startswith('mmcblk') else ''
return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum)