wic bugfix and improvements
cover wic bugfix and improvements
Hi,
This patchset contains a changes suggested by QA team. Daniel, thank you for suggestions!
The following changes since commit d4585fa23d56a58c583ee33db067a23177a936b1:
bsps: update 3.14 SRCREVs (2015-09-09 14:27:57 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/wic/misc
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/misc
Ed Bartosh (3):
wic: add dependencies to wic-image-minimal recipe
wic: use ext4 in wic-image-minimal.wks
wic: fix partition size calculation
meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 ++ meta-selftest/recipes-test/images/wic-image-minimal.wks | 6 +++--- scripts/lib/wic/imager/direct.py | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-)
--
Ed
PATCH 1/3 wic: add dependencies to wic-image-minimal recipe
Added "DEPENDS =" line to the recipe to ensure that all tools required for image creation are built.
--- meta-selftest/recipes-test/images/wic-image-minimal.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-selftest/recipes-test/images/wic-image-minimal.bb +2 -0
@@ -5,6 +5,8 @@ IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}" IMAGE_FSTYPES = "wic.bz2" RM_OLD_IMAGE = "1" +DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-native" + # core-image-minimal is referenced in .wks, so we need its rootfs # to be ready before our rootfs do_rootfs[depends] += "core-image-minimal:do_rootfs"
Signature · 1 line
2.1.4
PATCH 2/3 wic: use ext4 in wic-image-minimal.wks
In reply to Ed Bartoshext4 is used in canned wks files, so let's use it here too for the sake of consistency.
--- meta-selftest/recipes-test/images/wic-image-minimal.wks | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta-selftest/recipes-test/images/wic-image-minimal.wks +3 -3
@@ -3,8 +3,8 @@ # created from core-image-minimal and wic-image-minimal image recipes. part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext2 --label platform --align 1024 -part /core --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext2 --label core --align 1024 -part /backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext2 --label backup --align 1024 +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 +part /core --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024 +part /backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label backup --align 1024 bootloader --timeout=0 --append="rootwait console=tty0"
Signature · 1 line
2.1.4
PATCH 3/3 wic: fix partition size calculation
In reply to Ed BartoshIt was wrongly assumed that part.size is meagured in Mb. In fact it's in Kb, so there is no need to convert bitbake variable ROOTFS_SIZE as it's also in Kb.
--- scripts/lib/wic/imager/direct.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/lib/wic/imager/direct.py +1 -2
@@ -241,8 +241,7 @@ class DirectImageCreator(BaseImageCreator): # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name) if rsize_bb: - # convert from Kb to Mb - part.size = int(round(float(rsize_bb) / 1024.)) + part.size = int(round(float(rsize_bb))) # need to create the filesystems in order to get their # sizes before we can add them and do the layout. # Image.create() actually calls __format_disks() to create
Signature · 1 line
2.1.4