aboutsummaryrefslogtreecommitdiffstats
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/unslung-able-rootfs_2.3r25.bb7
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs-2.3r25/unsling114
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb0
-rw-r--r--packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb98
4 files changed, 76 insertions, 143 deletions
diff --git a/packages/nslu2-binary-only/unslung-able-rootfs_2.3r25.bb b/packages/nslu2-binary-only/unslung-able-rootfs_2.3r25.bb
deleted file mode 100644
index b7958cd9c7..0000000000
--- a/packages/nslu2-binary-only/unslung-able-rootfs_2.3r25.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-UNSLUNG_VARIANT = "able"
-
-include unslung-standard-rootfs_2.3r25.bb
-
-# Add overlays and patches to the standard rootfs here
-SRC_URI += ""
-
diff --git a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/unsling b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/unsling
index c38774cd7d..4da1b9ba82 100644
--- a/packages/nslu2-binary-only/unslung-rootfs-2.3r25/unsling
+++ b/packages/nslu2-binary-only/unslung-rootfs-2.3r25/unsling
@@ -1,31 +1,45 @@
#!/bin/sh
+usage="Usage: $0 [flash|hdd|flash-data|hdd-data|jffs2-flash|jffs2-hdd|jffs2-flash-data|jffs2-hdd-data]"
+
# Set or seach for target disk
if [ $# -gt 1 ] ; then
- echo "Usage: $0 [flash|hdd|flash-data|hdd-data]"
+ echo $usage
exit 1
fi
if [ $# -eq 1 ] ; then
if [ "$1" = "flash-data" ] ; then
targ=/share/flash/data
+ copy=true
elif [ "$1" = "hdd-data" ] ; then
targ=/share/hdd/data
+ copy=true
elif [ "$1" = "flash" ] ; then
targ=/share/flash/conf
+ copy=true
elif [ "$1" = "hdd" ] ; then
targ=/share/hdd/conf
+ copy=true
+ elif [ "$1" = "jffs2-flash-data" ] ; then
+ targ=/share/flash/data
+ copy=
+ elif [ "$1" = "jffs2-hdd-data" ] ; then
+ targ=/share/hdd/data
+ copy=
+ elif [ "$1" = "jffs2-flash" ] ; then
+ targ=/share/flash/conf
+ copy=
+ elif [ "$1" = "jffs2-hdd" ] ; then
+ targ=/share/hdd/conf
+ copy=
else
- echo "Usage: $0 [flash|hdd|flash-data|hdd-data]"
+ echo $usage
exit 1
fi
-elif [ -d /share/hdd/conf/lost+found ] ; then
- targ=/share/hdd/conf
-elif [ -d /share/flash/conf/lost+found ] ; then
- targ=/share/flash/conf
else
- echo "Cannot locate target disk"
+ echo $usage
exit 1
fi
@@ -42,45 +56,69 @@ fi
cd /
-# Ensure /opt is there.
+if [ -z "$copy" ] ; then
-if [ ! -d $targ/opt ] ; then
- echo "Creating new /opt directory on target disk."
- mkdir -p $targ/opt
-else
- echo "Preserving existing /opt directory on target disk."
-fi
+ # Ensure /opt is there.
+
+ if [ ! -d $targ/opt ] ; then
+ echo "Creating new /opt directory on target disk."
+ mkdir -p $targ/opt
+ else
+ echo "Preserving existing /opt directory on target disk."
+ fi
-if [ -d /opt -a ! -h /opt ] ; then
- echo "Copying existing /opt directory from root disk to target disk."
- tar cf - opt | ( cd $targ ; tar xf - )
- mv /opt /opt.old
-fi
+ if [ -d /opt -a ! -h /opt ] ; then
+ echo "Copying existing /opt directory from root disk to target disk."
+ tar cf - opt | ( cd $targ ; tar xf - )
+ mv /opt /opt.old
+ fi
-echo "Linking /opt directory from target disk to root disk."
-rm -f /opt ; ln -s $targ/opt /opt
+ echo "Linking /opt directory from target disk to root disk."
+ rm -f /opt ; ln -s $targ/opt /opt
-# Ensure /usr/lib/ipkg is there.
+ # Ensure /usr/lib/ipkg is there.
-if [ ! -d $targ/usr/lib/ipkg ] ; then
- echo "Creating new /usr/lib/ipkg directory on target disk."
- mkdir -p $targ/usr/lib/ipkg
-fi
+ if [ ! -d $targ/usr/lib/ipkg ] ; then
+ echo "Creating new /usr/lib/ipkg directory on target disk."
+ mkdir -p $targ/usr/lib/ipkg
+ fi
-if [ ! -f $targ/usr/lib/ipkg/status -a -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then
- echo "Copying existing /usr/lib/ipkg directory from root disk to target disk."
- tar cf - usr/lib/ipkg | ( cd $targ ; tar xf - )
+ if [ ! -f $targ/usr/lib/ipkg/status -a -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then
+ echo "Copying existing /usr/lib/ipkg directory from root disk to target disk."
+ tar cf - usr/lib/ipkg | ( cd $targ ; tar xf - )
+ else
+ echo "Preserving existing ipkg database on target disk."
+ fi
+
+ if [ -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then
+ echo "Saving /usr/lib/ipkg directory on root disk in /usr/lib/ipkg.old"
+ rm -rf /usr/lib/ipkg.old
+ mv /usr/lib/ipkg /usr/lib/ipkg.old
+ fi
+
+ echo "Linking /usr/lib/ipkg directory from target disk to root disk."
+ rm -f /usr/lib/ipkg ; ln -s $targ/usr/lib/ipkg /usr/lib/ipkg
+
else
- echo "Preserving existing ipkg database on target disk."
-fi
-if [ -d /usr/lib/ipkg -a ! -h /usr/lib/ipkg ] ; then
- echo "Saving /usr/lib/ipkg directory on root disk in /usr/lib/ipkg.old"
- rm -rf /usr/lib/ipkg.old
- mv /usr/lib/ipkg /usr/lib/ipkg.old
-fi
+ # Copy the complete rootfs to the target.
+
+ /usr/bin/find / -print0 -mount | /usr/bin/cpio -p -0 -d -m -u $targ
+ rm -rf $targ/dev ; mv $targ/dev.state $targ/dev
+ rm -rf $targ/var ; mv $targ/var.state $targ/var
+
+ rm -f /.sda1root /.sda2root /.sdb1root /.sdb2root
-echo "Linking /usr/lib/ipkg directory from target disk to root disk."
-rm -f /usr/lib/ipkg ; ln -s $targ/usr/lib/ipkg /usr/lib/ipkg
+ if [ "$targ" = "/share/hdd/data" ] ; then
+ echo > /.sda1root
+ elif [ "$targ" = "/share/hdd/conf" ] ; then
+ echo > /.sda2root
+ elif [ "$targ" = "/share/flash/data" ] ; then
+ echo > /.sdb1root
+ elif [ "$targ" = "/share/flash/conf" ] ; then
+ echo > /.sdb2root
+ fi
+
+fi
exit 0
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs_2.3r25.bb
diff --git a/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb b/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb
deleted file mode 100644
index 15f0616838..0000000000
--- a/packages/nslu2-binary-only/unslung-standard-rootfs_2.3r25.bb
+++ /dev/null
@@ -1,98 +0,0 @@
-SECTION = "base"
-
-PR = "r43"
-
-UNSLUNG_VERSION = "4.4-alpha"
-UNSLUNG_VARIANT ?= "standard"
-
-DEPENDS = "nslu2-linksys-libs"
-
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/unslung-rootfs-${PV}/${UNSLUNG_VARIANT}', '${FILE_DIRNAME}/unslung-rootfs-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
-
-SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r25.tar.bz2 \
- file://README \
- file://linuxrc \
- file://unsling \
- file://resling \
- file://rc.unslung-start \
- file://rc.unslung-stop \
- file://rc-diversion.patch;patch=1 \
- file://rc.1-diversion.patch;patch=1 \
- file://rc.crond-diversion.patch;patch=1 \
- file://rc.halt-diversion.patch;patch=1 \
- file://rc.local-diversion.patch;patch=1 \
- file://rc.modules-diversion.patch;patch=1 \
- file://rc.network-diversion.patch;patch=1 \
- file://rc.quickset-diversion.patch;patch=1 \
- file://rc.quota-diversion.patch;patch=1 \
- file://rc.reboot-diversion.patch;patch=1 \
- file://rc.reset_usrgrpshare-diversion.patch;patch=1 \
- file://rc.rstimezone-diversion.patch;patch=1 \
- file://rc.samba-diversion.patch;patch=1 \
- file://rc.sysinit-diversion.patch;patch=1 \
- file://rc.thttpd-diversion.patch;patch=1 \
- file://rc.xinetd-diversion.patch;patch=1 \
- file://root-passwd.patch;patch=1 \
- file://create-ramdisks.patch;patch=1 \
- file://remount-noatime.patch;patch=1 \
- file://initialise-mtab.patch;patch=1 \
- file://mount_usbdevfs.patch;patch=1 \
- file://maintmode.cgi file://upgrade-maint.htm file://upgrade-nomaint.htm \
- "
-
-S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r25"
-
-python () {
- # Don't build unslung images unless we're targeting an nslu2
- mach = bb.data.getVar("MACHINE", d, 1)
- dist = bb.data.getVar("DISTRO", d, 1)
- if mach != 'nslu2' or dist != 'unslung':
- raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
-}
-
-do_compile () {
- echo "V2.3R25-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}" > ${S}/.unslung
-
- sed -i -e s/@version#/@version#-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}/ ${S}/home/httpd/html/home.htm
- sed -i -e 's|>&nbsp;<|><a href="Unslung" class="mainmenu" target="_top">Unslung Doco</a><|' \
- ${S}/home/httpd/html/manhead.htm
-
- # Somehow these two slipped through - this is easier than updating the tar file.
- rm -f ${S}/etc/rc.orig
- rm -f ${S}/etc/rc.d/rc.1.orig
-
- install -d ${S}/initrd
-
- install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
- install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
- install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
- install -m 755 ${WORKDIR}/rc.unslung-start ${S}/etc/rc.d/rc.unslung-start
- install -m 755 ${WORKDIR}/rc.unslung-stop ${S}/etc/rc.d/rc.unslung-stop
-
- install -d ${S}/opt/doc
- install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
- ln -s /opt/doc ${S}/home/httpd/html/Unslung
-
- # Remove the libraries, because they are in nslu2-linksys-libs now
- rm -rf ${S}/lib
-
- # Install maintenance mode files
- install -m 755 ${WORKDIR}/maintmode.cgi ${S}/home/httpd/html/Management
- install -m 644 ${WORKDIR}/upgrade-maint.htm ${S}/home/httpd/html/Management/upgrade-maint.htm
- install -m 644 ${WORKDIR}/upgrade-nomaint.htm ${S}/home/httpd/html/Management/upgrade-nomaint.htm
- install -m 644 ${WORKDIR}/upgrade-nomaint.htm ${S}/home/httpd/html/Management/upgrade.htm
- sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}/ \
- ${S}/home/httpd/html/Management/upgrade-maint.htm
- sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}/ \
- ${S}/home/httpd/html/Management/upgrade-nomaint.htm
- sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${UNSLUNG_VARIANT}-${UNSLUNG_VERSION}/ \
- ${S}/home/httpd/html/Management/upgrade.htm
-}
-
-do_install () {
- ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
-}
-
-PACKAGES = "${PN}"
-FILES_${PN} = "/"
-RDEPENDS_${PN} = "nslu2-linksys-libs"