• A Linux system needs a basic set of programs to work
    • An init program
    • A shell
    • Various basic utilities for file manipulation and system configuration
  • In normal Linux systems, these programs are provided by different projects
    • coreutils, bash, grep, sed, tar, wget, modutils, etc. are all different projects
    • A lot of different components to integrate
    • Components not designed with embedded systems constraints in mind: they are not very configurable and have a wide range of features
  • Busybox is an alternative solution, extremely common on embedded systems

  • Rewrite of many useful Unix command line utilities

    • Integrated into a single project, which makes it easy to work with
    • Designed with embedded systems in mind: highly configurable, no unnecessary features
  • All the utilities are compiled into a single executable, /bin/busybox
    • Symbolic links to /bin/busybox are created for each application integrated into Busybox
  • For a fairly featureful configuration, less than 500 KB (statically compiled with uClibc) or less than 1 MB (statically compiled with glibc).
  • http://www.busybox.net/

Applet highlight: Busybox init

  • Busybox provides an implementation of an init program
  • Simpler than the init implementation found on desktop/server systems: no runlevels are implemented
  • A single configuration file: /etc/inittab
    • Each line has the form :::
  • Allows to run services at startup, and to make sure that certain services are always running on the system
  • See examples/inittab in Busybox for details on the configuration

Configuring BusyBox

  • Get the latest stable sources from http://busybox.net
  • Configure BusyBox (creates a .config file):
    • make defconfig Good to begin with BusyBox. Configures BusyBox with all options for regular users.
    • make allnoconfig Unselects all options. Good to configure only what you need.
  • make xconfig (graphical, needs the libqt3-mt-dev package) or make menuconfig (text) Same configuration interfaces as the ones used by the Linux kernel (though older versions are used).

Compiling BusyBox

  • Set the cross-compiler prefix in the configuration interface: BusyBox Settings -> Build Options -

    Cross Compiler prefix Example: arm-linux-

  • Set the installation directory in the configuration interface: BusyBox Settings -> Installation Options -

    BusyBox installation prefix

  • Add the cross-compiler path to the PATH environment variable: export PATH=/home//x-tools/arm-unknown-linux-uclibcgnueabi/bin:$PATH
  • Compile BusyBox: make
  • Install it (this creates a Unix directory structure symbolic links to the busybox executable): make install

results matching ""

    No results matching ""