diff options
author | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2004-11-17 07:53:50 +0000 |
---|---|---|
committer | nslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net> | 2004-11-17 07:53:50 +0000 |
commit | 655aa8c859a04f87a9a07a52a2b700c644082aa5 (patch) | |
tree | 81618d5a9beab43d297bea8c505e8322e4bdb0aa /busybox/switchbox-1.00/linuxrc | |
parent | 259cbc30feb02f7e320db981a88354919daa0537 (diff) |
Merge bk://openembedded.bkbits.net/packages-devel
into bkbits.net:/repos/n/nslu2-linux/packages
2004/11/17 07:16:00+10:30 (none)!rwhitby
Unslung now generates jffs2 images too
2004/11/16 22:13:02+10:30 (none)!rwhitby
Switchbox now drops to shell if a valid rootfs cannot be mounted
2004/11/16 21:51:03+10:30 (none)!rwhitby
Changed switchbox back to ext2.gz
2004/11/16 20:07:19+10:30 (none)!rwhitby
Merge
2004/11/16 20:05:22+10:30 (none)!rwhitby
Created switchbox distro
2004/11/16 00:14:27-08:00 bkbits.net!nslu2-linux.adm
Merge bk://openembedded.bkbits.net/packages-devel
into bkbits.net:/repos/n/nslu2-linux/packages
2004/11/16 00:12:50-08:00 bkbits.net!nslu2-linux.adm
Merge bk://openembedded.bkbits.net/packages
into bkbits.net:/repos/n/nslu2-linux/packages
2004/11/15 22:52:37-08:00 (none)!jacques
added nslu2-linksys-libs to UNSLUNG_BASE_PACKAGES
removed makedevs
2004/11/15 19:28:14-08:00 (none)!jacques
Removed unslung specific references from the switchbox linuxrc jffs2 stanza
changed /bin/echo "0x1f04" to /bin/echo "0x0100" in ramfs stanza
2004/11/15 19:18:28-08:00 (none)!jacques
removed init from switchbox and added loop block dev builtin to -able kernel
BKrev: 419b038ez0VSSujPdTan9b9QhMaDrw
Diffstat (limited to 'busybox/switchbox-1.00/linuxrc')
-rw-r--r-- | busybox/switchbox-1.00/linuxrc | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/busybox/switchbox-1.00/linuxrc b/busybox/switchbox-1.00/linuxrc index e69de29bb2..1368b418a7 100644 --- a/busybox/switchbox-1.00/linuxrc +++ b/busybox/switchbox-1.00/linuxrc @@ -0,0 +1,68 @@ +#!/bin/sh + +mounted= + +/bin/mount -t proc proc /proc +/bin/echo "0x0100" > /proc/sys/kernel/real-root-dev + +/bin/sleep 10 + +if [ -z "$mounted" ] && /bin/mount -rt ext3 /dev/sda2 /mnt/tmpmnt ; then + + if [ -x /mnt/tmpmnt/bin/init ] && + [ -d /mnt/tmpmnt/unslung ] && [ -r /mnt/tmpmnt/.unslung ] ; then + /bin/echo "Root filesystem will be mounted from /dev/sda2 ..." + /bin/echo "Firmware Version: `/bin/cat /mnt/tmpmnt/.unslung`" + mounted=/mnt/tmpmnt + /bin/echo "0x0802" > /proc/sys/kernel/real-root-dev + [ -r $mounted/unslung/rc.linuxrc ] && . $mounted/unslung/rc.linuxrc + fi + + /bin/umount /mnt/tmpmnt +fi + +if [ -z "$mounted" ] && /bin/mount -rt ext3 /dev/sdb2 /mnt/tmpmnt ; then + + if [ -x /mnt/tmpmnt/bin/init ] && + [ -d /mnt/tmpmnt/unslung ] && [ -r /mnt/tmpmnt/.unslung ] ; then + /bin/echo "Root filesystem will be mounted from /dev/sdb2 ..." + /bin/echo "Firmware Version: `/bin/cat /mnt/tmpmnt/.unslung`" + mounted=/mnt/tmpmnt + /bin/echo "0x0812" > /proc/sys/kernel/real-root-dev + [ -r $mounted/unslung/rc.linuxrc ] && . $mounted/unslung/rc.linuxrc + fi + + /bin/umount /mnt/tmpmnt +fi + +if [ -z "$mounted" ] && /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/tmpmnt ; then + + if [ -x /mnt/tmpmnt/bin/init ] ; then + /bin/echo "Root filesystem will be mounted from /dev/mtdblock4 ..." + mounted=/mnt/tmpmnt + /bin/echo "0x1f04" > /proc/sys/kernel/real-root-dev + fi + + /bin/umount /mnt/tmpmnt +fi + +if [ -z "$mounted" ] ; then + if [ -x /mnt/tmpmnt/bin/init ] && + [ -d /mnt/tmpmnt/unslung ] && [ -r /mnt/tmpmnt/.unslung ] ; then + /bin/echo "Root filesystem will be mounted from /dev/ram0 ..." + /bin/echo "Firmware Version: `/bin/cat /.unslung`" + mounted=/mnt/tmpmnt + /bin/echo "0x0100" > /proc/sys/kernel/real-root-dev + [ -r $mounted/unslung/rc.linuxrc ] && . $mounted/unslung/rc.linuxrc + fi +fi + +if [ -z "$mounted" ] ; then + /bin/echo "Root filesystem cannot be found - dropping into shell ..." + echo "5" > /proc/sys/kernel/panic + exec /bin/sh +fi + +/bin/umount /proc + +exit 0 |