aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-09-21 13:46:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-08 22:23:44 +0000
commite7443e7cf876d9bbe326033ac5eee0b98ce5d37f (patch)
tree4aec31662585e82a875f60452ba559ada3594f86 /scripts
parentccffc66c64fc0dde433b0375c69760983c657427 (diff)
downloadopenembedded-core-e7443e7cf876d9bbe326033ac5eee0b98ce5d37f.zip
openembedded-core-e7443e7cf876d9bbe326033ac5eee0b98ce5d37f.tar.gz
openembedded-core-e7443e7cf876d9bbe326033ac5eee0b98ce5d37f.tar.bz2
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. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-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 bdb8385..da1c061 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -140,9 +140,12 @@ class DirectPlugin(ImagerPlugin):
or part.mountpoint == "/":
continue
- # mmc device partitions are named mmcblk0p1, mmcblk0p2..
- prefix = 'p' if part.disk.startswith('mmcblk') else ''
- device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
+ if part.use_uuid:
+ device_name = "PARTUUID=%s" % part.uuid
+ else:
+ # mmc device partitions are named mmcblk0p1, mmcblk0p2..
+ prefix = 'p' if part.disk.startswith('mmcblk') else ''
+ device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
opts = part.fsopts if part.fsopts else "defaults"
line = "\t".join([device_name, part.mountpoint, part.fstype,