1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-08 06:28:23 +01:00

add initramfs recipe

This commit is contained in:
DanyLE 2023-08-01 12:06:45 +02:00
parent 453785a03d
commit 3cfd696935
3 changed files with 36 additions and 3 deletions

View File

@ -14,7 +14,7 @@ LAYERSERIES_COMPAT_meta-rpi-diya = "mickledore"
PACKAGE_CLASSES = "package_ipk"
INITRAMFS_IMAGE="core-image-tiny-initramfs"
INITRAMFS_IMAGE="core-image-recovery"
INITRAMFS_IMAGE_BUNDLE="0"
INHERIT += "rm_work"
@ -41,7 +41,7 @@ ENABLE_DWC2_PERIPHERAL = "1"
ENABLE_DWC2_HOST = "1"
ENABLE_USB_U_BOOT = "0"
ENABLE_UART = "1"
ENABLE_UART = "0"
DISABLE_SPLASH = "1"
VIDEO_CAMERA = "1"

View File

@ -12,7 +12,7 @@ EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
usermod -a -G avahi diya; \
usermod -a -G sudo diya \
"
IMAGE_BOOT_FILES:append = "fs_resize core-image-tiny-initramfs-${MACHINE}.cpio.gz "
IMAGE_BOOT_FILES:append = "fs_resize core-image-recovery-${MACHINE}.cpio.gz "
IMAGE_INSTALL:append = "libcurl \
libdrm \

View File

@ -0,0 +1,33 @@
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;"