From: Tom Rini Date: Thu, 21 Sep 2017 17:46:16 +0000 (-0400) Subject: wic: When using --use-uuid make sure that we update the fstab with PARTUUID X-Git-Tag: uninative-1.8~1219 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=e7443e7cf876d9bbe326033ac5eee0b98ce5d37f;p=openembedded-core.git 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 Signed-off-by: Ross Burton --- 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): 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,