From: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: tom.zanussi@linux.intel.com
Subject: [PATCH v4 6/7] wic: Report all ROOTFS_DIR artifacts
Date: Sat, 29 Mar 2014 00:12:07 -0300 [thread overview]
Message-ID: <1396062728-9140-7-git-send-email-joaohf@gmail.com> (raw)
In-Reply-To: <1396062728-9140-1-git-send-email-joaohf@gmail.com>
When a .wks has more than one ROOTFS_DIR it's better to report
all ROOTFS_DIR that was used to create the image.
Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
scripts/lib/mic/imager/direct.py | 18 ++++++++++++++----
scripts/lib/mic/kickstart/custom_commands/partition.py | 13 +++++++++++++
scripts/lib/mic/plugins/source/rootfs.py | 1 +
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 1f2f8fc..ac63c38 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -321,15 +321,25 @@ class DirectImageCreator(BaseImageCreator):
"""
msg = "The new image(s) can be found here:\n"
+ parts = self._get_parts()
+
for disk_name, disk in self.__instimage.disks.items():
full_path = self._full_path(self.__imgdir, disk_name, "direct")
msg += ' %s\n\n' % full_path
msg += 'The following build artifacts were used to create the image(s):\n'
- msg += ' ROOTFS_DIR: %s\n' % self.rootfs_dir
- msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
- msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
- msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot
+ for p in parts:
+ if p.get_rootfs() is None:
+ continue
+ if p.mountpoint == '/':
+ str = ':'
+ else:
+ str = '["%s"]:' % p.label
+ msg += ' ROOTFS_DIR%s%s\n' % (str.ljust(20), p.get_rootfs())
+
+ msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
+ msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
+ msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot
msger.info(msg)
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 887195f..6b575c0 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -59,6 +59,19 @@ class Wic_PartData(Mic_PartData):
return retval
+ def get_rootfs(self):
+ """
+ Acessor for rootfs dir
+ """
+ return self.rootfs
+
+ def set_rootfs(self, rootfs):
+ """
+ Acessor for actual rootfs dir, which must be set by source
+ plugins.
+ """
+ self.rootfs = rootfs
+
def get_size(self):
"""
Accessor for partition size, 0 or --size before set_size().
diff --git a/scripts/lib/mic/plugins/source/rootfs.py b/scripts/lib/mic/plugins/source/rootfs.py
index da7aa0b..83aec45 100644
--- a/scripts/lib/mic/plugins/source/rootfs.py
+++ b/scripts/lib/mic/plugins/source/rootfs.py
@@ -54,5 +54,6 @@ class RootfsPlugin(SourcePlugin):
if part.rootfs:
rootfs_dir = part.rootfs
+ part.set_rootfs(rootfs_dir)
part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot)
--
1.8.3.2
next prev parent reply other threads:[~2014-03-29 3:12 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-15 21:17 [PATCH 0/5] wic: Add --rootfs option to --source param João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 1/5] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 2/5] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 3/5] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 4/5] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-15 21:17 ` [PATCH 5/5] wic: Add option --rootfs to --source João Henrique Ferreira de Freitas
2014-03-17 14:53 ` [PATCH 0/5] wic: Add --rootfs option to --source param Otavio Salvador
2014-03-17 15:47 ` João Henrique Freitas
2014-03-17 16:11 ` Otavio Salvador
2014-03-17 16:20 ` João Henrique Freitas
2014-03-31 1:52 ` João Henrique Ferreira de Freitas
2014-03-31 14:39 ` Tom Zanussi
2014-03-31 16:29 ` João Henrique Freitas
2014-03-21 15:54 ` Tom Zanussi
2014-03-23 2:25 ` João Henrique Ferreira de Freitas
2014-03-24 20:13 ` Tom Zanussi
2014-03-25 2:28 ` João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 0/7] " João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 6/7] wic: Report all ROOTFS_DIR artifacts João Henrique Ferreira de Freitas
2014-03-26 2:42 ` [PATCH v2 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-27 20:15 ` [PATCH v2 0/7] wic: Add --rootfs option to --source param Tom Zanussi
2014-03-27 22:12 ` João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 " João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 6/7] wic: Report all ROOTFS_DIR artifacts João Henrique Ferreira de Freitas
2014-03-27 22:07 ` [PATCH v3 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-28 21:38 ` [PATCH v3 0/7] wic: Add --rootfs option to --source param Tom Zanussi
2014-03-29 3:24 ` João Henrique Ferreira de Freitas
2014-03-29 19:04 ` Tom Zanussi
2014-03-29 3:12 ` [PATCH v4 " João Henrique Ferreira de Freitas
2014-03-29 3:12 ` [PATCH v4 1/7] wic: Add RootfsPlugin João Henrique Ferreira de Freitas
2014-03-29 3:12 ` [PATCH v4 2/7] wic: Hook up RootfsPlugin plugin João Henrique Ferreira de Freitas
2014-03-29 3:12 ` [PATCH v4 3/7] wic: Add rootfs_dir argument to do_prepare_partition() method João Henrique Ferreira de Freitas
2014-03-29 3:12 ` [PATCH v4 4/7] wic: Use partition label to be part of rootfs filename João Henrique Ferreira de Freitas
2014-03-29 3:12 ` [PATCH v4 5/7] wic: Add option --rootfs-dir to --source João Henrique Ferreira de Freitas
2014-03-29 3:12 ` João Henrique Ferreira de Freitas [this message]
2014-03-29 3:12 ` [PATCH v4 7/7] wic: Extend --rootfs-dir to connect rootfs-dirs João Henrique Ferreira de Freitas
2014-03-29 19:09 ` [PATCH v4 0/7] wic: Add --rootfs option to --source param Tom Zanussi
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=1396062728-9140-7-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