Unslung 5.2-alpha: added upgrade-real.cgi back, and locked the binutils version
authorRod Whitby <rod@whitby.id.au>
Fri, 10 Jun 2005 12:49:36 +0000 (12:49 +0000)
committerRod Whitby <rod@whitby.id.au>
Fri, 10 Jun 2005 12:49:36 +0000 (12:49 +0000)
BKrev: 42a98c60MK24-FJNelzawrvMjPVYHw

conf/distro/unslung.conf
packages/nslu2-binary-only/unslung-rootfs/rc-diversion.patch
packages/nslu2-binary-only/unslung-rootfs/upgrade.cgi [new file with mode: 0644]
packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb

index a29c6df..3358622 100644 (file)
@@ -7,7 +7,7 @@ FEED_URIS += "native##http://ipkg.nslu2-linux.org/feeds/unslung/native"
 FEED_URIS += "oe##http://ipkg.nslu2-linux.org/feeds/unslung/oe"
 
 DISTRO_NAME = "Unslung"
-DISTRO_VERSION = "5.1-alpha"
+DISTRO_VERSION = "5.2-alpha"
 DISTRO_TYPE = "beta"
 
 TARGET_FPU = "soft"
@@ -30,3 +30,5 @@ UNSLUNG_EXTRA_INSTALL ?= "${UNSLUNG_EXTRA_RDEPENDS}"
 
 PREFERRED_VERSION_glibc ?= "2.2.5"
 PREFERRED_VERSION_glibc-initial ?= "2.2.5"
+PREFERRED_VERSION_binutils ?= "2.15.94.0.1"
+PREFERRED_VERSION_binutils-cross ?= "2.15.94.0.1"
index e69de29..71094f6 100644 (file)
@@ -0,0 +1,47 @@
+--- nslu2-linksys-ramdisk-2.3r25/etc/rc~       2004-07-27 23:37:55.000000000 -0400
++++ nslu2-linksys-ramdisk-2.3r25/etc/rc        2004-09-01 21:47:47.000000000 -0400
+@@ -1,4 +1,44 @@
+ ## Simple beta script to verify csr
++
++if ( [ -f /unslung/rc ] && . /unslung/rc ) ; then return 0 ; fi
++
+ /usr/bin/Set_Led r_blinking &
+ mount -t proc proc /proc
+ mount -o remount,rw /dev/root /
++
++if [ -f /.ramdisk ] ; then
++   echo "Root filesystem is running in maintenance mode ..."
++   ( cd /home/httpd/html/Management ; cp upgrade-maint.htm upgrade.htm )
++elif ( [ -f /.sda1root ] || [ -f /.sdb1root ] || [ -f /.sda2root ] || [ -f /.sdb2root ] ) ; then
++   echo "Root filesystem is running from an external disk ..."
++   ( cd /home/httpd/html/Management ; cp upgrade-inhibit.htm upgrade.htm )
++else
++   echo "Root filesystem is running from jffs2 ..."
++   ( cd /home/httpd/html/Management ; cp upgrade-nomaint.htm upgrade.htm )
++fi
++
++# Wait for the USB disks to be recognised.
++sleep 10
++
++if ( [ -f /proc/hd_conn ] ) ; then
++  if ( [ -f /.sda1root ] ) ; then
++    /bin/mount -t ext3 /dev/sda1 /share/hdd/data
++    /bin/rm -rf /mnt/sda1 ; /bin/ln -s /share/hdd/data /mnt/sda1
++  fi
++  if ( [ -f /.sda2root ] ) ; then
++    /bin/mount -t ext3 /dev/sda2 /share/hdd/conf
++    /bin/rm -rf /mnt/sda2 ; /bin/ln -s /share/hdd/conf /mnt/sda2
++  fi
++fi
++
++if ( [ -f /proc/hd2_conn ] ) ; then
++  if ( [ -f /.sdb1root ] ) ; then
++    /bin/mount -t ext3 /dev/sdb2 /share/flash/data
++    /bin/rm -rf /mnt/sdb1 ; /bin/ln -s /share/flash/data /mnt/sdb1
++  fi
++  if ( [ -f /.sdb2root ] ) ; then
++    /bin/mount -t ext3 /dev/sdb2 /share/flash/conf
++    /bin/rm -rf /mnt/sdb2 ; /bin/ln -s /share/flash/conf /mnt/sdb2
++  fi
++fi
++
diff --git a/packages/nslu2-binary-only/unslung-rootfs/upgrade.cgi b/packages/nslu2-binary-only/unslung-rootfs/upgrade.cgi
new file mode 100644 (file)
index 0000000..e69de29
index e69de29..88d0606 100644 (file)
@@ -0,0 +1,111 @@
+SECTION = "base"
+
+PR = "r2"
+
+DEPENDS = "nslu2-linksys-libs"
+
+SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r29.tar.bz2 \
+          file://README \
+          file://NOTES \
+          file://unsling \
+          file://resling \
+          file://slingover \
+          file://linuxrc \
+          file://nsswitch.conf \
+          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://tmp-handling.patch;patch=1 \
+          file://create-ramdisks.patch;patch=1 \
+          file://remount-noatime.patch;patch=1 \
+          file://initialise-mtab.patch;patch=1 \
+          file://wait-for-quotacheck.patch;patch=1 \
+          file://mount_usbdevfs.patch;patch=1 \
+          file://maintmode.cgi file://upgrade-maint.htm \
+          file://upgrade-nomaint.htm file://upgrade-inhibit.htm \
+          file://rc.bootbin \
+          file://upgrade.cgi \
+          "
+
+S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r29"
+
+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.3R29-uNSLUng-${DISTRO_VERSION}" > ${S}/.unslung
+
+       sed -i -e s/@version#/@version#-uNSLUng-${DISTRO_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
+
+       install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
+
+       # Allow rc.bootbin to be diverted.
+       mv ${S}/etc/rc.d/rc.bootbin ${S}/sbin/rc.bootbin
+       install -m 755 ${WORKDIR}/rc.bootbin ${S}/etc/rc.d/rc.bootbin
+
+       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}/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 -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
+
+       install -d ${S}/opt/doc
+       install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
+       install -m 755 ${WORKDIR}/NOTES ${S}/opt/doc/NOTES
+       ln -s /opt/doc ${S}/home/httpd/html/Unslung
+
+       # Add the diversion script directory
+       install -d ${S}/unslung
+
+       # Remove the libraries, because they are in nslu2-linksys-libs now
+       rm -rf ${S}/lib
+
+       # Install maintenance mode files
+       mv ${S}/home/httpd/html/Management/upgrade.cgi ${S}/home/httpd/html/Management/upgrade-real.cgi 
+       install -m 755 ${WORKDIR}/upgrade.cgi ${S}/home/httpd/html/Management
+       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-inhibit.htm ${S}/home/httpd/html/Management/upgrade-inhibit.htm
+       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
+               ${S}/home/httpd/html/Management/upgrade-maint.htm
+       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
+               ${S}/home/httpd/html/Management/upgrade-nomaint.htm
+       sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
+               ${S}/home/httpd/html/Management/upgrade-inhibit.htm
+}
+
+do_install () {
+       ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "/"
+RDEPENDS_${PN} = "nslu2-linksys-libs"