aboutsummaryrefslogtreecommitdiffstats
path: root/packages/openslug-init
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-06-05 22:36:28 +0000
committerJohn Bowler <jbowler@nslu2-linux.org>2005-06-05 22:36:28 +0000
commit82d857100b28a0290601b9e58da03ee4d6b296c6 (patch)
tree6ec5aee829917eda98733d0a98af0293dd9b90f7 /packages/openslug-init
parent4e3c5b6d8b81df8f822ac9b582863fb00dd75dac (diff)
downloadopenembedded-82d857100b28a0290601b9e58da03ee4d6b296c6.tar.gz
Minor fix to /boot/ram to use tmpfs not ext2 - reduces dependencies
and makes the maximum possible / fs much larger. BKrev: 42a37e6cX570csIpo9VcaEP12_79Zw
Diffstat (limited to 'packages/openslug-init')
-rw-r--r--packages/openslug-init/openslug-init-0.10/boot/ram47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/boot/ram b/packages/openslug-init/openslug-init-0.10/boot/ram
index e69de29bb2..66d46a7089 100644
--- a/packages/openslug-init/openslug-init-0.10/boot/ram
+++ b/packages/openslug-init/openslug-init-0.10/boot/ram
@@ -0,0 +1,47 @@
+#!/bin/sh
+# boot from the hard disk partition "$1" (which
+# must be given) using options from the rest of
+# the command line.
+#
+/sbin/leds -A '!gr'
+#
+# Use the standard init path (see /etc/init.d/rcS)
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+#
+# Load the helper functions
+. /etc/default/functions
+#
+if test -n "$1"
+then
+ device="$1"
+ shift
+ echo "boot: rootfs: mount $* $device"
+ #
+ # prepare the device. This uses tmpfs to avoid dependency
+ # on non-built-in file systems and because tmpfs can expand
+ # to bigger than the 10MByte ram0 partition used before.
+ # The 'device' is currently unused.
+ if mount -t tmpfs "$@" tmpfs /mnt
+ then
+ cd /
+ # filter out boot (with zimage), linuxrc and anything
+ # below /var, keep dev or the boot will fail (note that
+ # nothing is mounted this early in the bootstrap).
+ find . -mount -print |
+ sed '\@^./boot/@d;\@^./boot$@d;\@^./linuxrc@d;\@^./var/@d' |
+ cpio -p -d -m -u /mnt
+ # checkmount checks for sh, init and no .recovery plus
+ # either mnt or initrd, mnt must exist!
+ if checkmount /mnt
+ then
+ # pivot to /mnt
+ cd /
+ swivel mnt mnt
+ # swivel failed
+ fi
+ # Failure: unmount the partition.
+ umount /mnt
+ fi
+fi
+# fallback - use the flash boot
+exec /boot/flash