Skip to Content.
Sympa Menu

baslinux - Re: [BL] compiling busybox 1.10

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] compiling busybox 1.10
  • Date: Fri, 17 Feb 2006 01:10:54 +0000 (UTC)

See a previous thread for how to download and set up /uclibc and chroot to it for compilation. I downloaded busybox source code to /uclibc/src first.

make menuconfig (this split programs up into groups)
make

I did not make install, just copied over the busybox file itself and ran David's script to make links in the same directory it is in. Maybe I should install it and have some links go to /usr/sbin etc?

It was easy to compile static busybox with make menuconfig - one of the first questions was whether to compile statically, and there was help for each possible program and option, not all of which I understood. I included all of Steven's programs and added awk, fbset, ftpget, hdparm, modprobe, su, telnetd, udhcpd, and vi, and got 600K. I could probably take some other things out that stayed in because I did not understand what they did.

http://keesan.freeshell.org/bl/busybox/busybox-1.10-uclibc
and also busybox-1.10.list (list of programs in it) and busybox.sh

The full wget should be able to fetch the directory, but busybox wget might need to do one file at a time.

I put it in /busybox110, which I put on the path ahead of /bin/busybox, in /etc/profile. I can't remove /bin/busybox (in BL2) or eznet stops working
with a complaint about not finding /bin/busybox/busybox. Why?????

When I do a 'which' the program in busybox 1.1.0 shows up, not in /bin/busybox/busybox (which I think is 1.01).

To run busybox.sh in BL2 you first need to make a symlink to expr and tail, because the BL2 versions don't work right for this script. Put it on the path (in /etc/profile) then in that directory:
ln -s busybox-1.10-uclibc busybox
ln -s busybox tail
ln -s busybox expr

BL3.40 already has the newer busybox 1.01 so no manual links needed.

So I have in /etc/profile at the end of the PATH line:
:/busybox110:/bin/busybox:."

Things seem to work okay. I put in all the possible options for fbset since whatever David compiled did not work for me (maybe my fault), something about recognizing things in fb.modes which it was not doing.


David's script made links for every possible program including things like sha1sum which I did not compile for. If I try to run the link:
./sha1sum --help
sha1sum: applet not found

Which finds it in that directory (not in /busybox101, where it does exist)
so I should probably remove all those dead links. How?

'make install' might have avoided this problem.
Make generated a busybox.links which lists where the symlinks are supposed to go. /sbin/e2fsck, fdisk, fbset, fsck, fsck.ext3 (why?), halt, hdparm, init, insmod, inetd, ifconfig, klogd, losetup, lsmod.....

When I tried to compile something it looked for a program (sed?) in /bin so if you don't install to bin (leave in /busybox110) it could cause problems, but I think I just made a symlink in bin to fix this. I replaced the full SW71 sed with the busybox one because it would not compile busybox (some option was missing).

The instructions say you can run a little linux based just on busybox and /dev /etc and a kernel. I guess since all the programs are statically compiled you don't need any /lib . You also can't add any non-static programs.

I had to check an option so that modprobe would work with 2.2 and 2.4.

keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Archive powered by MHonArc 2.6.24.

Top of Page