summaryrefslogtreecommitdiff
path: root/packages/nslu2-binary-only
diff options
context:
space:
mode:
Diffstat (limited to 'packages/nslu2-binary-only')
-rw-r--r--packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb8
-rw-r--r--packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb8
-rw-r--r--packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb8
-rw-r--r--packages/nslu2-binary-only/nslu2-linksys-sambacodepages_2.3r63.bb8
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/NOTES7
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch2
-rwxr-xr-xpackages/nslu2-binary-only/unslung-rootfs/rc.bootdisk41
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/rc.lan-shell.patch7
-rwxr-xr-xpackages/nslu2-binary-only/unslung-rootfs/unsling113
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb29
10 files changed, 154 insertions, 77 deletions
diff --git a/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb b/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb
index b8db38d3db..6d13d092c1 100644
--- a/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb
+++ b/packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb
@@ -2,16 +2,12 @@ SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
-python () {
- # Don't build unless we're targeting an nslu2
- if bb.data.getVar("MACHINE", d, 1) != "nslu2":
- raise bb.parse.SkipPackage("NSLU2 firmware only builds for the Linksys NSLU2")
-}
+COMPATIBLE_MACHINE = "nslu2"
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
diff --git a/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb b/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb
index 4424e99d19..86b0a575eb 100644
--- a/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb
+++ b/packages/nslu2-binary-only/nslu2-linksys-libs_2.3r63.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Linksys NSLU2 Stock Firmware Libraries."
PACKAGE_ARCH = "nslu2"
SECTION = "base"
PRIORITY = "required"
-PR = "r2"
+PR = "r3"
SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2"
@@ -16,8 +16,4 @@ do_install () {
PACKAGES = "${PN}"
FILES_${PN} = "/lib"
-python () {
- # Don't build unless we're targeting an nslu2
- if bb.data.getVar("MACHINE", d, 1) != "nslu2":
- raise bb.parse.SkipPackage("NSLU2 stock firmware libraries only builds for the Linksys NSLU2")
-}
+COMPATIBLE_MACHINE = "nslu2"
diff --git a/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb b/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb
index 007b19cbb2..b098ba73ff 100644
--- a/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb
+++ b/packages/nslu2-binary-only/nslu2-linksys-ramdisk_2.3r63.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Linksys NSLU2 Stock Firmware Ramdisk."
PACKAGE_ARCH = "nslu2"
SECTION = "base"
PRIORITY = "required"
-PR = "r2"
+PR = "r3"
SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2"
@@ -13,8 +13,4 @@ do_install () {
PACKAGES = "${PN}"
FILES_${PN} = "/"
-python () {
- # Don't build unless we're targeting an nslu2
- if bb.data.getVar("MACHINE", d, 1) != "nslu2":
- raise bb.parse.SkipPackage("NSLU2 ramdisk only builds for the Linksys NSLU2")
-}
+COMPATIBLE_MACHINE = "nslu2"
diff --git a/packages/nslu2-binary-only/nslu2-linksys-sambacodepages_2.3r63.bb b/packages/nslu2-binary-only/nslu2-linksys-sambacodepages_2.3r63.bb
index 4aace52412..44ef8aa1c9 100644
--- a/packages/nslu2-binary-only/nslu2-linksys-sambacodepages_2.3r63.bb
+++ b/packages/nslu2-binary-only/nslu2-linksys-sambacodepages_2.3r63.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Linksys NSLU2 Stock Firmware Samba Code Pages."
PACKAGE_ARCH = "nslu2"
SECTION = "base"
PRIORITY = "required"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2"
@@ -22,8 +22,4 @@ do_install () {
PACKAGES = "${PN}"
FILES_${PN} = "/etc/samba/codepages"
-python () {
- # Don't build unless we're targeting an nslu2
- if bb.data.getVar("MACHINE", d, 1) != "nslu2":
- raise bb.parse.SkipPackage("NSLU2 stock firmware Samba code pages only builds for the Linksys NSLU2")
-}
+COMPATIBLE_MACHINE = "nslu2"
diff --git a/packages/nslu2-binary-only/unslung-rootfs/NOTES b/packages/nslu2-binary-only/unslung-rootfs/NOTES
index de4d8b00bf..34d319d656 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/NOTES
+++ b/packages/nslu2-binary-only/unslung-rootfs/NOTES
@@ -546,3 +546,10 @@ maintenance; easier than plugging and unplugging disks.
Empty the /etc/win_share.info file on boot (fixes problem with multiple
identical shares appearing on a system).
+
+Upgraded slingbox to v1.2.2 busybox base; enabled fdisk.
+
+Replaced Linksys busybox with slingbox entirely.
+
+Modified "unsling" script to use tar instead of find and cpio; removed
+obsolete and untested unsling utilities (eg: resling).
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch
index 35015d6c82..d0d769931c 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.1-diversion.patch
@@ -13,7 +13,7 @@
/bin/echo "Starting Rest Task :"; . /etc/rc.d/rc.local
+/bin/echo "Starting Optware Packages:"; ( . /etc/rc.d/rc.optware-start )
-+
++/bin/echo "Starting Bootdisk scripts:"; ( . /etc/rc.d/rc.bootdisk )
/usr/bin/Set_Led ready
/usr/bin/Set_Led beep1
/bin/echo "Checking disk status :"; /usr/sbin/CheckDiskFull 2 >/dev/null
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk b/packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk
new file mode 100755
index 0000000000..3055c1a6c4
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.bootdisk
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# If we're not booting from flash, exit.
+i=`grep "/dev/root / jffs2" /proc/mounts`
+if ( [ -z "$i" ] ) ; then return 0 ; fi
+
+# Establish our identity
+linksys_hostname=`grep "^default_server_name=" /etc/CGI_ds.conf | sed s/default_server_name=//`
+real_hostname=`hostname`
+echo "====> linksys_hostname is $linksys_hostname"
+echo "====> real_hostname is $real_hostname"
+
+# but don't duplicate
+if ( [ "$linksys_hostname" = `hostname` ] ) ; then linksys_hostname= ; fi
+if ( [ "$real_hostname" = "unslung" ] ) ; then real_hostname= ; fi
+
+# Search all FAT/NTFS filesystem in order.
+# (heavily borrowed from the rc.start-optware script).
+for i in /share/*/data/HDD_* ; do
+ if ( [ "$i" = '/share/*/data/HDD_*' ] ) ; then break ; fi
+ echo "====> searching $i..."
+ for j in $linksys_hostname $real_hostname "unslung" ; do
+ echo "====> checking $i/bootdisk/$j ..."
+ if ( [ -d "$i"/bootdisk/"$j" ] ) ; then
+ for k in "$i"/bootdisk/"$j"/S??* ; do
+ echo "====> found $k ..."
+ [ ! -f "$k" ] && continue
+ nocopy=`grep "^#unslung-nocopy" "$k"`
+ if ( [ -z "$nocopy" ] ) ; then
+ echo "====> running copy: /tmp/tmpscript $k $i"
+ dos2unix -u <"$k" >/tmp/tmpscript
+ /bin/sh /tmp/tmpscript "$k" "$i"
+ rm -f /tmp/tmpscript
+ else
+ echo "====> running in-place $k $k $i"
+ /bin/sh "$k" "$k" "$i"
+ fi
+ done
+ fi
+ done
+done
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.lan-shell.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.lan-shell.patch
new file mode 100644
index 0000000000..5d25788fdf
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.lan-shell.patch
@@ -0,0 +1,7 @@
+--- nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.lan.orig 2006-11-10 20:07:27.000000000 -0600
++++ nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.lan 2006-11-10 20:07:35.000000000 -0600
+@@ -1,3 +1,3 @@
+-#!/bin/bash
++#!/bin/sh
+ #echo "set network driver to operate in auto-sense mode"
+ #/sbin/insmod /lib/modules/sk98lin.o
diff --git a/packages/nslu2-binary-only/unslung-rootfs/unsling b/packages/nslu2-binary-only/unslung-rootfs/unsling
index 400c7d0ad2..6c4dc4ca52 100755
--- a/packages/nslu2-binary-only/unslung-rootfs/unsling
+++ b/packages/nslu2-binary-only/unslung-rootfs/unsling
@@ -36,6 +36,9 @@ else
exit 1
fi
+# MJW - The new "tar" method of unslinging does not care if the device
+# has already been unslung. The following test has been removed.
+#
# Check that we can unsling at all! An unsling operation creates a new
# rootfs, but it also marks the flash rootfs (with a flag file such as
# ".sda1root") so that subsequent boots do not create the "var.state"
@@ -45,39 +48,39 @@ fi
# making sure that we are in a state in which we are capable of
# performing the unsling operation.
-echo "Checking if able to unsling..."
-echo
-m1="/dev/root /dev.state jffs2 rw 0 0"
-m2="/dev/root /var.state jffs2 rw 0 0"
-if ! grep "$m1" /proc/mounts >/dev/null 2>&1 || ! grep "$m2" /proc/mounts >/dev/null 2>&1 ; then
- echo "Error: This system is unable to properly unsling because certain"
- echo "required mounts (dev.state and/or var.state) are not available."
- echo "This is most probably because you have already unslung this system."
- echo
-
- if [ -f /.sda1root ] ; then
- rm -f /.sda1root
- elif [ -f /.sdb1root ] ; then
- rm -f /.sdb1root
- elif [ -f /.sda2root ] ; then
- rm -f /.sda2root
- elif [ -f /.sdb2root ] ; then
- rm -f /.sdb2root
- else
- echo "However, in this case, the flags that indicate an already-unslung"
- echo "system seem to be missing. Try restarting your NSLU2 to correct,"
- echo "but if the problem persists, try re-flashing your NSLU2."
- exit 1
- fi
- echo "The flags that indicate an already-unslung system have now been"
- echo "removed and the required mounts should now become present after"
- echo "reboot of the NSLU2."
- echo
- echo "1) Please unplug all drives from the NSLU2,"
- echo "2) reboot,"
- echo "3) and retry the unslinging process."
- exit 1
-fi
+#echo "Checking if able to unsling..."
+#echo
+#m1="/dev/root /dev.state jffs2 rw 0 0"
+#m2="/dev/root /var.state jffs2 rw 0 0"
+#if ! grep "$m1" /proc/mounts >/dev/null 2>&1 || ! grep "$m2" /proc/mounts >/dev/null 2>&1 ; then
+# echo "Error: This system is unable to properly unsling because certain"
+# echo "required mounts (dev.state and/or var.state) are not available."
+# echo "This is most probably because you have already unslung this system."
+# echo
+#
+# if [ -f /.sda1root ] ; then
+# rm -f /.sda1root
+# elif [ -f /.sdb1root ] ; then
+# rm -f /.sdb1root
+# elif [ -f /.sda2root ] ; then
+# rm -f /.sda2root
+# elif [ -f /.sdb2root ] ; then
+# rm -f /.sdb2root
+# else
+# echo "However, in this case, the flags that indicate an already-unslung"
+# echo "system seem to be missing. Try restarting your NSLU2 to correct,"
+# echo "but if the problem persists, try re-flashing your NSLU2."
+# exit 1
+# fi
+# echo "The flags that indicate an already-unslung system have now been"
+# echo "removed and the required mounts should now become present after"
+# echo "reboot of the NSLU2."
+# echo
+# echo "1) Please unplug all drives from the NSLU2,"
+# echo "2) reboot,"
+# echo "3) and retry the unslinging process."
+# exit 1
+#fi
# Check it's a real mount point
@@ -138,8 +141,16 @@ if [ "$nopw" -eq 0 ] ; then
echo "Error setting password."
exit 1
fi
+# Quick sanity check, something may have gone wrong while we were
+# waiting at the passwd prompt...
+ if ! [ -d $targ/public ] || ! [ -f $targconf/.dongle ] || ! [ -f $targconf/passwd ] ; then
+ echo
+ echo "Error: $targ appears to have vanished into thin air."
+ echo "This would indicate some type of problem with the USB cable,"
+ echo "the device, or the formatting of the device."
+ exit 1
+ fi
cp /etc/passwd /usr/local/passwd
-# cp /etc/passwd $targconf/passwd
grep "^root:" /etc/passwd >$targconf/passwd.new
grep -v "^root:" $targconf/passwd >>$targconf/passwd.new
mv $targconf/passwd $targconf/passwd.save
@@ -161,10 +172,29 @@ fi
# Copy the complete rootfs to the target.
echo
-echo "Copying the complete rootfs from / to $targ ..."
-/usr/bin/find / -xdev -print | /usr/bin/cpio -p -d -m -u $targ
-rm -rf $targ/dev ; mv $targ/dev.state $targ/dev
-rm -rf $targ/var ; mv $targ/var.state $targ/var
+echo "Copying the complete rootfs from / to $targ ... "
+echo " (this will take just a couple of minutes)"
+# Quick sanity check to avoid filling the flash...
+if ! [ -d $targ/public ] || ! [ -f $targconf/.dongle ] || ! [ -f $targconf/passwd ] ; then
+ echo
+ echo "Error: $targ appears to have vanished into thin air."
+ echo "This would indicate some type of problem with the USB cable,"
+ echo "the device, or the formatting of the device."
+ exit 1
+fi
+# /usr/bin/find / -xdev -print | /usr/bin/cpio -p -d -m -u $targ
+# rm -rf $targ/dev ; mv $targ/dev.state $targ/dev
+# rm -rf $targ/var ; mv $targ/var.state $targ/var
+echo "./var/tmp" > /tmp/xfile
+echo "./dev.state" >> /tmp/xfile
+echo "./var.state" >> /tmp/xfile
+echo "./lost+found" >>/tmp/xfile
+mkdir -p /tmp/tmprootfs
+/bin/mount /dev/mtdblock4 /tmp/tmprootfs
+/bin/tar -c -C /tmp/tmprootfs -X /tmp/xfile -f - . | (cd $targ; /bin/tar -x -f -)
+/bin/umount /tmp/tmprootfs
+echo "Copy complete ..."
+echo
# Copy over the existing ipkg database.
@@ -191,6 +221,8 @@ touch $targ/var/log/wtmp
chmod 644 $targ/var/log/wtmp
touch $targ/var/run/utmp
chmod 644 $targ/var/run/utmp
+mkdir -p $targ/var/tmp
+chmod 777 $targ/var/tmp
# The "user password" Linksys utility is hard-coded to /share/hdd; also the
# QuickSet utility seems to have some difficulty as well. Ugly fix is to
@@ -227,7 +259,8 @@ echo > $targ/$flag
echo
echo "Unsling complete."
echo
-echo "Leave the device $htmlinfo plugged in, and reboot"
-echo "in order to boot this system up into unslung mode."
+echo "Leave the device $htmlinfo, plugged in and reboot (using"
+echo "either the Web GUI, or the command \"DO_Reboot\") in order to boot"
+echo "this system up into unslung mode."
exit 0
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
index 73089bafeb..f6b65aad2a 100644
--- a/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
+++ b/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
@@ -1,6 +1,7 @@
SECTION = "base"
+COMPATIBLE_MACHINE = "nslu2"
-PR = "r15"
+PR = "r17"
DEPENDS = "nslu2-linksys-libs nslu2-linksys-sambacodepages"
@@ -11,11 +12,12 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
file://motd-fl \
file://motd-un \
file://unsling \
- file://resling \
- file://slingover \
+# file://resling \
+# file://slingover \
file://linuxrc \
file://unslung.gif \
file://nsswitch.conf \
+ file://rc.bootdisk \
file://rc.optware-start \
file://rc.optware-stop \
file://rc-diversion.patch;patch=1 \
@@ -23,6 +25,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
file://rc.1-timestamp.patch;patch=1 \
file://rc.crond-diversion.patch;patch=1 \
file://rc.halt-diversion.patch;patch=1 \
+ file://rc.lan-shell.patch;patch=1 \
file://rc.local-diversion.patch;patch=1 \
file://rc.modules-diversion.patch;patch=1 \
file://rc.network-diversion.patch;patch=1 \
@@ -56,13 +59,6 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r63"
-python () {
- # Don't build unslung images unless we're targeting an nslu2
- mach = bb.data.getVar("MACHINE", d, 1)
- if mach != 'nslu2':
- raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
-}
-
do_compile () {
echo "V2.3R63-uNSLUng-${DISTRO_VERSION}" > ${S}/.unslung
@@ -104,10 +100,11 @@ do_compile () {
install -d ${S}/initrd
install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
- install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
- install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
+# install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
+# install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
install -m 755 ${WORKDIR}/rc.optware-start ${S}/etc/rc.d/rc.optware-start
install -m 755 ${WORKDIR}/rc.optware-stop ${S}/etc/rc.d/rc.optware-stop
+ install -m 755 ${WORKDIR}/rc.bootdisk ${S}/etc/rc.d/rc.bootdisk
install -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
@@ -161,6 +158,14 @@ do_compile () {
# a link to busybox or slingbox at some point.
rm -r ${S}/usr/sbin/date
ln -s ../../bin/date ${S}/usr/sbin/date
+
+ # Replace the Linksys-provided /bin/busybox with a link to slingbox.
+ rm -f ${S}/bin/busybox
+ ln -s slingbox ${S}/bin/busybox
+
+ # No reason not to have a home directory for root...
+ mkdir -p ${S}/root
+ chmod 775 ${S}/root
}
do_install () {