summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/recipes-core/images/core-image-tiny-initramfs.bbappend11
-rw-r--r--common/recipes-core/images/core-image-tiny.bb37
-rw-r--r--wic/core-image-tiny.wks.in (renamed from wic/systemd-bootdisk-tiny64.wks)6
-rw-r--r--wic/systemd-bootdisk-tiny32.wks8
4 files changed, 40 insertions, 22 deletions
diff --git a/common/recipes-core/images/core-image-tiny-initramfs.bbappend b/common/recipes-core/images/core-image-tiny-initramfs.bbappend
deleted file mode 100644
index 6fe2d7c4..00000000
--- a/common/recipes-core/images/core-image-tiny-initramfs.bbappend
+++ /dev/null
@@ -1,11 +0,0 @@
1# Set WKS file depending on the MACHINE picked by the user applies
2# only when using an Intel MACHINE, otherwise leaves it as it is.
3
4python (){
5 if d.getVar('MACHINE', True) == "intel-core2-32":
6 d.setVar('WKS_FILE', "systemd-bootdisk-tiny32.wks")
7 elif d.getVar('MACHINE', True) == "intel-corei7-64":
8 d.setVar('WKS_FILE', "systemd-bootdisk-tiny64.wks")
9 elif d.getVar('MACHINE', True) == "intel-quark":
10 d.setVar('WKS_FILE', "mktinygalileodisk.wks")
11}
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 @@
1SUMMARY = "A tiny image just capable of allowing a device to boot from RAM, \
2this image recipe generates an image file which rather boots from initrd than \
3from storage, it achieves this by using wic to pick up the artifacts generated \
4by 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
8IMAGE_INSTALL = ""
9
10# Do not pollute the initrd image with rootfs features
11IMAGE_FEATURES = ""
12
13IMAGE_LINGUAS = " "
14
15LICENSE = "MIT"
16
17IMAGE_ROOTFS_SIZE ?= "8192"
18
19IMAGE_FSTYPES = "wic"
20inherit core-image
21
22# We get some parts from image-live that we need in order to boot from initrd
23INITRD_IMAGE_LIVE ?= "core-image-tiny-initramfs"
24
25python() {
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
35WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in"
36WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in"
37WKS_FILE_intel-quark = "mktinygalileodisk.wks"
diff --git a/wic/systemd-bootdisk-tiny64.wks b/wic/core-image-tiny.wks.in
index c957572a..b0decae6 100644
--- a/wic/systemd-bootdisk-tiny64.wks
+++ b/wic/core-image-tiny.wks.in
@@ -1,9 +1,9 @@
1# short-description: Create an EFI disk image with systemd-boot and corei7-64 1# short-description: Create an EFI disk image with systemd-boot and corei7-64/core2-32
2# long-description: Creates a partitioned EFI disk image that the user 2# long-description: Creates a partitioned EFI disk image that the user
3# can directly dd to boot media. The selected bootloader is systemd-boot. 3# can directly dd to boot media. The selected bootloader is systemd-boot.
4# This disk image is meant to be used by corei7-64 and core-image-tiny-initramfs 4# This disk image is meant to be used by corei7-64/core2-32 and core-image-tiny-initramfs
5 5
6part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-intel-corei7-64.cpio.gz" --ondisk sda --label msdos --active --align 1024 6part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-${MACHINE}.cpio.gz" --ondisk sda --label msdos --active --align 1024
7 7
8bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5" 8bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5"
9 9
diff --git a/wic/systemd-bootdisk-tiny32.wks b/wic/systemd-bootdisk-tiny32.wks
deleted file mode 100644
index c4011c0e..00000000
--- a/wic/systemd-bootdisk-tiny32.wks
+++ /dev/null
@@ -1,8 +0,0 @@
1# short-description: Create an EFI disk image with systemd-boot and core2-32
2# long-description: Creates a partitioned EFI disk image that the user
3# can directly dd to boot media. The selected bootloader is systemd-boot.
4# This disk image is meant to be used by core2-32 and core-image-tiny-initramfs
5
6part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-intel-core2-32.cpio.gz" --ondisk sda --label msdos --active --align 1024
7
8bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5"