What can i use busybox for




















Get the highlights in your inbox every week. What is BusyBox in Linux? More Linux resources. Our latest Linux articles. Z 25 31 : 48 NZST multi-call binary. List directory contents -1 One column output -a Include entries that start with.

From new user to power user, here are 20 Linux commands that will make your life easier. Seth Kenlon Red Hat. Topics Linux. Command line. About the author. He has worked in the film and computing industry, often at the same time.

He is one of the maintainers of the Slackware-based multimedia production project Slackermedia. More about me. Recommended reading 7 Linux commands to use just for fun. Transfer files between your phone and Linux with this open source tool.

How I build command-line apps in JavaScript. Why I use Linux to manage my yoga studio. How to update a Linux symlink. It provides minimalist replacements for most of the utilities you usually find in GNU coreutils, util-linux, etc.

The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands or features at compile time. This makes it easy to customize your embedded systems.

BusyBox is extremely configurable. This allows you to include only the components you need, thereby reducing binary size. Run 'make config' or 'make menuconfig' to select the functionality that you wish to enable. Then run 'make' to compile BusyBox using your configuration. After the compile has finished, you should use 'make install' to install BusyBox. BusyBox is a multi-call binary. A multi-call binary is an executable program that performs the same job as more than one utility program.

That means there is just a single BusyBox binary, but that single binary acts like a large number of utilities. This allows BusyBox to be smaller since all the built-in utility programs we call them applets can share code for many common operations. You can also invoke BusyBox by issuing a command as an argument on the command line.

For example, entering. So most people will invoke BusyBox using links to the BusyBox binary. Generally speaking, you should never need to make all these links yourself, as the BusyBox build system will do this for you when you run the 'make install' command. If you invoke BusyBox with no arguments, it will provide you with a list of the applets that have been compiled into your BusyBox binary.

Most BusyBox applets support the --help argument to provide a terse runtime description of their behavior. Read and optionally set system timebase parameters. See adjtimex 2. Compress FILE s with bzip2 algorithm. Some of the questions even have answers. General questions What is Busybox? How can I get started using Busybox? How do I configure Busybox? How do I build Busybox with a cross-compiler?

How do I build a Busybox-based system? Which Linux kernel versions are supported? Which architectures does Busybox run on? Which C libraries are supported? Where can I find other small utilities since Busybox does not include the features I want?

How come you don't answer all my questions on the mailing list instantly? I demand that you help me with all of my problems Right Now!

I need help with Busybox! What should I do? Are you willing to provide support contracts? Can I include Busybox as part of the software on my device? I want to use Busybox as part of the Linux-based firmware for a new device. Will it create any license issues in future? Troubleshooting I think I found a bug in Busybox! What should I do?! I have trouble installing Busybox on my phone!

I'm using an ancient version from the dawn of time and something's broken. Can you backport fixes for free? Busybox init isn't working! I am observing a bug in BusyBox on an obscure platform.

Why do I keep getting "sh: can't access tty; job control turned off" errors? Why doesn't Control-C work within my shell?

I selected "standalone shell" option and now I have problems Misc. Programming questions What are the goals of Busybox? What is the design of Busybox? How is the source code organized? The applet directories The Busybox shared library libbb I want to make Busybox even smaller, how do I go about it? Adding an applet to Busybox What standards does Busybox adhere to? In my modem, Busybox v1. I can reach my modem's Telnet interface and I can reach shell prompt. I want to change configuration, and add some tools.

Can I enable FTP? If I edit a file on the device, I can't save it, I get 'filesystem is read only' error. How can I save a changed file? Questions like the example above is a sign that the person asking it does not fully understand what Busybox is. Busybox is not a complete solution for running modems, or wireless access points, etc. Busybox is only a set of programs. Even though it is a fairly comprehensive set of programs needed to run a Linux system, these programs per se can not "run a modem", just like construction worker's toolbox and materials can't build a house by themselves.

In order to make Busybox-based system useful, developers of this system add their own parts. At the very least, there are some shell scripts and configuration files, which control which tools are to be run, when, and how. Often, there are also some web pages and CGI scripts in order to implement web-based configuration.

Also, often developers add other tools beside Linux kernel and Busybox. Since these scripts, configuration files and other tools are custom-designed for a specific device, Busybox mailing list is usually a wrong place to ask about inner workings of such a device. If you have access to shell prompt, try running "busybox ftpd --help". If it does, you probably will be able to enable it.

Unfortunately, we don't know how Foomatic firmware manages starting and stopping of various services in case they already have ftpd sevice and it is just disabled , or how to create and enable a new service on Foomatic if they dont. Try googling for it.

However, Foomatic might have scp installed say, if they have dropbear installed , and it may be possible to enable it. If not, it may be possible to build and install your own scp tool. In order to modify some files, you need to find out how to switch the filesystem into read-write mode. Note that sometimes embedded devices use read-only filesystem formats such as cramfs, and therefore in order to replace or add even a single file such as a new, or an additional Busybox binary , you need to re-create and write out the entire filesystem image.

This operation is not simple for inexperienced users and may permanently disable your device if done incorrectly. You are better off googling for a forum where users of this particular device discuss their findings about inner workings of the device, and joining it. The "busybox-i" version should run on both bit and bit x86 PCs, and the armv4tl version is the most generic arm version for smartphones , so those are probably good starting points. This is a statically linked version of the Busybox "multiplexer", a single command that can perform multiple actions, the way a swiss army knife has multiple blades.

To try it out, give Busybox the command line you'd like it to execute:. To get a list of the commands supported by this instance of Busybox, run it without any arguments, or use the "--list" or :. If the Busybox executable is renamed to one of the commands it supports, it will act as that command automatically:. The --list option to busybox gives the list of supported commands in an easily scriptable form.

The prebuilt binaries are based on the default configuration of Busybox, which enables all functionality except special purpose things like selinux or debugging support which would reduce the portability of the resulting binary.

Busybox uses the same "menuconfig" infrastructure as the Linux kernel. You can start with "make defconfig" to enable almost everything, or "make allnoconfig" to disable everything, and then alter the selection with "make menuconfig" which uses tab, cursor up and down, space, and escape keys to navigate, and the forward slash key to search for symbol name.

Obtain and install a cross compiler for your target. See also the buildroot and crosstool-ng projects. Cross compilers use prefixed tool names to avoid blocking the host's existing compiler, thus the tools your cross compiler provides are probably named things like "armv4tl-cc", "armv4tl-ld", and "armv4tl-strip".

In this case, "armv4tl-" would be the prefix. Note the trailing dash, if that's part of the prefix. This is a make variable override preventing Busybox from using its default value, which is why it has to come on the make command line instead of as an environment variable.

And of course you can do a parallel SMP build with make's -j options. So to build a static cross compiled version of Busybox using a parallel build:. Busybox is configured similarly to the linux kernel.

Create a default configuration and then run "make menuconfig" to modify it. The end result is a. So instead of ". Busybox configured with all features enabled is a little under a megabyte dynamically linked on x To create a smaller Busybox, configure it with fewer features. Individual Busybox applets cost anywhere from a few hundred bytes to tens of kilobytes. Disable unneeded applets to save space, using "make menuconfig".

This enables almost all features, minus things like debugging options and features that require changes to the rest of the system to work such as selinux or devfs device names. Use this if you want to start from a full-featured Busybox and remove features until it's small enough.

This creates a tiny version of Busybox that doesn't do anything. Start here if you know exactly what you want and would like to select only those features. Use this after one of the previous two. This creates a statically linked version of Busybox full of debug code, with dependencies on selinux, using devfs names This makes sure everything compiles.

Whether or not the result would do anything useful is an open question. Menuconfig modifies your. To build a smaller Busybox binary, run "make menuconfig" and disable the features you don't need.

Or run "make allnoconfig" and then use menuconfig to add just the features you need. Don't forget to recompile with "make" once you've finished configuring. To store the cross-compiler in your. Example: here's the script which donloads and compiles Busybox using Rob's toolchain from Aboriginal Linux:! Busybox is a package that replaces a dozen standard packages, but it is not by itself a complete bootable system. Building an entire Linux distribution from source is a bit beyond the scope of this FAQ, but it understandably keeps cropping up on the mailing list, so here are some pointers.

Start by learning how to strip a working system down to the bare essentials needed to run one or two commands, so you know what it is you actually need.

To learn how to build a working Linux system entirely from source code, the place to go is the Linux From Scratch project. They have an entire book of step-by-step instructions you can read online or download. They also have mailing lists which are better sources of answers to Linux-system building questions than the Busybox list. If you want an automated yet customizable system builder which produces a Busybox and uClibc based system, try buildroot , which is another project by the maintainer of the uClibc Erik Andersen.

Download the tarball, extract it, unset CC, make. For more instructions, see the website. Full functionality requires Linux 2. Earlier versions may still work, but are no longer regularly tested. A large fraction of the code should run on just about anything. While the current code is fairly Linux specific, it should be fairly easy to port the majority of the code to support, say, FreeBSD or Solaris, or Mac OS X, or even Windows if you are into that sort of thing.

Busybox in general will build on any architecture supported by gcc. Kernel module loading for 2. On Linux, Busybox releases are tested against uClibc 0. Both should provide full functionality with Busybox, and if you find a bug we want to hear about it.

Linux-libc5 is no longer maintained and has no known advantages over uClibc , dietlibc is known to have numerous unfixed bugs, and klibc is missing too many features to build Busybox. If you require a small C library for Linux, the Busybox developers recommend uClibc. Some Busybox applets have been built and run under a combination of newlib and libgloss see this thread.

This is still experimental, but may be supported in a future release. You have not paid us a single cent and yet you still have the product of many years of our work.

We are not your slaves! We work on Busybox because we find it useful and interesting. If you go off flaming us, we will ignore you. If you find that you need help with Busybox, you can ask for help on the Busybox mailing list at busybox busybox.



0コメント

  • 1000 / 1000