aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-03-22 19:41:36 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-26 15:06:11 +0000
commit3a95c4549f743aa47456c76e687a863c64c7a7f4 (patch)
tree1d3e176c36b9569aae36245228e05226647ef764 /scripts
parentdc4abfc8f99c08e0c1ac9d098ce17838d0eda028 (diff)
downloadopenembedded-core-contrib-3a95c4549f743aa47456c76e687a863c64c7a7f4.tar.gz
wic: Add SD/MMC-Cards support to '--ondisk' param
The special case when wic is set up to use SD/MMC-Cards in place of sdX disks is not handled properly. Append 'p' to the rootdev when disk is SD/MMC-Cards fix this situation. Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/mic/imager/direct.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index f8c300c787c..1f2f8fcf9ce 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -345,10 +345,14 @@ class DirectImageCreator(BaseImageCreator):
parts = self._get_parts()
for num, p in enumerate(parts, 1):
if p.mountpoint == "/":
+ part = ''
+ if p.disk.startswith('mmcblk'):
+ part = 'p'
+
if self._ptable_format == 'msdos' and num > 3:
- rootdev = "/dev/%s%-d" % (p.disk, num + 1)
+ rootdev = "/dev/%s%s%-d" % (p.disk, part, num + 1)
else:
- rootdev = "/dev/%s%-d" % (p.disk, num)
+ rootdev = "/dev/%s%s%-d" % (p.disk, part, num)
root_part_uuid = p.part_type
return (rootdev, root_part_uuid)