Cross compile busybox for ARM – Android


Busybox –

Sourcery G++ Lite 2011.03-41 for ARM GNU/Linux –

Igepv2 board –

Install code sourcery using the bin file. I choose not to install the binaries in my path so that it wouldn’t mess with my environment. I just export the toolchain’s bin directory before using it

Export path to where the cross-compiler is located on the host.

$ export PATH=$PATH:/<path_to_codesourcery_toolchain_folder>/bin/


$ cd <path_to_busybox>

$ make menuconfig

In menuconfig set the following options

  • Busybox Settings
    • Build Options
      • Build Busybox as a static binary (no shared libs) : Enable this option by pressing “Y”
      • Cross compiler prefix – Set this option equal to “arm-none-linux-gnueabi-“
    • General Configuration
      • Don’t use /usr – Enable this option by pressing “Y”


$ make

Then, push the busbox file to the target board, using adb (you have to connect to the target board first).


$ adb push <path_to_busybox>/busybox /

$ adb shell

$ ./busybox –install -s /system/bin/

Script to make busybox and install it on the connected device (the android device has to be connected through adb before using this script).

Change the CODESOURCERY variable to whatever path you installed CodeSourcery to (if you chose to install this toolchain in your Path, you can remove this variable and the export PATH line). You also need to change the BUSYBOXDIR to wherever you downloaded the busybox source code.

echo "Using defaults"
echo "Codesourcery at $CODESOURCERY"
echo "Busybox at $BUSYBOXDIR"

make clean
cp $FILES/.busyboxConfig $BUSYBOXDIR/.config
adb push $BUSYBOXDIR/busybox /system/bin/
adb shell ./busybox --install -s /system/bin/

One thought on “Cross compile busybox for ARM – Android

  1. Luke

    dont use linix often, what does it mean by

    Error: Missing 32-bit libraries on 64-bit Linux host
    Your 64-bit Linux host is missing the 32-bit libraries
    required to install and use Sourcery G++.

    Please follow this Knowledge Base entry to install the
    required 32-bit libraries:

    Once you have installed the 32-bit libraries, please restart
    the installer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s