-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimage-kapernikov.bb
42 lines (28 loc) · 1011 Bytes
/
image-kapernikov.bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
SUMMARY = "Kapernikov image"
IMAGE_FEATURES += "splash ssh-server-openssh read-only-rootfs overlayfs-etc"
DEPENDS:append = " grub-native"
OVERLAYFS_ETC_MOUNT_POINT = "/data"
OVERLAYFS_ETC_DEVICE = "/dev/disk/by-label/data"
OVERLAYFS_ETC_FSTYPE ?= "btrfs"
OVERLAYFS_ETC_INIT_TEMPLATE = "${FILE_DIRNAME}/image-kapernikov/overlayfs-etc-preinit-kpv.sh.in"
IMAGE_INSTALL = "\
packagegroup-core-boot \
packagegroup-core-full-cmdline \
${CORE_IMAGE_EXTRA_INSTALL} \
"
MYCOUNTER = "6"
inherit core-image
do_create_data_dir() {
mkdir -p "${IMAGE_ROOTFS}/data"
}
do_image_wic[depfiles] += "${FILE_DIRNAME}/image-kapernikov/grub.cfg"
GRUB_ENV ?= "${S}/grub.env"
do_before_wic() {
grub-editenv ${GRUB_ENV} create
grub-editenv ${GRUB_ENV} set rootfs="B"
grub-editenv ${GRUB_ENV} set ustate="0"
}
IMAGE_EFI_BOOT_FILES:append = " ${GRUB_ENV};EFI/BOOT/grub.env"
addtask create_data_dir before do_rootfs
addtask before_wic before do_image_wic after do_rootfs
WKS_FILE = "kpv.wks.in"