summaryrefslogtreecommitdiffstats
path: root/book/busybox.html
diff options
context:
space:
mode:
Diffstat (limited to 'book/busybox.html')
-rw-r--r--book/busybox.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/book/busybox.html b/book/busybox.html
new file mode 100644
index 0000000..adcbd96
--- /dev/null
+++ b/book/busybox.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>2.4. busybox 1.19.2</title><link rel="stylesheet" href="stylesheets/lfs.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="stylesheet" href="stylesheets/lfs-print.css" type="text/css" media="print" /></head><body class="lfs" id="lfs-0.3"><div class="navheader"><h4>LFS live howto - Version 0.3</h4><h3>Chapter 2. packages</h3><ul><li class="prev"><a accesskey="p" href="aufs.html" title="aufs">Prev</a><p>aufs</p></li><li class="next"><a accesskey="n" href="pt03.html" title="Reconfiguring the Linux Kernel">Next</a><p>Reconfiguring the Linux Kernel</p></li><li class="up"><a accesskey="u" href="ch02.html" title="Chapter 2. packages">Up</a></li><li class="home"><a accesskey="h" href="index.html" title="LFS live howto - Version 0.3">Home</a></li></ul></div><div class="sect1" lang="en" xml:lang="en"><h1 class="sect1"><a id="busybox" name="busybox"></a>2.4. busybox 1.19.2</h1><div class="admon note"><img alt="[Note]" src="images/note.png" /><h3>Note</h3><p>This chapter is mandatory for both the livecd and the livekey. Busybox is used in the initrd which will be discussed later in the book.</p></div><p></p><div class="package" lang="en" xml:lang="en"><h2 class="sect2">2.4.1. Introduction to busybox</h2><p>Busybox is a utility that combines many common utilities in one. Although the functions provided by busybox would have limited options, in compare with the original utility, it would be often sufficient to do simple tasks. In this way you can save crucial space, like in a small initial ramdisk.</p><p>Busybox can be build staticly easily so we don't have to care about the shared libraries.</p><div class="itemizedlist"><ul class="compact"><li><p>Download (HTTP): <a class="ulink" href="http://www.busybox.net/downloads/busybox-1.19.2.tar.bz2">http://www.busybox.net/downloads/busybox-1.19.2.tar.bz2</a></p></li></ul></div></div><div class="sect2" lang="en" xml:lang="en"><h2 class="sect2">2.4.2. Building busybox</h2><p>In the root of the sourcedir:</p><pre class="userinput"><kbd class="command">make mrproper
+make allnoconfig </kbd></pre><p>"make mrproper" will cleanup the sourcedir, previous config files etc. will be removed.</p><p>"make allnoconfig" will make a simple config file with all options disabled.</p><p></p><p>Modify the config, so that we enable only the necessary functions. Note that this can be done by "make menuconfig" but for the sake of simplicity we modify the config with sed.</p><pre class="userinput"><kbd class="command">sed -e 's/# CONFIG_FEATURE_INSTALLER is not set/CONFIG_FEATURE_INSTALLER=y/' -i .config
+sed -e 's/# CONFIG_INSTALL_NO_USR is not set/CONFIG_INSTALL_NO_USR=y/' -i .config
+sed -e 's/# CONFIG_LONG_OPTS is not set/CONFIG_LONG_OPTS=y/' -i .config
+sed -e 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/' -i .config
+sed -e 's/# CONFIG_LFS is not set/CONFIG_LFS=y/' -i .config
+sed -e 's/# CONFIG_CAT is not set/CONFIG_CAT=y/' -i .config
+sed -e 's/# CONFIG_TEST is not set/CONFIG_TEST=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_TEST_64 is not set/CONFIG_FEATURE_TEST_64=y/' -i .config
+sed -e 's/# CONFIG_CUT is not set/CONFIG_CUT=y/' -i .config
+sed -e 's/# CONFIG_ECHO is not set/CONFIG_ECHO=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_FANCY_ECHO is not set/CONFIG_FEATURE_FANCY_ECHO=y/' -i .config
+sed -e 's/# CONFIG_SLEEP is not set/CONFIG_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_FANCY_SLEEP is not set/CONFIG_FEATURE_FANCY_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_FLOAT_SLEEP is not set/CONFIG_FEATURE_FLOAT_SLEEP=y/' -i .config
+sed -e 's/# CONFIG_USLEEP is not set/CONFIG_USLEEP=y/' -i .config
+sed -e 's/# CONFIG_MODINFO is not set/CONFIG_MODINFO=y/' -i .config
+sed -e 's/# CONFIG_INSMOD is not set/CONFIG_INSMOD=y/' -i .config
+sed -e 's/# CONFIG_RMMOD is not set/CONFIG_RMMOD=y/' -i .config
+sed -e 's/# CONFIG_LSMOD is not set/CONFIG_LSMOD=y/' -i .config
+sed -e 's/# CONFIG_MODPROBE is not set/CONFIG_MODPROBE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set/CONFIG_FEATURE_MODPROBE_BLACKLIST=y/' -i .config
+sed -e 's/# CONFIG_DEPMOD is not set/CONFIG_DEPMOD=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set/CONFIG_FEATURE_INSMOD_TRY_MMAP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set/CONFIG_FEATURE_CHECK_TAINTED_MODULE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODUTILS_ALIAS is not set/CONFIG_FEATURE_MODUTILS_ALIAS=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set/CONFIG_FEATURE_MODUTILS_SYMBOLS=y/' -i .config
+sed -e 's/CONFIG_DEFAULT_MODULES_DIR=""/CONFIG_DEFAULT_MODULES_DIR="\/lib\/modules"/' -i .config
+sed -e 's/CONFIG_DEFAULT_DEPMOD_FILE=""/CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"/' -i .config
+sed -e 's/# CONFIG_FINDFS is not set/CONFIG_FINDFS=y/' -i .config
+sed -e 's/# CONFIG_MOUNT is not set/CONFIG_MOUNT=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MOUNT_FAKE is not set/CONFIG_FEATURE_MOUNT_FAKE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MOUNT_LABEL is not set/CONFIG_FEATURE_MOUNT_LABEL=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MOUNT_FLAGS is not set/CONFIG_FEATURE_MOUNT_FLAGS=y/' -i .config
+sed -e 's/# CONFIG_SWITCH_ROOT is not set/CONFIG_SWITCH_ROOT=y/' -i .config
+sed -e 's/# CONFIG_UMOUNT is not set/CONFIG_UMOUNT=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_UMOUNT_ALL is not set/CONFIG_FEATURE_UMOUNT_ALL=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MOUNT_LOOP is not set/CONFIG_FEATURE_MOUNT_LOOP=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set/CONFIG_FEATURE_MOUNT_LOOP_CREATE=y/' -i .config
+sed -e 's/# CONFIG_VOLUMEID is not set/CONFIG_VOLUMEID=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_EXT is not set/CONFIG_FEATURE_VOLUMEID_EXT=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set/CONFIG_FEATURE_VOLUMEID_ISO9660=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_UDF is not set/CONFIG_FEATURE_VOLUMEID_UDF=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_ROMFS is not set/CONFIG_FEATURE_VOLUMEID_ROMFS=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_VOLUMEID_SYSV is not set/CONFIG_FEATURE_VOLUMEID_SYSV=y/' -i .config
+sed -e 's/# CONFIG_ASH is not set/CONFIG_ASH=y/' -i .config
+sed -e 's/# CONFIG_ASH_BASH_COMPAT is not set/CONFIG_ASH_BASH_COMPAT=y/' -i .config
+sed -e 's/# CONFIG_ASH_JOB_CONTROL is not set/CONFIG_ASH_JOB_CONTROL=y/' -i .config
+sed -e 's/# CONFIG_ASH_ALIAS is not set/CONFIG_ASH_ALIAS=y/' -i .config
+sed -e 's/# CONFIG_ASH_GETOPTS is not set/CONFIG_ASH_GETOPTS=y/' -i .config
+sed -e 's/# CONFIG_ASH_BUILTIN_ECHO is not set/CONFIG_ASH_BUILTIN_ECHO=y/' -i .config
+sed -e 's/# CONFIG_ASH_BUILTIN_PRINTF is not set/CONFIG_ASH_BUILTIN_PRINTF=y/' -i .config
+sed -e 's/# CONFIG_ASH_BUILTIN_TEST is not set/CONFIG_ASH_BUILTIN_TEST=y/' -i .config
+sed -e 's/# CONFIG_ASH_CMDCMD is not set/CONFIG_ASH_CMDCMD=y/' -i .config
+sed -e 's/# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set/CONFIG_ASH_OPTIMIZE_FOR_SIZE=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_SH_IS_ASH is not set/CONFIG_FEATURE_SH_IS_ASH=y/' -i .config
+sed -e 's/# CONFIG_FEATURE_BASH_IS_ASH is not set/CONFIG_FEATURE_BASH_IS_ASH=y/' -i .config
+sed -e 's/CONFIG_FEATURE_SH_IS_NONE=y/# CONFIG_FEATURE_SH_IS_NONE is not set/' -i .config
+sed -e 's/CONFIG_FEATURE_BASH_IS_NONE=y/# CONFIG_FEATURE_BASH_IS_NONE is not set/' -i .config </kbd></pre><p>Build the executable:</p><pre class="userinput"><kbd class="command">make </kbd></pre><p>Now we have a static build busybox. Keep it for later use.</p></div></div><div class="navfooter"><ul><li class="prev"><a accesskey="p" href="aufs.html" title="aufs">Prev</a><p>aufs</p></li><li class="next"><a accesskey="n" href="pt03.html" title="Reconfiguring the Linux Kernel">Next</a><p>Reconfiguring the Linux Kernel</p></li><li class="up"><a accesskey="u" href="ch02.html" title="Chapter 2. packages">Up</a></li><li class="home"><a accesskey="h" href="index.html" title="LFS live howto - Version 0.3">Home</a></li></ul></div></body></html>