summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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-27 09:42:06 +0000
commit7f880e2980bbc47198a107b4d1248a765acd00fc (patch)
tree6dd06a26de6526c9128f5532e0780c6740c1d0fe /scripts/lib
parent68f3a571f422170ef0fcef0243cdb6fadc11fade (diff)
downloadpoky-7f880e2980bbc47198a107b4d1248a765acd00fc.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. (From OE-Core rev: 3a95c4549f743aa47456c76e687a863c64c7a7f4) 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/lib')
-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 f8c300c787..1f2f8fcf9c 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -345,10 +345,14 @@ class DirectImageCreator(BaseImageCreator):
345 parts = self._get_parts() 345 parts = self._get_parts()
346 for num, p in enumerate(parts, 1): 346 for num, p in enumerate(parts, 1):
347 if p.mountpoint == "/": 347 if p.mountpoint == "/":
348 part = ''
349 if p.disk.startswith('mmcblk'):
350 part = 'p'
351
348 if self._ptable_format == 'msdos' and num > 3: 352 if self._ptable_format == 'msdos' and num > 3:
349 rootdev = "/dev/%s%-d" % (p.disk, num + 1) 353 rootdev = "/dev/%s%s%-d" % (p.disk, part, num + 1)
350 else: 354 else:
351 rootdev = "/dev/%s%-d" % (p.disk, num) 355 rootdev = "/dev/%s%s%-d" % (p.disk, part, num)
352 root_part_uuid = p.part_type 356 root_part_uuid = p.part_type
353 357
354 return (rootdev, root_part_uuid) 358 return (rootdev, root_part_uuid)