From 6e7061263e65601c82f37eb5d4ca5cc3b7876df6 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 5 Nov 2008 13:50:06 +0100 Subject: initrdscripts: Add the simplest init script When booting from initramfs, one must provide a /init link. This one is the simplest one, just forking a shell, allowing for the smallest initramfs. --- meta/packages/initrdscripts/files/init-boot.sh | 8 ++++++++ meta/packages/initrdscripts/initramfs-boot_1.0.bb | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 meta/packages/initrdscripts/files/init-boot.sh create mode 100644 meta/packages/initrdscripts/initramfs-boot_1.0.bb (limited to 'meta/packages') diff --git a/meta/packages/initrdscripts/files/init-boot.sh b/meta/packages/initrdscripts/files/init-boot.sh new file mode 100644 index 000000000..9d804fc3a --- /dev/null +++ b/meta/packages/initrdscripts/files/init-boot.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +mkdir /proc +mkdir /sys +mount -t proc proc /proc +mount -t sysfs sysfs /sys + +exec sh diff --git a/meta/packages/initrdscripts/initramfs-boot_1.0.bb b/meta/packages/initrdscripts/initramfs-boot_1.0.bb new file mode 100644 index 000000000..de3f932c8 --- /dev/null +++ b/meta/packages/initrdscripts/initramfs-boot_1.0.bb @@ -0,0 +1,12 @@ +DESCRIPTON = "A live image init script" + +SRC_URI = "file://init-boot.sh" + +PR = "r0" + +do_install() { + install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init +} + +PACKAGE_ARCH = "all" +FILES_${PN} += " /init " -- cgit v1.2.3