Files
poky/meta/recipes-core/images/core-image-tiny-initramfs.bb
Alejandro Hernandez 885ff683f0 initramfs-live-boot-tiny: Create the initramfs-live-boot-tiny recipe
The original initramfs-live-boot recipe RDEPENDS on udev, which is ok since
the init script relies some of its functionality on udevadm and such,
but on core-image-tiny-initramfs the init script simply drops to shell
after a basic setup, so udev is not needed.

This patch splits up an initramfs-live-boot-tiny recipe which does not
use udev, but uses busybox-mdev instead, eudev installed about 600
extra Kilobytes to core-image-tiny-initramfs userspace, by avoiding to
install eudev we achieve an even smaller footprint (almost 40% smaller).

(From OE-Core rev: 7725bad91b89a291a7099b2d99789a86b028f329)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02 11:25:33 +00:00

44 lines
1.6 KiB
BlitzBasic

# Simple initramfs image artifact generation for tiny images.
DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
actually generate an image but rather generates boot and rootfs artifacts \
that can subsequently be picked up by external image generation tools such as wic."
PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
export IMAGE_BASENAME = "core-image-tiny-initramfs"
IMAGE_LINGUAS = ""
LICENSE = "MIT"
# don't actually generate an image, just the artifacts needed for one
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
BAD_RECOMMENDATIONS += "busybox-syslog"
# Use the same restriction as initramfs-live-install
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
python tinyinitrd () {
# Modify our init file so the user knows we drop to shell prompt on purpose
newinit = None
with open(d.expand('${IMAGE_ROOTFS}/init'), 'r') as init:
newinit = init.read()
newinit = newinit.replace('Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell ', 'Poky Tiny Reference Distribution:')
with open(d.expand('${IMAGE_ROOTFS}/init'), 'w') as init:
init.write(newinit)
}
IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
QB_KERNEL_CMDLINE_APPEND += "debugshell=3 init=/bin/busybox sh init"