summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-09-21 13:46:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:57 +0000
commit61f319db679d7d7ab4b87152103f3e2fc7c75244 (patch)
tree48792d09c608b9c56f466a88f583c69a4372514d /scripts/lib/wic/plugins
parent88d92fb301e37ecedd664d077c021f13399185da (diff)
downloadpoky-61f319db679d7d7ab4b87152103f3e2fc7c75244.tar.gz
wic: When using --use-uuid make sure that we update the fstab with PARTUUID
When we have been told to use the UUID we should also update the fstab to make use of PARTUUID instead of hard-coding the device in question. This will make the resulting image much more portable. (From OE-Core rev: 1d1fdcaf8702110783f2003cd3f8ae96c99a6d72) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugins')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index bdb8385620..da1c061063 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -140,9 +140,12 @@ class DirectPlugin(ImagerPlugin):
140 or part.mountpoint == "/": 140 or part.mountpoint == "/":
141 continue 141 continue
142 142
143 # mmc device partitions are named mmcblk0p1, mmcblk0p2.. 143 if part.use_uuid:
144 prefix = 'p' if part.disk.startswith('mmcblk') else '' 144 device_name = "PARTUUID=%s" % part.uuid
145 device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) 145 else:
146 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
147 prefix = 'p' if part.disk.startswith('mmcblk') else ''
148 device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
146 149
147 opts = part.fsopts if part.fsopts else "defaults" 150 opts = part.fsopts if part.fsopts else "defaults"
148 line = "\t".join([device_name, part.mountpoint, part.fstype, 151 line = "\t".join([device_name, part.mountpoint, part.fstype,