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>
This commit is contained in:
parent
68f3a571f4
commit
7f880e2980
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue