Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 08 Aug 2014 22:30:32 +0200
From: Tim Tassonis <>
Subject: Compiling latest busybox with latest musl


Firstly, thanks for musl. I chose it to create fully-working statically
linked binaries for a system without any glibc stuff on it and did not
want to create a whole toolchain first, as required with uClibc.

When I wanted to create s statically linked busybox (1.22.1), I looked
in the wiki and found the page:

This put me off a bit, as I did not want to modify my kernel headers
just to compile a static busybox.

But I found a less intrusive way to achieve my goal, maybe you might
want to add this to the next release or document it somewhere. Or of
course tell me that this is absolutely not the way to go....

1. Step: Download, compile and install musl-1.1.14

./configurre --prefix=$MUSL_BASE
make install

2. Step: Make some headers and program names available for busybox

cd $MUSL_BASE/bin
ln -s `which ar` musl-ar
ln -s `which strip` musl-strip
cd $MUSL_BASE/include
ln -s $KHDR_BASE/include/linux linux
ln -s /tools/include/mtd mtd
if [ -d $KHDR_BASE/include/asm ]
	ln -s $KHDR_BASE/include/asm asm
	ln -s $KHDR_BASE/include/asm-generic asm
ln -s $KHDR_BASE/include/asm-generic asm-generic

3. Step: Compile busybox

make defconfig
make menuconfig
under build options, i chose:


and then
make V=1

The following applets failed to compile:


Otherwise everything compiled and I got an almost fully-featured,
statically linked busybox without ever having to change one header,
source or makefile, let alone become root. Size: 911096

Host system was Ubuntu Server 13.10 64 bit
Toolchain was the temporary build system of LFS 7.5:

- gcc 4.8.2
- binutuils 2.24
- Kernel headers of linux-3.13.3

I tried also with the ubuntu kernel headers (3.11.0-26), worked as well.

Kind regards

-- - IT Stuff
Tim Tassonis
Dennlerstasse 36
8047 Z├╝rich
+41 79 229 36 17

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.