summaryrefslogtreecommitdiff
path: root/meta/packages/initrdscripts
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2008-11-05 13:50:06 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2008-11-05 13:53:09 +0100
commit6e7061263e65601c82f37eb5d4ca5cc3b7876df6 (patch)
treeebb0034e25fbad46d8d41d4978fc61535a3f6dd5 /meta/packages/initrdscripts
parent97cbee6239af91e856a4275819cd7c3f727b72e8 (diff)
downloadopenembedded-core-6e7061263e65601c82f37eb5d4ca5cc3b7876df6.tar.gz
openembedded-core-6e7061263e65601c82f37eb5d4ca5cc3b7876df6.tar.bz2
openembedded-core-6e7061263e65601c82f37eb5d4ca5cc3b7876df6.tar.xz
openembedded-core-6e7061263e65601c82f37eb5d4ca5cc3b7876df6.zip
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.
Diffstat (limited to 'meta/packages/initrdscripts')
-rw-r--r--meta/packages/initrdscripts/files/init-boot.sh8
-rw-r--r--meta/packages/initrdscripts/initramfs-boot_1.0.bb12
2 files changed, 20 insertions, 0 deletions
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 "