More fun building busybox under Red Hat 7.3.

Rob Landley rob at landley.net
Fri Jan 20 20:09:58 UTC 2006


So I expected that building under the 2.4 kernel, or with gcc 2.96 might cause 
things to go "boing".  But it didn't get nearly that far because the version 
of sed on Red Hat 7.3 _sucks_.

The broken sed sucks in a way that screws up "make allyesconfig" (It doesn't 
support -i, which is easy enough to work around) and screws up the 
bb_config.h build (which contains all the ENABLE_ symbols).

The second problem is because it doesn't support \n in the replace part of 
search and replace.  It doesn't support octal escapes either.  And when I 
tried to use an add command instead of search and replace it just plain went 
buggy on me.  That version of sed is a _joke_

This is a chicken and egg problem, because busybox builds just fine under its 
own sed.  Since sed is used for configuration rather than compiling, we can 
work around this by hand-configure a sed-only busybox, renaming that "sed" 
and stick it at the start of the path, and then doing the rest of the build.

Here's how you do that:

tar xvjf busybox-1.1.0.tar.bz2
cd busybox-1.1.0
make allnoconfig
make include/bb_config.h
echo "CONFIG_SED=y" >> .config
echo "#undef ENABLE_SED" >> include/bb_config.h
echo "#define ENABLE_SED 1" >> include/bb_config.h
make
mv busybox sed
export PATH=`pwd`:"$PATH"

And then you can continue from there with make menuconfig or what have you.

I tested a make allyesconfig and it made it as far as fuser.c before the build 
broke.  I disabled that and tried again.  Then some strange make rule in 
e2fsprogs decided that it had a dependency on the directory the source code 
was in (and didn't know how to build it), so disable everything in that 
directory, and...

It hath built.  Dunno if it actually works, but it _built_...

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.



More information about the busybox mailing list