summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-03-29 00:12:07 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-30 10:10:35 +0100
commit3c0038488491374e745ebcfbd091c3f28cc8c089 (patch)
treef4f648636ff10efb3573bf8677e5ee24c1ea88e9 /scripts/lib
parent13afd358682b8edc5c6a33f64ab32977030bfd65 (diff)
downloadpoky-3c0038488491374e745ebcfbd091c3f28cc8c089.tar.gz
wic: Report all ROOTFS_DIR artifacts
When a .wks has more than one ROOTFS_DIR it's better to report all ROOTFS_DIR that was used to create the image. (From OE-Core rev: a8762f3be215678a6806cabe49647083f42323a8) 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.py18
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/partition.py13
-rw-r--r--scripts/lib/mic/plugins/source/rootfs.py1
3 files changed, 28 insertions, 4 deletions
diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py
index 1f2f8fcf9c..ac63c38903 100644
--- a/scripts/lib/mic/imager/direct.py
+++ b/scripts/lib/mic/imager/direct.py
@@ -321,15 +321,25 @@ class DirectImageCreator(BaseImageCreator):
321 """ 321 """
322 msg = "The new image(s) can be found here:\n" 322 msg = "The new image(s) can be found here:\n"
323 323
324 parts = self._get_parts()
325
324 for disk_name, disk in self.__instimage.disks.items(): 326 for disk_name, disk in self.__instimage.disks.items():
325 full_path = self._full_path(self.__imgdir, disk_name, "direct") 327 full_path = self._full_path(self.__imgdir, disk_name, "direct")
326 msg += ' %s\n\n' % full_path 328 msg += ' %s\n\n' % full_path
327 329
328 msg += 'The following build artifacts were used to create the image(s):\n' 330 msg += 'The following build artifacts were used to create the image(s):\n'
329 msg += ' ROOTFS_DIR: %s\n' % self.rootfs_dir 331 for p in parts:
330 msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir 332 if p.get_rootfs() is None:
331 msg += ' KERNEL_DIR: %s\n' % self.kernel_dir 333 continue
332 msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot 334 if p.mountpoint == '/':
335 str = ':'
336 else:
337 str = '["%s"]:' % p.label
338 msg += ' ROOTFS_DIR%s%s\n' % (str.ljust(20), p.get_rootfs())
339
340 msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir
341 msg += ' KERNEL_DIR: %s\n' % self.kernel_dir
342 msg += ' NATIVE_SYSROOT: %s\n' % self.native_sysroot
333 343
334 msger.info(msg) 344 msger.info(msg)
335 345
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 887195fa60..6b575c0e8d 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):
59 59
60 return retval 60 return retval
61 61
62 def get_rootfs(self):
63 """
64 Acessor for rootfs dir
65 """
66 return self.rootfs
67
68 def set_rootfs(self, rootfs):
69 """
70 Acessor for actual rootfs dir, which must be set by source
71 plugins.
72 """
73 self.rootfs = rootfs
74
62 def get_size(self): 75 def get_size(self):
63 """ 76 """
64 Accessor for partition size, 0 or --size before set_size(). 77 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 974d85409b..6323811183 100644
--- a/scripts/lib/mic/plugins/source/rootfs.py
+++ b/scripts/lib/mic/plugins/source/rootfs.py
@@ -54,5 +54,6 @@ class RootfsPlugin(SourcePlugin):
54 if part.rootfs: 54 if part.rootfs:
55 rootfs_dir = part.rootfs 55 rootfs_dir = part.rootfs
56 56
57 part.set_rootfs(rootfs_dir)
57 part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot) 58 part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot)
58 59