aboutsummaryrefslogtreecommitdiffstats
path: root/packages/nslu2-binary-only
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2006-07-11 03:37:51 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-07-11 03:37:51 +0000
commitc5caa8e5bab6d22e201661d904853c3b65ea23c2 (patch)
treef2d02698254d9d619c109aa295f31cfed2d75573 /packages/nslu2-binary-only
parent100c0e7c388a79d1a9e159193f5387b1a6072c0f (diff)
downloadopenembedded-c5caa8e5bab6d22e201661d904853c3b65ea23c2.tar.gz
Unslung: netconsole debugging support
Diffstat (limited to 'packages/nslu2-binary-only')
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/NOTES4
-rwxr-xr-xpackages/nslu2-binary-only/unslung-rootfs/linuxrc114
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/rc.1-timestamp.patch8
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb3
4 files changed, 87 insertions, 42 deletions
diff --git a/packages/nslu2-binary-only/unslung-rootfs/NOTES b/packages/nslu2-binary-only/unslung-rootfs/NOTES
index 3ff7d79d43..d6d789a858 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/NOTES
+++ b/packages/nslu2-binary-only/unslung-rootfs/NOTES
@@ -535,3 +535,7 @@ Flash filesystem cleanup (regained space):
Upgraded slingbox to v1.1.3 busybox base; enabled 'more' command
(note: upgrade added 3KB in size, 'more' added 4KB in size)
+
+Added network console debugging support:
+ - patched netconsole driver, added netconsole kernel module to image
+ - updated /linuxrc (& misc files) for basic support of same
diff --git a/packages/nslu2-binary-only/unslung-rootfs/linuxrc b/packages/nslu2-binary-only/unslung-rootfs/linuxrc
index d8a0e5d06c..c12984bf1d 100755
--- a/packages/nslu2-binary-only/unslung-rootfs/linuxrc
+++ b/packages/nslu2-binary-only/unslung-rootfs/linuxrc
@@ -1,5 +1,25 @@
#!/bin/sh
+NC_SLUGIP="192.168.1.77"
+NC_TARGIP="192.168.1.100"
+
+if ( [ -f "/.nc" ] ) ; then
+ if ( [ -z "$RERUN" ] ) ; then
+ /bin/echo " DEBUG: Starting network console from flash ..."
+ . /.nc
+ /bin/echo "Insmod ixp400"
+ /sbin/insmod ixp400.o
+ /bin/echo "Insmod ixp425"
+ /sbin/insmod ixp425_eth.o
+ /sbin/ifconfig ixp0 $NC_SLUGIP
+ /bin/echo "Insmod netconsole"
+ /sbin/insmod netconsole.o target_ip=$NC_TARGIP
+ /bin/echo "Redirecting output via nc and restarting /linuxrc ..."
+ export RERUN=1
+ exec /linuxrc 2>&1 | tee /dev/console | /usr/bin/nc $NC_TARGIP 6666
+ fi
+fi
+
# **** DO NOT EVEN THINK OF EDITING OR REMOVING THIS FILE ****
# **** UNLESS YOU REALLY KNOW *EXACTLY* WHAT YOU ARE DOING. ****
@@ -8,62 +28,74 @@
/bin/mount -t proc proc /proc
-echo "1" > /proc/sys/kernel/panic
-
-/bin/echo "Sleeping while waiting for disk..."
-cnt=20
-while [ $cnt -gt 0 ] ; do
- echo -ne "\r$cnt "
- sleep 1
- [ -e /.sda1root -a -f /proc/hdd_sda ] && cnt=0
- [ -e /.sdb1root -a -f /proc/hdd_sdb ] && cnt=0
- cnt=`expr $cnt - 1`
-done
-echo
-
-sleep 5
-
-mounted=
-
-for prefroot in sda1 sdb1 ; do
- if [ -z "$mounted" -a -e /.${prefroot}root ] ; then
- if /bin/mount -rt ext3 /dev/$prefroot /mnt ; then
- if [ -e /mnt/.${prefroot}root -a -x /mnt/bin/init ] ; then
- /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
- mounted=/mnt
- else
- /bin/umount /mnt
- /bin/echo "Can't find valid rootfs on /dev/$prefroot ..."
+/bin/echo "1" > /proc/sys/kernel/panic
+
+if ( ! [ -f /.nodisk ] ) ; then
+
+ /bin/echo "Sleeping while waiting for disk..."
+ cnt=20
+ while [ $cnt -gt 0 ] ; do
+ /bin/echo -ne "\r$cnt "
+ /bin/sleep 1
+ [ -e /.sda1root -a -f /proc/hdd_sda ] && cnt=0
+ [ -e /.sdb1root -a -f /proc/hdd_sdb ] && cnt=0
+ cnt=`expr $cnt - 1`
+ done
+ echo
+
+ /bin/sleep 5
+
+ mounted=
+
+ for prefroot in sda1 sdb1 ; do
+ if [ -z "$mounted" -a -e /.${prefroot}root ] ; then
+ if /bin/mount -rt ext3 /dev/$prefroot /mnt ; then
+ if [ -e /mnt/.${prefroot}root -a -x /mnt/bin/init ] ; then
+ /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
+ mounted=/mnt
+ else
+ /bin/umount /mnt
+ /bin/echo "Can't find valid rootfs on /dev/$prefroot ..."
+ fi
fi
fi
+ done
+
+ if [ -z "$mounted" ] ; then
+ /bin/echo "Can't find valid rootfs, using ramdisk ..."
+ mounted=
fi
-done
-if [ -z "$mounted" ] ; then
- /bin/echo "Can't find valid rootfs, using ramdisk ..."
- mounted=
-fi
+ /bin/umount /proc
-/bin/umount /proc
+ # Pivot to the desired rootfs and run the initial executable.
-# Pivot to the desired rootfs and run the initial executable.
+ if [ -n "$mounted" ] ; then
-if [ -n "$mounted" ] ; then
+ cd $mounted
- cd $mounted
+ /bin/echo "Pivoting to external rootfs ..."
+ /sbin/pivot_root . initrd
- /bin/echo "Pivoting to external rootfs ..."
- /sbin/pivot_root . initrd
+ if ( [ -z "$RERUN" ] ) ; then
+ exec /usr/sbin/chroot . /bin/init < /dev/console 1> /dev/console 2> /dev/console
+ else
+ exec /usr/sbin/chroot . /bin/init
+ fi
+ else
- exec /usr/sbin/chroot . /bin/init < /dev/console 1> /dev/console 2> /dev/console
+ exec /bin/init
-else
+ fi
- exec /bin/init
+ /bin/echo "Can't pivot to external rootfs, using ramdisk ..."
+else
+ /bin/echo "Forced boot to internal flash ..."
+ /bin/echo "(One-time only, clearing forced boot flag file.)"
+ /bin/rm -f /.nodisk
fi
-/bin/echo "Can't pivot to external rootfs, using ramdisk ..."
exec /bin/init
# Last-resort fall-back - this should never be reached.
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.1-timestamp.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.1-timestamp.patch
new file mode 100644
index 0000000000..c0034b27ab
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.1-timestamp.patch
@@ -0,0 +1,8 @@
+--- nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.1~ 2006-07-10 19:48:11.000000000 -0500
++++ nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.1 2006-07-10 19:48:24.000000000 -0500
+@@ -45,3 +45,5 @@
+ /usr/bin/Set_Led ready
+ /usr/bin/Set_Led beep1
+ /bin/echo "Checking disk status :"; /usr/sbin/CheckDiskFull 2 >/dev/null
++/bin/sleep 5
++/bin/date
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
index ff0172d84d..c9ec1fbdde 100644
--- a/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
+++ b/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
@@ -1,6 +1,6 @@
SECTION = "base"
-PR = "r13"
+PR = "r14"
DEPENDS = "nslu2-linksys-libs nslu2-linksys-sambacodepages"
@@ -20,6 +20,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
file://rc.optware-stop \
file://rc-diversion.patch;patch=1 \
file://rc.1-diversion.patch;patch=1 \
+ file://rc.1-timestamp.patch;patch=1 \
file://rc.crond-diversion.patch;patch=1 \
file://rc.halt-diversion.patch;patch=1 \
file://rc.local-diversion.patch;patch=1 \