summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Westerhof <mwester@dls.net>2006-05-25 05:19:46 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-25 05:19:46 +0000
commitcb1f96f7355f53add6ca196a078b577c3d7f07f5 (patch)
treeb3f3cf04aebdbfda1a4969453b09ddf23791e5e3
parenteab7cc271300cf6d43bc74a21134020d260627e4 (diff)
Unslung: rootfs & image, cleanup root fs image, fix some startup script syntax errors
-rw-r--r--packages/meta/unslung-image.bb24
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/NOTES8
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/rc.samba-syntaxfix.patch23
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-cpbug.patch19
-rwxr-xr-xpackages/nslu2-binary-only/unslung-rootfs/unsling2
-rw-r--r--packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb17
6 files changed, 88 insertions, 5 deletions
diff --git a/packages/meta/unslung-image.bb b/packages/meta/unslung-image.bb
index 4a6864eefa..b21433245a 100644
--- a/packages/meta/unslung-image.bb
+++ b/packages/meta/unslung-image.bb
@@ -1,5 +1,5 @@
LICENSE = MIT
-PR = "r14"
+PR = "r15"
IMAGE_BASENAME = "unslung"
@@ -10,11 +10,15 @@ DEPENDS = "virtual/kernel \
${UNSLUNG_EXTRA_DEPENDS}"
RDEPENDS = "kernel update-modules unslung-rootfs \
- libc6-unslung slingbox ipkg cpio findutils \
+ libc6-unslung slingbox ipkg \
+ cpio \
+ findutils \
${UNSLUNG_EXTRA_RDEPENDS}"
IPKG_INSTALL = "kernel update-modules unslung-rootfs \
- libc6-unslung slingbox ipkg cpio findutils \
+ libc6-unslung slingbox ipkg \
+ cpio \
+ findutils \
${UNSLUNG_EXTRA_INSTALL}"
IMAGE_PREPROCESS_COMMAND += "unslung_clean_image; "
@@ -61,6 +65,20 @@ unslung_clean_image () {
# Strip symbols and fix permissions on the libgcc_s.so.1 library
${STRIP} ${IMAGE_ROOTFS}/lib/libgcc_s.so.1
chmod ugo+x ${IMAGE_ROOTFS}/lib/libgcc_s.so.1
+
+ # We need cpio and find, but we don't need any of the other stuff in the
+ # packages (users can install the full package with ipkg after unsling).
+ # (make sure that if the package is not included (i.e. using slingbox
+ # instead) that the files are not deleted; they might be part of slingbox)
+
+ #-- these are for cpio:
+ rm -f ${IMAGE_ROOTFS}/usr/bin/mt
+ rm -rf ${IMAGE_ROOTFS}/usr/bin/libexec
+
+ #-- and these for find:
+ rm -f ${IMAGE_ROOTFS}/usr/bin/locate
+ rm -f ${IMAGE_ROOTFS}/usr/bin/updatedb
+ rm -f ${IMAGE_ROOTFS}/usr/bin/xargs
}
python () {
diff --git a/packages/nslu2-binary-only/unslung-rootfs/NOTES b/packages/nslu2-binary-only/unslung-rootfs/NOTES
index 81cff3cb82..f4a7bf724b 100644
--- a/packages/nslu2-binary-only/unslung-rootfs/NOTES
+++ b/packages/nslu2-binary-only/unslung-rootfs/NOTES
@@ -524,3 +524,11 @@ Fix extraneous boot messages from jffs2 filesystem driver (change options
used when building the flash jffs image).
Added pl2303.c patch for TIOCMGET/MSET/MBIS/MBIC.
+
+Syntax fixes in prep for newer busybox:
+ - comments in rc.samba, "cp" in rc.sysinit
+
+Flash filesystem cleanup (regained space):
+ - replaced dupl 'date' utility with symlink, corrected 'killall' symlink
+ - removed 'mt', 'libexec' from flash
+ - adjusted 'unsling' to use common 'find' options
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.samba-syntaxfix.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.samba-syntaxfix.patch
new file mode 100644
index 0000000000..fcfc273f2b
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.samba-syntaxfix.patch
@@ -0,0 +1,23 @@
+--- nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.samba~ 2006-05-16 14:22:33.000000000 -0500
++++ nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.samba 2006-05-16 16:47:45.000000000 -0500
+@@ -5,16 +5,16 @@
+ if [ -n "`pidof smbd`" ] ; then
+ killall smbd 2>/dev/null
+ fi
+-if [ -n "`pidof smbd`" ] ; then
++#if [ -n "`pidof smbd`" ] ; then
+ # killall -9 smbd 2>/dev/null
+-fi
++#fi
+
+ if [ -n "`pidof nmbd`" ] ; then
+ killall nmbd 2>/dev/null
+ fi
+-if [ -n "`pidof nmbd`" ] ; then
++#if [ -n "`pidof nmbd`" ] ; then
+ # killall -9 nmbd 2>/dev/null
+-fi
++#fi
+ sleep 2
+ /usr/sbin/smbd -D;
+ /usr/sbin/nmbd -D;
diff --git a/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-cpbug.patch b/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-cpbug.patch
new file mode 100644
index 0000000000..5b908851ed
--- /dev/null
+++ b/packages/nslu2-binary-only/unslung-rootfs/rc.sysinit-cpbug.patch
@@ -0,0 +1,19 @@
+--- nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.sysinit~ 2006-05-16 17:35:56.000000000 -0500
++++ nslu2-linksys-ramdisk-2.3r63/etc/rc.d/rc.sysinit 2006-05-16 17:36:10.000000000 -0500
+@@ -11,14 +11,14 @@
+ if ( [ ! -f /.sda1root ] && [ ! -f /.sda2root ] && [ ! -f /.sdb1root ] && [ ! -f /.sdb2root ] ) ; then
+ /bin/echo "Creating ramfs for /dev:"
+ /bin/mount -t ramfs ramfs /mnt/tmpmnt
+- /bin/cp -rp /dev/* /mnt/tmpmnt/
++ /bin/cp -a /dev/* /mnt/tmpmnt/
+ /bin/mkdir -p /dev.state
+ /bin/mount -o bind /dev /dev.state
+ /bin/mount -o bind /mnt/tmpmnt /dev
+ /bin/umount /mnt/tmpmnt
+ /bin/echo "Creating ramfs for /var:"
+ /bin/mount -t ramfs ramfs /mnt/tmpmnt -o maxsize=256
+- /bin/cp -rp /var/* /mnt/tmpmnt/
++ /bin/cp -a /var/* /mnt/tmpmnt/
+ /bin/mkdir -p /var.state
+ /bin/mount -o bind /var /var.state
+ /bin/mount -o bind /mnt/tmpmnt /var
diff --git a/packages/nslu2-binary-only/unslung-rootfs/unsling b/packages/nslu2-binary-only/unslung-rootfs/unsling
index c8b3dc8662..400c7d0ad2 100755
--- a/packages/nslu2-binary-only/unslung-rootfs/unsling
+++ b/packages/nslu2-binary-only/unslung-rootfs/unsling
@@ -162,7 +162,7 @@ fi
echo
echo "Copying the complete rootfs from / to $targ ..."
-/usr/bin/find / -print0 -mount | /usr/bin/cpio -p -0 -d -m -u $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
diff --git a/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb b/packages/nslu2-binary-only/unslung-rootfs_2.3r63.bb
index 1c805a6975..ff0172d84d 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 = "r12"
+PR = "r13"
DEPENDS = "nslu2-linksys-libs nslu2-linksys-sambacodepages"
@@ -31,6 +31,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
file://rc.reset_usrgrpshare-diversion.patch;patch=1 \
file://rc.rstimezone-diversion.patch;patch=1 \
file://rc.samba-diversion.patch;patch=1 \
+ file://rc.samba-syntaxfix.patch;patch=1 \
file://rc.sysinit-diversion.patch;patch=1 \
file://rc.thttpd-diversion.patch;patch=1 \
file://rc.xinetd-diversion.patch;patch=1 \
@@ -43,6 +44,7 @@ SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63-2.tar.bz2 \
file://mount_usbdevfs.patch;patch=1 \
file://security-fixes.patch;patch=1 \
file://rc.sysinit-clean_var.patch;patch=1 \
+ file://rc.sysinit-cpbug.patch;patch=1 \
file://rc.modules-nls.patch;patch=1 \
file://telnet-passwd.patch;patch=1 \
file://upgrade.htm \
@@ -144,6 +146,19 @@ do_compile () {
# 950 (Chinese BIG-5)
rm -f ${S}/etc/samba/codepages/codepage.950
# ISO8859-1 (Latin 1) - keep
+
+ # /bin/killall and /usr/bin/killall are both symlinks to busybox. This
+ # is a problem if killall is ever replaced by slingbox or a native utility.
+ # Fix by making /bin/killall (the wrong place) a symlink to /usr/bin/killall.
+ rm -f ${S}/bin/killall
+ ln -s ../usr/bin/killall ${S}/bin/killall
+
+ # There are two identical binary copies of "date" on the image. Replace
+ # the one in /usr/sbin with a symlink to the one in /bin. This saves a
+ # bit of flash space, and makes it possible to replace the date binary with
+ # a link to busybox or slingbox at some point.
+ rm -r ${S}/usr/sbin/date
+ ln -s ../../bin/date ${S}/usr/sbin/date
}
do_install () {