GitHub - landley/toybox: toybox
3 min read
toybox. Contribute to landley/toybox development by creating an account on GitHub.
Toybox: all-in-one Linux command line. --- Getting started You can download static binaries for various targets from: The special name "." indicates the current directory (just like ".." means the parent directory), and you can run a program that isn't in the $PATH by specifying a path to it, so this should work: wget chmod +x toybox-x86_64 ./toybox-x86_64 echo hello world --- Building toybox Type "make help" for build instructions. Toybox uses the "make menuconfig; make; make install" idiom same as the Linux kernel. Usually you want something like: make defconfig make make install Or maybe: LDFLAGS="--static" CROSS_COMPILE=armv5l- make defconfig toybox PREFIX=/path/to/root/filesystem/bin make install_flat The file "configure" defines default values for many environment variables that control the toybox build; if you export any of these variables into your environment, your value is used instead of the default in that file. The CROSS_COMPILE argument above is optional, the default builds a version of toybox to run on the current machine. Cross compiling requires an appropriately prefixed cross compiler toolchain, several example toolchains (built using the file "scripts/" in the toybox source) are available at: For the "CROSS_COMPILE=armv5l-" example above, download cross-compiler-armv5l.tar.bz2, extract it, and add its "bin" subdirectory to your $PATH. (And yes, the trailing - is significant, because the prefix includes a dash.) For more about cross compiling, see: For a more thorough description of the toybox build process, see: --- Using toybox The toybox build produces a multicall binary, a "swiss-army-knife" program that acts differently depending on the…
Read full article