Page 1 of 1

Full Busybox 1.15.X snapshots

Posted: Wed 09 Sep 2009, 04:46
by technosaurus
I compiled the snapshot build of busybox with allyesconfig and all parts that puppy supports (everything but pam and selinux) this will be much closer to the full desktop versions.

I set it up named bb instead of busybox so that it can coexist with a different version (such as static versions in init, etc...)

Barry recently discussed using the huge init with unionfs - which would eliminate the need for the separate statically compiled busybox, so I compiled it against gnu libc shared instead

I also made a little script that rebuilds all of the symlinks to bb called "listing"

On the plus side a symlink to bb is 2bytes vs 7bytes (14 if it is in ../sbin) so it saves a couple of kb

Does anyone know if it really matters if a program is in /bin or /sbin?

Re: Full Busybox 1.15.X snapshots

Posted: Wed 09 Sep 2009, 06:10
by aragon
technosaurus wrote:Does anyone know if it really matters if a program is in /bin or /sbin?
afaik it should not make a difference, as we are root. /sbin is for system-binaries, needed to administrate the system. in systems witch su/sudo, apps in /sbin might need superuser-privileges.

for a deeper look: http://proton.pathname.com/fhs/pub/fhs-2.3.html

aragon

Posted: Thu 10 Sep 2009, 02:35
by technosaurus
Thanks for the reminder, I've gotten so used to puppy that I was beginning to think that su is MU's caped alter ego

Posted: Sat 12 Sep 2009, 12:07
by Peterm321
Does anyone know if it really matters if a program is in /bin or /sbin?
Don't really know for sure though it may matter if /bin appears in the PATH variable before /sbin. I did find however a slight speed up of scripts (on a slow system) such as /etc/rc.d/rc.sysinit by redefining frequently used commands to busybox such as echo to invoke busybox directly and not via the symlink /bin/echo e.g.

alias echo="/bin/busybox echo "

Posted: Mon 16 Nov 2009, 01:49
by technosaurus
compare to toybox which contains just the basics for init:
  • basename, bzcat, cat, catv, chroot, chvt, cksum, count, cp, df, dirname, dmesg, echo, false, help, mdev, mkfifo, mkswap, nc, netcat, oneit, patch, pwd, rmdir, seq, sh, sha1sum, sleep, sort, sync, tee, touch, toybox, toysh, true, tty, uname, which, yes

Posted: Mon 16 Nov 2009, 02:27
by technosaurus
then compare to embutils statically compiled against diet libc

I did not statically compile toybox or busybox so keep that in mind for the comparison
  • allinone, arch, basename, cat, chgrp, chmod, chown, chroot, chrootuid, chvt, clear, cmp, cp, date, dd, df, dirname, dmesg, domainname, du, echo, env, false, head, hostname, id, insmod, install, kill, ldd, ln, ls, lsmod, md5sum, mesg, mkdir, mkfifo, mknod, mktemp, mount, mv, nice, nohup, pivot_root, printenv, pwd, renice, rm, rmdir, rmmod, sleep, sleep2, soscp, sosln, soslns, sosmv, sosrm, strings, sync, tail, tar, tee, test, time, touch, tr, true, truncate, tty, umount, uname, uniq, uudecode, uuencode, wc, which, whoami, write, yes

Snapshot of bb-1.16

Posted: Sun 06 Dec 2009, 22:07
by technosaurus
here is a snapshot of bb-1.16 (renamed to bb for interoperability) and 2 scripts that will replace or supplement the existing gnu or bb versions
This version contains quite a few new applets related to flash; lspci, ntpd, traceroute6, wall,mkfs.reiser,tune2fs,mkfs_ext2 (and lots of others that were left out of Puppy in version 1.15)... over 330 applets in total

again everything but PAM and SELINUX applets

Posted: Thu 17 Dec 2009, 21:05
by technosaurus
I need to recompile this again because lsusb was added and I have found it to be very useful in the past, but I wanted to mention that if you want to keep specific existing GNU utilities and replace the rest then you can just comment out that line in the "replace" script.

Posted: Thu 24 Dec 2009, 02:08
by technosaurus
and let's not forget asmutils - hasn't been updated in over 3 years but its size can't be beat (<3kb pet for 138 utils) - I would only test this with pfix=ram or use pet2tgz and test individually, since documentation is minimal

contains:
arch, basename, cal, cat, ccd, cda2raw, chmod, chown, chroot, chvt, cmp, cp, cpuinfo, cpuspeed, cut, date, dc, dd, deallocvt, deflate, df, dirname, dmesg, domainname, du, echo, eject, env, extname, factor, false, fdisk, finger, fingerd, free, fromdos, ftpd, getty, gi, grep, halt, head, hexdump, host, hostname, httpd, id, idea, ifconfig, inflate, init, kill, killall, killall5, ksyms, less, ln, ls, lsmod, lsusb, lzss, md5, md5sum, mesg, m_inetd, mkdir, mkfifo, mkfs.minix, mknod, mkswap, more, mount, mv, nc, netstat, nice, nm, nohup, od, paste, pidof, ping, pop3d, poweroff, proxy, ps, pwd, rc6crypt, readelf, readkey, readlink, reboot, renice, rm, rmdir, rmdsum, rmmod, rot13, route, scan, scons, sh, sha1sum, size, sleep, sln, softdog, strings, swapoff, swapon, sync, sysctl, tail, tar, tee, telnet, telnetd, test, todos, touch, tr, true, truss, tty, umount, uname, update, uptime, users, usleep, uuencode, watch, wc, wget, which, whoami, write, yes

Posted: Fri 01 Jan 2010, 18:26
by technosaurus
Here the latest bb from tree and a summary of the tools that the others have that busybox does not
Overall I think the biggest one to be ported is ldd from embutils

NEWS! - it seems the busybox git repo is down - I am keeping my source tree that I downloaded yesterday just in case.

---from embutils---
arch, chrootuid, domainname, ldd, sleep2, soscp, sosln, soslns, sosmv, sosrm, truncate, write

---from toybox---
count, netcat, oneit

---from asmutils---
arch, ccd, cda2raw, cpuinfo, cpuspeed, deflate, domainname, extname, factor, finger, fingerd, fromdos, gi, host, idea, inflate, ksyms, lzss, md5, m_inetd, nm, paste, pop3d, proxy, rc6crypt, readelf, readkey, rmdsum, rot13, scan, scons, size, sln, softdog, todos, truss, update, users, write

As you can see asmutils has a lot of extra goodies, too bad its development stopped before the multicall binary was created - I don't know how easy they would be to port into busybox (may be platform specific assembly)

Re: Full Busybox 1.15.X snapshots

Posted: Fri 12 Feb 2010, 12:59
by Abnormalter
Dear technosaurus,
because you can 'compiled the snapshot build of busybox', I glad to get your answer for this situation:
Into oldest busybox the replacement of 'ps' command has feature for displaying Vmem & CPU% columns. But into 1.15 it VERY USUABLE & NEEDABLE feature lost down! :(
How many hardly to do return it to busybox for Puppy?
Thanks, -- AT

Posted: Sun 20 Jun 2010, 01:49
by technosaurus
More recent builds are available here:
http://busybox.net/downloads/binaries/
Just save as busybox (without the -architecture)

Here is a one-liner that will make all of the appropriate links in the busbox directory

Code: Select all

for x in `./busybox |sed -n '15,$ s/\t/ / p' |sed 's/,//g'`; do ln -sf ./busybox -s $x; done
I put mine in /usr/busybox/ and then:

Code: Select all

export PATH=$PATH:/usr/busybox
This way it will not override any full versions but it can be tested easily by renaming or removing symlinks

Posted: Mon 21 Jun 2010, 22:37
by Abnormalter
Thanks!
Now I use special 'ps' command as replacement such is 'ps' shell script, who I put to /bin directory:

Code: Select all

#!/bin/sh
# With our scripts, if 'ps' called without commandline params, -- run OLD busybox ps...
[ "`which busybox-1.8.2`" != "" ] && [ ! $1 ] && exec busybox-1.8.2 ps
# This 'ps' way has different output to busybox 'ps' if called it by a params, for compatibility only.
[ "`which ps-SOURCE`" != "" ] && [ ! "$1" = "" ] && exec ps-SOURCE $@
# Or run busybox for 'ps' command like modern Puppy style...
exec busybox ps
P.S.
1. The busybox-1.8.2 file, who I put to /bin directory, is renamed me old version of busybox by Puppy 4.2x, -- it's busybox who can display 'ps' output fine.
2. The ps-SOURCE is original of ps script by Puppy.
Hmm... For me it's simply way... without any problems... =)

Posted: Wed 14 Jul 2010, 23:38
by technosaurus
To get a static uclibc-i486 build of the latest stable busybox go here:
http://impactlinux.com/aboriginal/downl ... 86.tar.bz2
(many other platforms are available - from arm to x86_64)

as for the ps command I looked into the code and did a bit of analysis - if all of the top and ps grouped commands were separated out, the code size could be reduced while adding those functions to ps and possibly adding additional commands such as cpu% memusage (duplicate => code size reduction) and many more - this would be a great project for a C coder. I made a hack at a hack by adding some code from top.c into the commented out sections of ps (and uncommented them) ... turned out to be a pretty hacky hack, so I moved on to leave it to someone with a good grasp of C.

Posted: Fri 23 Jul 2010, 20:50
by Abnormalter
Of course, look into their code is not easy... and so I contented myself with a rough hacker's patch for the ps command...

Posted: Fri 25 Feb 2011, 19:23
by technosaurus
I thought I would go ahead and throw google's toolbox into the mix for comparison. I haven't gotten a chance to build it, but figured I could at least put a link to the source for later (the source was difficult to find on google -hmm???)
http://android.git.kernel.org/?p=platfo ... git;a=tree

and redhat's nash
git://git.fedoraproject.org/git/hosted/mkinitrd