1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-09-07 04:04:41 +02:00
meta-rpi-diya/recipes-core/images/core-image-recovery.bb
2023-08-01 12:06:45 +02:00

33 lines
856 B
BlitzBasic

DESCRIPTION = "Recovery initramfs image."
PACKAGE_INSTALL = "busybox ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
export IMAGE_BASENAME = "${MLPREFIX}core-image-recovery"
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
# Use the same restriction as initramfs-module-install
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
python tinyinitrd () {
# Modify our init file so the user knows we drop to shell prompt on purpose
newinit = "/bin/busybox sh init"
with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init:
init.write(newinit)
}
IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"