[oe-commits] Ed Bartosh : wic-image-minimal: add wic image recipe and .wks

git at git.openembedded.org git at git.openembedded.org
Wed Sep 9 21:58:23 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 4f708d5d35ecb1890cb97accd8c18a68bab72f9c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4f708d5d35ecb1890cb97accd8c18a68bab72f9c

Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date:   Wed Aug 19 17:29:53 2015 +0300

wic-image-minimal: add wic image recipe and .wks

Added example of recipe and .wks file to create partitioned image.

This image is using quite complex partitioning scheme.
It uses its own rootfs to populate two partitions in two different ways.
It also uses core-image-minimal rootfs to populate another partition.

This is how wic reports about artifacts used to create this image:
  ROOTFS_DIR: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/core"]: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/backup"]: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share
  KERNEL_DIR: tmp/deploy/images/qemux86-64
  NATIVE_SYSROOT: tmp/sysroots/x86_64-linux

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>

Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/recipes-extended/images/wic-image-minimal.bb  | 14 ++++++++++++++
 meta/recipes-extended/images/wic-image-minimal.wks | 10 ++++++++++
 2 files changed, 24 insertions(+)

diff --git a/meta/recipes-extended/images/wic-image-minimal.bb b/meta/recipes-extended/images/wic-image-minimal.bb
new file mode 100644
index 0000000..073c569
--- /dev/null
+++ b/meta/recipes-extended/images/wic-image-minimal.bb
@@ -0,0 +1,14 @@
+SUMMARY = "An example of partitioned image."
+
+IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
+
+IMAGE_FSTYPES = "wic.bz2"
+RM_OLD_IMAGE = "1"
+
+# 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"
+
+IMAGE_ROOTFS_EXTRA_SPACE = "2000"
+
+inherit image
diff --git a/meta/recipes-extended/images/wic-image-minimal.wks b/meta/recipes-extended/images/wic-image-minimal.wks
new file mode 100644
index 0000000..29cd8f2
--- /dev/null
+++ b/meta/recipes-extended/images/wic-image-minimal.wks
@@ -0,0 +1,10 @@
+# short-description: Example of partitioned image with complex layout
+# long-description: This image contains boot partition and 3 rootfs partitions
+# 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
+
+bootloader  --timeout=0  --append="rootwait console=tty0"



More information about the Openembedded-commits mailing list