All Forums
 Embedded Linux
 Linux FAQ
 HOWTO: installing busybox in a flash image
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jmalone

61 Posts

Posted - 06 Aug 2004 :  14:51:31  Show Profile  Email Poster

How to use busybox to make a small ramdisk/flash image


Busybox is a single progam that provides the functionality of a bunch of common GNU utilities, including 'cp', 'find', 'du', 'ls' and many others. Because it is only a single executable, it saves space in the root filesystem.

Busybox uses the term 'applet' to describe the utilities that it replaces.

Note that busybox does not provide exacly the same functionality as the utility programs it replaces. In many cases it provides only the most commonly used capabilities.

Busybox is present on the ramdisk, jffs2, and cramfs root file system. It is not present on the full debian root file system.

Compiling busybox

You can compile busybox with just the applets you want for best space savings. To grab the source for busybox, either download it from www.busybox.net or install the debian sources by running:

   apt-get source busybox

If you are using busybox-0.6x, edit the Config.h file to choose which applets you want. For busybox-1.00-pre and later, run 'make menuconfig' to choose the applets.

For ease of installation, be sure to compile in the installer applet.


Installing busybox in your flash filesystem / ramdisk

To install busybox in your flash filesystem, use the rootbuilder to build a tarball containing your application and the necessary Debian files for a minimal linux system.

See this topic for information on using the rootbuilder.

Once ADSRootbuilder is finished, you should have a tarball that contains the files for a flash image or ramdisk. Create a working directory and cd into it. Extract this tarball into it with the command:

   tar xpf ../file.tar

To install busybox into your working directory, return to your
busybox source directory and run:

   make PREFIX=/path/to/working/dir install

Once busybox is installed into your working copy, recreate the tarball by changing directory to your working directory (where you see bin, sbin, usr, etc.) and running:

    tar cpf ../file.tar

With this new tarball created, you can tell adsrootbuilder to use it by specifying the '--noscan' option:

   adsrootbuilder --noscan -c configfile

adrian

17 Posts

Posted - 11 Jan 2008 :  16:30:36  Show Profile  Email Poster
Details on using adsrootbuilder can be found under the topic Adsrootbuilder: Root filesystem image tools.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000