]> code.ossystems Code Review - openembedded-core.git/commitdiff
initramfs-live-boot-tiny: Create the initramfs-live-boot-tiny recipe
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>
Wed, 22 Nov 2017 17:09:30 +0000 (09:09 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 2 Dec 2017 11:24:37 +0000 (11:24 +0000)
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).

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/images/core-image-tiny-initramfs.bb
meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb [new file with mode: 0644]

index 16995e6580acaca919c0dd19ca875fbea513bb5e..51d08a0cd1c2808a3c79bf2008d58f0add53a872 100644 (file)
@@ -5,7 +5,7 @@ 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 packagegroup-core-boot dropbear ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+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 = ""
diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot-tiny_1.0.bb
new file mode 100644 (file)
index 0000000..7a9a8ec
--- /dev/null
@@ -0,0 +1,21 @@
+SUMMARY = "Live image init script"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+RDEPENDS_${PN} = "busybox-mdev"
+SRC_URI = "file://init-live.sh"
+
+PR = "r12"
+
+S = "${WORKDIR}"
+
+do_install() {
+        install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
+        install -d ${D}/dev
+        mknod -m 622 ${D}/dev/console c 5 1
+}
+
+FILES_${PN} += " /init /dev "
+
+# Due to kernel dependency
+PACKAGE_ARCH = "${MACHINE_ARCH}"