summaryrefslogtreecommitdiff
path: root/packages/initrdscripts
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-06-10 22:59:35 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-06-10 22:59:35 +0000
commit5d068b368f9b6858395ca99067d9d3aa64734c65 (patch)
tree8c82c66241daef7e375614f0f04b23e764902b7d /packages/initrdscripts
parent87430e7e8acbaac6495c2ff0a2747d7341ef443a (diff)
initramfs-nfsboot 0.1: Sample initramfs script to boot from NFS.
* Need too add parsing of kernel cmdline instead of hardcoded params.
Diffstat (limited to 'packages/initrdscripts')
-rw-r--r--packages/initrdscripts/files/.mtn2git_empty0
-rw-r--r--packages/initrdscripts/files/nfsboot.sh10
-rw-r--r--packages/initrdscripts/initramfs-nfsboot_0.1.bb8
3 files changed, 18 insertions, 0 deletions
diff --git a/packages/initrdscripts/files/.mtn2git_empty b/packages/initrdscripts/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/initrdscripts/files/.mtn2git_empty
diff --git a/packages/initrdscripts/files/nfsboot.sh b/packages/initrdscripts/files/nfsboot.sh
new file mode 100644
index 0000000000..bb689fa3b8
--- /dev/null
+++ b/packages/initrdscripts/files/nfsboot.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+echo "Starting initramfs boot..."
+mkdir /proc
+mount -t proc proc /proc
+ifconfig eth0 192.168.20.230
+mkdir /mnt
+mount -t nfs 192.168.20.210:/home/nfs/Angstrom-opie-image-test-h4000 /mnt
+cd /mnt
+exec switch_root -c /dev/console /mnt /sbin/init
diff --git a/packages/initrdscripts/initramfs-nfsboot_0.1.bb b/packages/initrdscripts/initramfs-nfsboot_0.1.bb
new file mode 100644
index 0000000000..1a4d48813b
--- /dev/null
+++ b/packages/initrdscripts/initramfs-nfsboot_0.1.bb
@@ -0,0 +1,8 @@
+SRC_URI = "file://nfsboot.sh"
+PR = "r0"
+
+do_install() {
+ install -m 0755 ${WORKDIR}/nfsboot.sh ${D}/init
+}
+
+FILES_${PN} += " /init "