Commit Graph

4 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
4c8fa34417 generate_BUFSIZ.sh: yet another tweak
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-24 14:13:35 +02:00
Bjørn Forsman
102b8bde3b .gitignore: add missing ignores
Ignore output files created by "make defconfig; make".

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:54:15 +01:00
Mike Frysinger
3322351724 add .gitignore files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-05 09:05:30 -04:00