Bug#338405: another patch for busybox support
On Monday 11 December 2006 00:35, maximilian attems <maks@sternwelten.at>
wrote:
> > No, we can fix the busybox problem, and we can also reduce the size of
> > lvm and mdadm too.
>
> you haven't tried aboves, as the expected outcome was a much bigger
> initramfs instead of 2 busybox copies, now a copy for a each cmd:
Strange, I seem to save 250K. I just extracted the new cpio archive and
observe busybox files with 161 hard links.
My patch is against initramfs-tools version 0.85b, did you test against a
different version that might have some other change which conflicts?
# mkinitramfs.orig 2.6.17-2-xen-686 -o orig
# mkinitramfs 2.6.17-2-xen-686 -o new
# ls -l
total 4660
-rw-r--r-- 1 root root 2252363 2006-12-11 07:35 new
-rw-r--r-- 1 root root 2502586 2006-12-11 07:34 orig
# diff -u /usr/sbin/mkinitramfs.orig /usr/sbin/mkinitramfs
--- /usr/sbin/mkinitramfs.orig 2006-12-02 15:42:16.000000000 +1100
+++ /usr/sbin/mkinitramfs 2006-12-11 07:34:49.000000000 +1100
@@ -228,7 +228,12 @@
else
rm -f ${DESTDIR}/bin/sh
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
- ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+ rm ${DESTDIR}/bin/busybox
+ cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+ for n in `busybox | tail -19 | tr , \\n | sed -e "s/ \|\t//"|grep .` ; do
+ ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/$n
+ done
+ ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/sh
fi
# Modutils
--
russell@coker.com.au
http://etbe.blogspot.com/ My Blog
http://www.coker.com.au/sponsorship.html Sponsoring Free Software development
Reply to: