1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" |
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent"> |
---|
5 | %general-entities; |
---|
6 | ]> |
---|
7 | |
---|
8 | <sect1 id="ch-system-busybox" role="wrap"> |
---|
9 | <?dbhtml filename="busybox.html"?> |
---|
10 | |
---|
11 | <title>Busybox-&busybox-version;</title> |
---|
12 | |
---|
13 | <indexterm zone="ch-system-busybox"> |
---|
14 | <primary sortas="a-Busybox">Busybox</primary> |
---|
15 | </indexterm> |
---|
16 | |
---|
17 | <sect2 role="package"> |
---|
18 | <title/> |
---|
19 | |
---|
20 | <para>BusyBox combines tiny versions of many common UNIX utilities into a single small |
---|
21 | executable. It provides replacements for most of the utilities you usually find in GNU |
---|
22 | fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than |
---|
23 | their full-featured GNU cousins; however, the options that are included provide the |
---|
24 | expected functionality and behave very much like their GNU counterparts. BusyBox provides |
---|
25 | a fairly complete environment for any small or embedded system.</para> |
---|
26 | |
---|
27 | </sect2> |
---|
28 | |
---|
29 | <sect2 role="installation"> |
---|
30 | <title>Installation of Busybox</title> |
---|
31 | |
---|
32 | <para os="p1">Before you build BusyBox, you may want to check the following URL for |
---|
33 | patches that the upstream maintainer of BusyBox has released to fix issues. |
---|
34 | <ulink url="http://busybox.net/downloads/fixes-&busybox-version;"/></para> |
---|
35 | |
---|
36 | <para os="p2"Here's an example of how to apply the patches from Busybox's website |
---|
37 | replace {patch_name} with the name of the patch:</para> |
---|
38 | |
---|
39 | <screen os="p3"><userinput>patch -Np1 -i ../busybox-$busybox-version;{patch_name}</userinput></screen> |
---|
40 | |
---|
41 | <para os="p4">The following patch fixes some issues that are related to the |
---|
42 | headers we are using:</para> |
---|
43 | |
---|
44 | <screen os="p5"><userinput>patch -Np1 -i ../&busybox-fixes-patch;</userinput></screen> |
---|
45 | |
---|
46 | <para os="a">Create the default configuration:</para> |
---|
47 | |
---|
48 | <screen os="b"><userinput>make defconfig</userinput></screen> |
---|
49 | |
---|
50 | <note os="c"> |
---|
51 | <para>Below we are just telling Busybox to use the default configuration of |
---|
52 | uClibc. For those for more adventureous, you can use make menuconfig, and |
---|
53 | do a more custom build of your Busybox.</para> |
---|
54 | </note> |
---|
55 | |
---|
56 | <para os="d">We will need to edit the configuration file, to make sure everything gets |
---|
57 | compiled:</para> |
---|
58 | |
---|
59 | <screen os="e"><userinput>BUSYBOX_OPTIONS="CONFIG_DMALLOC CONFIG_BUILD_AT_ONCE CONFIG_BUILD_LIBBUSYBOX |
---|
60 | CONFIG_FEATURE_SH_IS_NONE CONFIG_LOCALE_SUPPORT CONFIG_TFTP CONFIG_FTPGET CONFIG_FTPPUT |
---|
61 | CONFIG_IPCALC CONFIG_TFTP CONFIG_HUSH CONFIG_LASH CONFIG_MSH CONFIG_INETD CONFIG_DPKG |
---|
62 | CONFIG_RPM2CPIO CONFIG_RPM CONFIG_FOLD CONFIG_LOGNAME CONFIG_OD CONFIG_CRONTAB |
---|
63 | CONFIG_UUDECODE CONFIG_UUENCODE CONFIG_SULOGIN CONFIG_DC CONFIG_DEBUG_YANK_SUSv2 |
---|
64 | CONFIG_DEBUG_INIT CONFIG_DEBUG_CROND_OPTION CONFIG_FEATURE_UDHCP_DEBUG CONFIG_TASKSET |
---|
65 | CONFIG_CHATTR CONFIG_FSCK CONFIG_LSATTR CONFIG_CHPST CONFIG_SETUIDGID |
---|
66 | CONFIG_ENVUIDGID CONFIG_ENVDIR CONFIG_SOFTLIMIT CONFIG_FEATURE_2_4_MODULES" |
---|
67 | for config in $BUSYBOX_OPTIONS; do |
---|
68 | cp .config{,.orig} |
---|
69 | sed -e "s:${config}=y:${config}=n:" .config.orig > .config |
---|
70 | done |
---|
71 | BUSYBOX_OPTIONS="CONFIG_FEATURE_SH_IS_ASH CONFIG_FEATURE_TRACEROUTE_VERBOSE CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE" |
---|
72 | for config in $BUSYBOX_OPTIONS; do |
---|
73 | cp .config{,.orig} |
---|
74 | sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config |
---|
75 | done</userinput></screen> |
---|
76 | |
---|
77 | <para os="f">Compile the package:</para> |
---|
78 | |
---|
79 | <screen os="g"><userinput>make ARCH=i386 CROSS_COMPILE="${CLFS_TARGET}-" CFLAGS="${BUILD}"</userinput></screen> |
---|
80 | |
---|
81 | <para os="h">Install the package:</para> |
---|
82 | |
---|
83 | <screen os="i"><userinput>make ARCH=i386 PREFIX="${CLFS}" install</userinput></screen> |
---|
84 | |
---|
85 | <para os="j">If your going to build your kernel with modules, you will need to make |
---|
86 | sure depmod.pl is available:</para> |
---|
87 | |
---|
88 | <screen os="k"><userinput>cp examples/depmod.pl ${CLFS}/cross-tools/bin |
---|
89 | chmod 755 ${CLFS}/cross-tools/bin/depmod.pl</userinput></screen> |
---|
90 | |
---|
91 | </sect2> |
---|
92 | |
---|
93 | <sect2 id="contents-busybox" role="content"> |
---|
94 | <title>Contents of Busybox</title> |
---|
95 | |
---|
96 | <segmentedlist> |
---|
97 | <segtitle>Installed programs</segtitle> |
---|
98 | |
---|
99 | <seglistitem> |
---|
100 | <seg>To be Written</seg> |
---|
101 | </seglistitem> |
---|
102 | </segmentedlist> |
---|
103 | |
---|
104 | <!-- |
---|
105 | <variablelist> |
---|
106 | <bridgehead renderas="sect3">Short Descriptions</bridgehead> |
---|
107 | <?dbfo list-presentation="list"?> |
---|
108 | <?dbhtml list-presentation="table"?> |
---|
109 | |
---|
110 | <varlistentry id="bash"> |
---|
111 | <term><command>bash</command></term> |
---|
112 | <listitem> |
---|
113 | <para>A widely-used command interpreter; it performs many types of |
---|
114 | expansions and substitutions on a given command line before executing |
---|
115 | it, thus making this interpreter a powerful tool</para> |
---|
116 | <indexterm zone="ch-system-bash bash"> |
---|
117 | <primary sortas="b-bash">bash</primary> |
---|
118 | </indexterm> |
---|
119 | </listitem> |
---|
120 | </varlistentry> |
---|
121 | |
---|
122 | <varlistentry id="bashbug"> |
---|
123 | <term><command>bashbug</command></term> |
---|
124 | <listitem> |
---|
125 | <para>A shell script to help the user compose and mail standard |
---|
126 | formatted bug reports concerning <command>bash</command></para> |
---|
127 | <indexterm zone="ch-system-bash bashbug"> |
---|
128 | <primary sortas="b-bashbug">bashbug</primary> |
---|
129 | </indexterm> |
---|
130 | </listitem> |
---|
131 | </varlistentry> |
---|
132 | |
---|
133 | <varlistentry id="sh"> |
---|
134 | <term><command>sh</command></term> |
---|
135 | <listitem> |
---|
136 | <para>A symlink to the <command>bash</command> program; when invoked |
---|
137 | as <command>sh</command>, <command>bash</command> tries to mimic the |
---|
138 | startup behavior of historical versions of <command>sh</command> as |
---|
139 | closely as possible, while conforming to the POSIX standard as |
---|
140 | well</para> |
---|
141 | <indexterm zone="ch-system-bash sh"> |
---|
142 | <primary sortas="b-sh">sh</primary> |
---|
143 | </indexterm> |
---|
144 | </listitem> |
---|
145 | </varlistentry> |
---|
146 | |
---|
147 | </variablelist> |
---|
148 | --> |
---|
149 | </sect2> |
---|
150 | |
---|
151 | </sect1> |
---|