diff options
author | Rod Whitby <rod@whitby.id.au> | 2005-02-20 22:31:52 +0000 |
---|---|---|
committer | Rod Whitby <rod@whitby.id.au> | 2005-02-20 22:31:52 +0000 |
commit | a801b58bfe1cc81878c99ae495b669826c935fff (patch) | |
tree | 42ea6b2590cdd0692cf2e46a84d91028077ec756 /packages | |
parent | 91d7a639e99fb8a8823e561cb622e28c94f65ea0 (diff) |
Merge bk://nslu2-linux@nslu2-linux.bkbits.net/openembedded
into home.(none):/home/slug/openembedded
2005/02/21 09:00:48+10:30 (none)!rwhitby
Switchbox fixes for OpenSlug - sdX support
BKrev: 42190fd8qImxX_SqmdbaWvBIhYoJ9w
Diffstat (limited to 'packages')
-rw-r--r-- | packages/busybox/switchbox-1.00/linuxrc | 24 | ||||
-rw-r--r-- | packages/busybox/switchbox_1.00.bb | 2 |
2 files changed, 20 insertions, 6 deletions
diff --git a/packages/busybox/switchbox-1.00/linuxrc b/packages/busybox/switchbox-1.00/linuxrc index 9f6ae7869b..7ce4adbbdd 100644 --- a/packages/busybox/switchbox-1.00/linuxrc +++ b/packages/busybox/switchbox-1.00/linuxrc @@ -23,11 +23,21 @@ if [ -z "$mounted" ] && /bin/mount -rt jffs2 /dev/mtdblock4 /mnt/jffs2 ; then mounted= runboot= prefroot= + elif [ -f /mnt/jffs2/.sda1root ] ; then + /bin/echo "Preferred root device is /dev/sda1 (disk 1)" + mounted=/mnt/newroot + runboot=/bin/init + prefroot=sda1 elif [ -f /mnt/jffs2/.sda2root ] ; then /bin/echo "Preferred root device is /dev/sda2 (disk 1)" mounted=/mnt/newroot runboot=/bin/init prefroot=sda2 + elif [ -f /mnt/jffs2/.sdb1root ] ; then + /bin/echo "Preferred root device is /dev/sdb1 (disk 2)" + mounted=/mnt/newroot + runboot=/bin/init + prefroot=sdb1 elif [ -f /mnt/jffs2/.sdb2root ] ; then /bin/echo "Preferred root device is /dev/sdb2 (disk 2)" mounted=/mnt/newroot @@ -54,11 +64,12 @@ fi # perform prepatory tasks if [ -n "$prefroot" ] ; then - if [ $prefroot = "sda2" -o $prefroot = "sdb2" ] ; then + if [ $prefroot = "sda1" -o $prefroot = "sda2" -o $prefroot = "sdb1" -o $prefroot = "sdb2" ] ; then /bin/echo "Sleeping 10sec while waiting for disk..." sleep 10 /bin/mount -rt ext3 /dev/$prefroot /mnt/newroot - if [ -x /mnt/newroot/bin/init ] && [ -r /mnt/newroot/.unslung ] ; then + if [ -L /mnt/newroot/sbin/init -o -x /mnt/newroot/sbin/init -o \ + -L /mnt/newroot/bin/init -o -x /mnt/newroot/bin/init ] ; then /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..." else /bin/echo "Cant find valid rootfs on /dev/$prefroot, using recovery ..." @@ -119,7 +130,8 @@ if [ -n "$prefroot" ] ; then mount -o $nfsrootopts $nfsrootloc /mnt/newroot - if [ -e /mnt/newroot/sbin/init -o -e /mnt/newroot/bin/init ] ; then + if [ -L /mnt/newroot/sbin/init -o -x /mnt/newroot/sbin/init -o \ + -L /mnt/newroot/bin/init -o -x /mnt/newroot/bin/init ] ; then /bin/echo "Root filesystem will be mounted from a NFS root ..." mounted=/mnt/newroot runboot=/linuxrc @@ -130,7 +142,8 @@ if [ -n "$prefroot" ] ; then fi else - if [ -e /mnt/jffs2/sbin/init -o -e /mnt/jffs2/bin/init ] ; then + if [ -L /mnt/jffs2/sbin/init -o -x /mnt/jffs2/sbin/init -o \ + -L /mnt/jffs2/bin/init -o -x /mnt/jffs2/bin/init ] ; then /bin/echo "Root filesystem will be mounted from /dev/mtdblock4 ..." mounted=/mnt/jffs2 runboot=/linuxrc @@ -160,7 +173,8 @@ fi #if [ -z "$mounted" ] ; then # # /bin/umount /mnt/jffs2 -# if [ -e /mnt/jffs2/sbin/init -o -e /mnt/jffs2/bin/init ] ; then +# if [ -L /mnt/jffs2/sbin/init -o -x /mnt/jffs2/sbin/init -o \ +# -L /mnt/jffs2/bin/init -o -x /mnt/jffs2/bin/init ] ; then # /bin/echo "5" > /proc/sys/kernel/panic # /bin/echo "Root filesystem will be mounted from /dev/ram0 ..." # /bin/echo "0x0100" > /proc/sys/kernel/real-root-dev diff --git a/packages/busybox/switchbox_1.00.bb b/packages/busybox/switchbox_1.00.bb index cc6247ed25..9d5b86cd82 100644 --- a/packages/busybox/switchbox_1.00.bb +++ b/packages/busybox/switchbox_1.00.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://www.busybox.net" LICENSE = "GPL" SECTION = "base" PRIORITY = "required" -PR = "r6" +PR = "r7" SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ file://defconfig \ |