summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/image.py
Commit message (Collapse)AuthorAgeFilesLines
* image.py: check file exists before deletingLaurentiu Palcu2014-03-301-1/+2
| | | | | | | | | | | | When RM_OLD_IMAGE = "1", we delete old images but we didn't check they actually exist... [YOCTO #6029] (From OE-Core rev: 8910d3cc94899ab4d509e681b438ae96218fa777) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.py, rootfs.py, package_manager.py: redirect stderr to stdout when ↵Laurentiu Palcu2014-03-071-1/+1
| | | | | | | | | | | | | | | | | | | calling check_output() If a command executed with subprocess.check_output() fails, the subprocess.CalledProcessError.output contains only STDOUT and the user needs to check the log.do_rootfs to see any other details. This commit forwards stderr to stdout so that, in case of failure, the entire error output will be displayed in terminal. [YOCTO #5902] (From OE-Core rev: 4661f1441429952f30e19cebd93dc42ce31fd868) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: add image dependency mechanismLaurentiu Palcu2014-02-201-91/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a dependency mechanism to image creation, so that we can split the images creation execution in groups, that can be executed in parallel, having the dependencies satisfied in the same time. The old code didn't need this since everything was serialized. Technically, it adds a dependency graph topological sort class that the main Image class can use to sort out the dependencies. Images that have dependencies have to declare them using the NEW IMAGE_TYPEDEP variable, like in the example below: For: IMAGE_FSTYPES = "i1 i2 i3 i4 i5" IMAGE_TYPEDEP_i4 = "i2" IMAGE_TYPEDEP_i5 = "i6 i4" IMAGE_TYPEDEP_i6 = "i7" IMAGE_TYPEDEP_i7 = "i2" We'll get the following image groups, sorted out by their dependencies: [['i1', 'i3', 'i2'], ['i4', 'i7'], ['i6'], ['i5']] The algorithm can probably be optimized but, given the small size of the graphs, it'll do. [YOCTO #5830] (From OE-Core rev: db9dd4b4ef9120baccbccae77d9c31f54a6eb9a1) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "lib/oe/image.py: fix working directory"Richard Purdie2014-02-181-1/+1
| | | | | | | | | | | This reverts commit 3f49597225a58965124503ca5f3cc4011b04b3c0. This change appears to cause more problems than it fixes since the compression commands usually work in the deploy dir but the archive ones have always worked in the rootfs dir (which is clear from the tar command we use). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix working directoryJonathan Liu2014-02-171-1/+1
| | | | | | | | | | The working directory needs to be changed before the image creation commands instead of afterwards. (From OE-Core rev: 9d9bca8785911e8ae06d507bbfb99d6a811f072e) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: sum.jffs2 is replaced by jffs2.sumDmitry Eremin-Solenikov2014-02-141-3/+0
| | | | | | | | | | Previous commit added support for sum 'compression' (rather postprocessing) of jffs2 images. Drop support for sum.jffs2 image type. (From OE-Core rev: 295c6c1452c8789a8b1d0090ff09a5cd7cf16507) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.py, package_manager.py, rootfs.py: dump command output on errorLaurentiu Palcu2014-02-111-2/+2
| | | | | | | | | Print the entire command output in case of errors. (From OE-Core rev: 2253c9ac2caa61dee0bd4fea04d4d77b79be7b36) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix image size calculation routineLaurentiu Palcu2014-02-111-2/+2
| | | | | | | | | | The IMAGE_ROOTFS_EXTRA_SPACE value was not correctly added to the base size. (From OE-Core rev: f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix get rootfs_extra_space failedHongxu Jia2014-02-111-1/+1
| | | | | | | | | | | The value of IMAGE_ROOTFS_EXTRA_SPACE is "0 + 51200", we should use eval rather than int in python. (From OE-Core rev: dd3418e2db732ca1bc78fd93efa3f08da88a1183) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: add new image creation libraryLaurentiu Palcu2014-02-111-0/+239
This will replace the old bash image creation code. This needs the rootfs to be already generated in order to work. Usage: Image(d).create() or using the provided wrapper function: create_image(d) (From OE-Core rev: b75b78ce534fbf0d4de2f7f66af5b721d68b7471) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>