From: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: tom.zanussi@linux.intel.com
Subject: [PATCH] wic: Add SD/MMC-Cards support to '--ondisk' param
Date: Tue, 18 Mar 2014 13:05:45 -0300 [thread overview]
Message-ID: <1395158745-9424-2-git-send-email-joaohf@gmail.com> (raw)
In-Reply-To: <1395158745-9424-1-git-send-email-joaohf@gmail.com>
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.
---
scripts/lib/mic/imager/direct.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index f8c300c..1f2f8fc 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)
--
1.8.3.2
next prev parent reply other threads:[~2014-03-18 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 16:05 [PATCH] wic: Add SD/MMC-Cards support João Henrique Ferreira de Freitas
2014-03-18 16:05 ` João Henrique Ferreira de Freitas [this message]
2014-03-21 17:52 ` [PATCH] wic: Add SD/MMC-Cards support to '--ondisk' param Tom Zanussi
2014-03-22 22:41 ` [PATCH v2] " João Henrique Ferreira de Freitas
2014-03-18 16:35 ` [PATCH] wic: Add SD/MMC-Cards support Otavio Salvador
2014-03-19 12:52 ` João Henrique Freitas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395158745-9424-2-git-send-email-joaohf@gmail.com \
--to=joaohf@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=tom.zanussi@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox