diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2017-09-15 12:42:36 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-09-15 14:13:16 -0700 |
commit | 989db4c0e7db84e52b4e564101a974ef59f1bba6 (patch) | |
tree | 8d042fa036b048fc1b97f5987b2b84346356a8c5 /common/recipes-core/images/core-image-tiny.bb | |
parent | ee44757ff32135411bc17901213e282eb32f0862 (diff) | |
download | meta-intel-989db4c0e7db84e52b4e564101a974ef59f1bba6.tar.gz |
core-image-tiny: Provide a new image recipe for poky-tiny that boots from RAM
This new image recipe creates an image from the artifacts
obtained after building core-image-tiny-initramfs, it boots
directly to a tiny rootfs provided by initrd
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Diffstat (limited to 'common/recipes-core/images/core-image-tiny.bb')
-rw-r--r-- | common/recipes-core/images/core-image-tiny.bb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-core/images/core-image-tiny.bb b/common/recipes-core/images/core-image-tiny.bb new file mode 100644 index 00000000..ed39fd77 --- /dev/null +++ b/common/recipes-core/images/core-image-tiny.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "A tiny image just capable of allowing a device to boot from RAM, \ | ||
2 | this image recipe generates an image file which rather boots from initrd than \ | ||
3 | from storage, it achieves this by using wic to pick up the artifacts generated \ | ||
4 | by the core-image-tiny-initramfs image" | ||
5 | |||
6 | # The actual rootfs/initrd will be the one from core-image-tiny-initramfs, so | ||
7 | # we reset IMAGE_INSTALL to avoid building other things that will be pointless | ||
8 | IMAGE_INSTALL = "" | ||
9 | |||
10 | # Do not pollute the initrd image with rootfs features | ||
11 | IMAGE_FEATURES = "" | ||
12 | |||
13 | IMAGE_LINGUAS = " " | ||
14 | |||
15 | LICENSE = "MIT" | ||
16 | |||
17 | IMAGE_ROOTFS_SIZE ?= "8192" | ||
18 | |||
19 | IMAGE_FSTYPES = "wic" | ||
20 | inherit core-image | ||
21 | |||
22 | # We get some parts from image-live that we need in order to boot from initrd | ||
23 | INITRD_IMAGE_LIVE ?= "core-image-tiny-initramfs" | ||
24 | |||
25 | python() { | ||
26 | image_b = d.getVar('IMAGE_BASENAME') | ||
27 | initrd_i = d.getVar('INITRD_IMAGE_LIVE') | ||
28 | if image_b == initrd_i: | ||
29 | bb.error('INITRD_IMAGE_LIVE %s cannot use the requested IMAGE_FSTYPE' % initrd_i) | ||
30 | bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.') | ||
31 | elif initrd_i: | ||
32 | d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i) | ||
33 | } | ||
34 | |||
35 | WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in" | ||
36 | WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in" | ||
37 | WKS_FILE_intel-quark = "mktinygalileodisk.wks" | ||