Commit Graph

553 Commits

Author SHA1 Message Date
Denys Vlasenko
4f2ef4a836 ash: allow shell scripts to be embedded in the binary
To assist in the deployment of shell scripts it may be convenient
to embed them in the BusyBox binary.

'Embed scripts in the binary' takes any files in the directory
'embed', concatenates them with null separators, compresses them
and embeds them in the binary.

When scripts are embedded in the binary, scripts can be run as
'busybox SCRIPT [ARGS]' or by usual (sym)link mechanism.

embed/nologin is provided as an example.

function                                             old     new   delta
packed_scripts                                         -     123    +123
unpack_scripts                                         -      87     +87
ash_main                                            1103    1171     +68
run_applet_and_exit                                   78     128     +50
get_script_content                                     -      32     +32
script_names                                           -      10     +10
expmeta                                              663     659      -4
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 2/1 up/down: 370/-4)            Total: 366 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-11-01 10:15:13 +01:00
Denys Vlasenko
0dbcb46af5 Start 1.30.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-01 17:18:47 +02:00
Denys Vlasenko
10a3817440 Bump version to 1.29.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-07-01 16:38:52 +02:00
Michael Olbrich
43dd006222 build system: fix parallel building issue
The files generated by the include/config/MARKER target are in the
dependency list for applets/applet_tables.
If applets/applet_tables is created first during applets_dir then it will
be created again later as part of $(busybox-dirs).
As a result include/applet_tables.h is created again. This time while other
build commands may need it.

Let applets_dir depend on include/config/MARKER to avoid this particular
race condition and create the header files atomically to ensure that the
compiler never sees incomplete files.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-04-14 01:55:51 +02:00
Denys Vlasenko
d75f9081d4 Start 1.29.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-02 06:11:19 +01:00
Denys Vlasenko
c0fab1ba49 Bump version to 1.28.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-02 06:07:28 +01:00
Denys Vlasenko
ab77e81a85 klibc-utils: new applets: resume, nuke, minips
minips is a pure alias to ps, just in case someone needs 100% klibc-utils compat.
nuke is a primitive version of "rm -rf" without options and error checks. ~30 bytes.

resume is a tool for initramfs which resumes from a given block device.

function                                             old     new   delta
resume_main                                            -     582    +582
packed_usage                                       31640   31712     +72
nuke_main                                              -      28     +28
xstrtoull                                              -      24     +24
applet_names                                        2646    2665     +19
applet_main                                         1532    1544     +12
applet_suid                                           96      97      +1
applet_install_loc                                   192     193      +1
applet_flags                                          96      97      +1
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 6/0 up/down: 740/0)             Total: 740 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-18 19:15:29 +02:00
Denys Vlasenko
1ef3ce91c7 sparc: needs -fPIC
Pinted out by Thomas Petazzoni.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-19 17:56:56 +02:00
Thomas Petazzoni
e9a25ac924 Makefile: include per-arch Makefile before Makefile.flags
Makefile.flags contains:

ARCH_FPIC ?= -fpic
ARCH_FPIE ?= -fpie

However, arch/$(ARCH)/Makefile gets included *after* Makefile.flags,
and therefore doesn't get the chance to provide its own value.

Fix this by including arch/$(ARCH)/Makefile *before* Makefile.flags.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-15 11:53:53 +02:00
Denys Vlasenko
f82be93c1c Start 1.28.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03 13:41:18 +02:00
Denys Vlasenko
ceaffde511 Bump version to 1.27.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-03 13:40:46 +02:00
Denys Vlasenko
b5b1d2c5a8 Start 1.27.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-21 03:33:42 +01:00
Denys Vlasenko
dc3701d2e7 Bump version to 1.26.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-12-20 03:00:43 +01:00
Denys Vlasenko
9ca56f9621 Start 1.26.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-22 03:10:21 +02:00
Denys Vlasenko
c3b34d8b39 Bump version to 1.25.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-06-22 00:58:56 +02:00
Denys Vlasenko
d7b502c059 build system: fix generate_BUFSIZ.sh to not alternate 1k and malloc builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 23:52:35 +02:00
Denys Vlasenko
e6a2f4cc5a libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for it
The config item is FEATURE_USE_BSS_TAIL. When it is off (default):

function                                             old     new   delta
read_config                                          210     228     +18
doCommands                                          2279    2294     +15
ipneigh_list_or_flush                                763     772      +9
ipaddr_list_or_flush                                1256    1261      +5
display_process_list                                1301    1306      +5
conspy_main                                         1378    1383      +5
do_lzo_compress                                      352     355      +3
do_lzo_decompress                                    565     567      +2
push                                                  46      44      -2
inetd_main                                          2136    2134      -2
uevent_main                                          421     418      -3
addLines                                              97      92      -5
bb_common_bufsiz1                                   8193    1024   -7169
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181)        Total: -7119 bytes
   text	   data	    bss	    dec	    hex	filename
 829850	   4086	   9080	 843016	  cdd08	busybox_old
 829901	   4086	   1904	 835891	  cc133	busybox_unstripped

FEATURE_USE_BSS_TAIL=y:

read_config                                          210     228     +18
doCommands                                          2279    2294     +15
ipneigh_list_or_flush                                763     772      +9
ipaddr_list_or_flush                                1256    1261      +5
display_process_list                                1301    1306      +5
conspy_main                                         1378    1383      +5
do_lzo_compress                                      352     355      +3
do_lzo_decompress                                    565     567      +2
inetd_main                                          2136    2134      -2
bb_common_bufsiz1                                   8193       -   -8193
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195)        Total: -8133 bytes
   text	   data	    bss	    dec	    hex	filename
 829850	   4086	   9080	 843016	  cdd08	busybox_old
 829911	   4086	    880	 834877	  cbd3d	busybox_unstripped

FIXME: setup_common_bufsiz() calls are missing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21 17:39:11 +02:00
Denys Vlasenko
966423d403 Start 1.25.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-12 14:36:39 +02:00
Denys Vlasenko
7ab00a0de9 Bump version to 1.24.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-12 14:33:03 +02:00
Maninder Singh
97c6491b4e typo fixes
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25 13:46:36 +02:00
Bartosz Golaszewski
6c19d35f68 Makefile: fix cscope target
This target doesn't work with current directory layout. Just make cscope
index all .c and .h files.

While we're at it: add cscope output files to .gitignore.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-31 21:29:05 +01:00
Denys Vlasenko
b9965077e5 Start 1.24.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-24 02:06:02 +01:00
Denys Vlasenko
6968e08123 Bump version to 1.23.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-24 01:48:20 +01:00
Denys Vlasenko
57434022ce Start 1.23.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-01 00:44:30 +01:00
Denys Vlasenko
a2dd4ee0e8 Bump version to 1.22.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-01 00:42:11 +01:00
Denys Vlasenko
f474dfa681 Start 1.22.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:56:21 +01:00
Denys Vlasenko
64406a92a0 Bump version to 1.21.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:51:23 +01:00
Mike Frysinger
5694afd72a build system: use pkg-config to look up selinux libs
Newer versions of libselinux has started linking against more libs.
Rather than continuing hardcoding things, switch to using pkg-config
to query for its dependencies.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-20 15:01:26 -04:00
Denys Vlasenko
b9d494453d Start 1.21.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-22 03:47:39 +02:00
Denys Vlasenko
f5234398ef Bump version to 1.20.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-22 03:38:31 +02:00
Denys Vlasenko
8b141ebd45 Start 1.20.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13 08:56:58 +02:00
Denys Vlasenko
d84b175cb6 Bump version to 1.19.0, update copyright year in help message
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-13 08:46:00 +02:00
Daniel Fandrich
126f2b2853 Support configuring Busybox from _defconfig files
The existing test .config files are moved to configs/ and renamed
to *_defconfig. 'make xyz_defconfig' will enable the
configuration in that specific file.

Signed-off-by: Daniel Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 07:59:16 +02:00
Denys Vlasenko
d488f5e8db build system: delete generated files on "make mrproper"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-07 10:01:58 +02:00
Chris Rees
12caabfa2d build system: do not use GNU-isms in find
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-30 09:41:39 +01:00
Denys Vlasenko
7386dd1e8a Start 1.19.0 development cycle
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-23 12:50:40 +01:00
Denys Vlasenko
5ab20641d6 Bump version to 1.18.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-23 09:21:44 +01:00
Denys Vlasenko
833d4e7f84 rename archival/libunarchive -> archival/libarchive; move bz/ into it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
17fc33dfbd finish busybox.1 renaming
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:46:16 +02:00
Denys Vlasenko
9ce07e778f bbconfig: add COMPRESS_BBCONFIG option
function                                             old     new   delta
bbconfig_config_bz2                                    -    4905   +4905
bbconfig_main                                         13      70     +57
bbconfig_config                                    21811       -  -21811
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 4962/-21811)    Total: -16849 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 14:36:11 +02:00
Denys Vlasenko
adbe3b5b98 build system: make 3.82 fix. Closes bug 2323
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-22 09:28:46 +02:00
Denys Vlasenko
89a1cace3b Start 1.18.0 development cycle
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 15:47:35 +02:00
Denys Vlasenko
b2d95147c9 bump version to 1.17.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 04:16:50 +02:00
Denys Vlasenko
5c296de390 fix compile breakage with "make -j"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-03 14:28:35 +02:00
Denys Vlasenko
8d444494ef another fix to gen_build_files / autoconf.h dependency
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 13:56:28 +02:00
Denys Vlasenko
1d72d43940 gen_build_files.sh is an order prerequisite only for autoconf.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 13:30:59 +02:00
Denys Vlasenko
e69c5e2429 build system: make gen_build_files.sh run before autoconf.h generation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 12:58:17 +02:00
Denys Vlasenko
6c5bf0d347 make it possible to have include/applets.h-esque entries in .c files
As an example, bunzip2 and bzcat is changed to use it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 00:53:45 +02:00
Denys Vlasenko
4f63c7931c fix unescaped $ in makefile
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-23 16:14:06 +02:00
Peter Tyser
0bb2980605 Makefile: Clean up auto-generated Kbuild and Config.in files
Previously these auto-generated files were left behind after a 'make
mrproper' was ran.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 02:48:21 +02:00