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-11-08 22:24:04 +0000
commit7707961e9f95429044f8de5ca30bfefc797cf371 (patch)
treeedbc05cab3eef77a260a4acb5018c9187bfe1df4 /scripts/lib/wic/plugins
parent35730f8735a5cfe4b6c748fd984b7521ff4882ac (diff)
downloadpoky-7707961e9f95429044f8de5ca30bfefc797cf371.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: e7443e7cf876d9bbe326033ac5eee0b98ce5d37f) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.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,