Re: [leaf-devel] patch: enable traceroute in busybox
Hi Paul, > > Speaking of busybox, I noticed that you're linking busybox to its linked > commands with symbolic links instead of hardlinks. Using hardlinks should > be more memory and space efficient *if* using a symbolic link takes up an > inode in the filesystem in memory/on disk. Unfortunately, my memory is > too foggy to remember exactly which filesystems symbolic links take inodes > in vs directory entries. > I think with tmpfs it doesn't matter, but am not 100% sure about it. >> Having argument processing is indeed nice, but automatically finding >> boot media is not really necessary in my opinion. It doesn't need to be a >> fully automatic process. If you just mount the device and something like >> 'loadmod /mnt/Bering-uClibc-2.4.33.tar.gz' it should >> be enough for a start. > > OK, then you're welcome to add this to the distribution. :-) > Feel free to bang on it. > A few comments: -Why don't you use tar -X to extract the correct modules? Now you untar the complete modules repository which is ~8 Mbyte compressed. This takes a lot of time (especially on "slow" systems, and if /tmp isn't big enough runs out of memory. -MODLIST is always /etc/modules, so no real need to have a variable for it. MODREPO is probably always different so no need to have a default for it and LIBMOD is always /lib/modules so also no real need for a variable. But I really like the idea, it could also be used for the CD-ROM image instead of using all kinds of mount, umount and dir commands in /etc/modules. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] patch: enable traceroute in busybox
On Fri, Sep 08, 2006 at 06:18:01PM +0200, Eric Spakman wrote: > I'd be interested to know how much adding traceroute to busybox does > with the size of the initrds. With traceroute: -rwxr-xr-x 1 root root 272952 2006-09-08 00:52 busybox Without: -rwsr-xr-x 1 root root 266136 Sep 4 2006 /bin/busybox Speaking of busybox, I noticed that you're linking busybox to its linked commands with symbolic links instead of hardlinks. Using hardlinks should be more memory and space efficient *if* using a symbolic link takes up an inode in the filesystem in memory/on disk. Unfortunately, my memory is too foggy to remember exactly which filesystems symbolic links take inodes in vs directory entries. > Having argument processing is indeed nice, but automatically finding > boot media is not really necessary in my opinion. It doesn't need to > be a fully automatic process. If you just mount the device and > something like 'loadmod /mnt/Bering-uClibc-2.4.33.tar.gz' it should > be enough for a start. OK, then you're welcome to add this to the distribution. :-) Feel free to bang on it. #!/bin/sh # # Build /lib/modules based upon the contents of /etc/modules and a # defined modules repository. # # Copyright (c) Paul Traina 2006, GPL v2 # MODLIST=/etc/modules MODREPO=/mnt/modules.tgz LIBMOD=/lib/modules ## progname=`basename $0` usage() { cat >&2 <<-EOF Usage: $progname [ -m modules ] [ -f modules.tar.gz ] [ -l module-dir ] Defaults: -m $MODLIST -f $MODREPO -l $LIBMOD Extract kernel modules from $MODREPO into $LIBMOD based upon the contents of $MODLIST. EOF } args=`getopt -a -o hm:f:l: -n "$progname" -- "$@"` if [ $? != 0 ] ; then usage exit 1 fi eval set -- "$args" while true ; do case "$1" in -h) usage; exit 0 ;; -m) MODLIST="$2"; shift 2 ;; -f) MODREPO="$2"; shift 2 ;; -l) LIBMOD="$2";shift 2 ;; --) shift; break ;; *) echo >&2 "Internal error"; exit 1 ;; esac done if [ ! -f $MODLIST ] ; then echo >&2 "$progname: module list $MODLIST not found" exit 1 fi if [ ! -f $MODREPO ] ; then echo >&2 "$progname: module repository $MODREPO not found" exit 1 fi if [ ! -d $LIBMOD ] ; then echo >&2 "$progname: module directory $LIBMOD not found" exit 1 fi ## MODLIST=/tmp/build-modules-list.$$ MODTEMP=/tmp/build-modules-extract.$$ for mod in $modules ; do if [ ! -f $LIBMOD/${mod}.o ] ; then missing="${mod}.o ${missing}" fi done # Nothing missing... if [ -z "$missing" ] ; then exit 0 fi echo "Missing kernel modules: ${missing}" # # get absolute path of all modules in tarfile first (sigh) # trap "rm -f $MODLIST" 0 1 2 tar tzf $MODREPO > $MODLIST for mod in $missing ; do findmod="`grep -F ${mod} $MODLIST` ${findmod}" done rm -f $MODLIST trap '' 0 1 2 # # Now do the actual module extraction to a temporary area and then # move the modules to /lib/modules # trap "rm -rf $MODTEMP" 0 1 2 mkdir $MODTEMP tar xzf $MODREPO -C $MODTEMP $findmod echo echo -n "Installing modules:" for mod in $findmod ; do echo -n " `basename $mod .o`" mv $MODTEMP/$mod $LIBMOD/`basename $mod` done echo rm -rf $MODTEMP trap '' 0 1 2 exit 0 - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] patch: enable traceroute in busybox
Hi Paul, I don't want to enable traceroute in busybox, because it don't work out of the box with shorewall and it adds size. Traceroute can also be done from any host connected. I rather have a separate traceroute package. Eric >? busybox-1.2.1 >Index: .config >=== >RCS file: /cvsroot/leaf/src/bering-uclibc/apps/busybox/.config,v >retrieving revision 1.10 >diff -u -r1.10 .config >--- .config13 Aug 2006 20:22:05 - 1.10 >+++ .config8 Sep 2006 05:08:09 - >@@ -547,10 +547,10 @@ > # CONFIG_FEATURE_TFTP_PUT is not set > # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set > # CONFIG_DEBUG_TFTP is not set >-# CONFIG_TRACEROUTE is not set >-# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set >-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set >-# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set >+CONFIG_TRACEROUTE=y >+CONFIG_FEATURE_TRACEROUTE_VERBOSE=y >+CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y >+CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y > > # > # udhcp Server/Client > >- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >___ >leaf-devel mailing list >leaf-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/leaf-devel - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel