Commit Graph

375 Commits

Author SHA1 Message Date
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
724d196c75 Move applets/applet.c into libbb, allows to get rid of --whole-archive
(smaller code). Tested in static and shared mode.
2007-10-10 14:41:07 +00:00
Denis Vlasenko
141750e388 trylink: s/strip/$STRIP/g 2007-10-10 10:05:35 +00:00
Denis Vlasenko
42e418292d trylink: trivial cleanup 2007-10-09 18:01:13 +00:00
Denis Vlasenko
01f3b2c91a trylink: reformat link flags for readability
trylink: add --sort-section alignment:
    text           data     bss     dec     hex filename
-   6557            428    3260   10245    2805 busybox
+   6555            428    3260   10243    2803 busybox
- 909621           1076   12108  922805   e14b5 libbusybox.so.1.8.0.svn
+ 908868           1050   12016  921934   e114e libbusybox.so.1.8.0.svn
2007-10-09 13:49:26 +00:00
Denis Vlasenko
d19b87ece4 trylink: remove useless redirects, add missing error checks 2007-10-09 13:08:02 +00:00
Denis Vlasenko
8d755adc1a trylink: trivial fixes 2007-10-09 10:15:41 +00:00
Denis Vlasenko
e9fd69c8e8 make "individual applets" build less noisy.
add *.tmp to list of files deleted by make mrproper.
2007-10-08 22:16:14 +00:00
Denis Vlasenko
642a52d65e make --help work for "individual applets" too. 2007-10-07 21:00:41 +00:00
Denis Vlasenko
d62fd84d4b libbusybox: move (possibly compressed) help stuff into libbusybox.
Makes individual binaries much smaller.
2007-10-07 20:46:34 +00:00
Denis Vlasenko
f545be083d reviving libbusybox, adding CONFIG_INDIVIDUAL part 4 2007-10-07 17:06:26 +00:00
Denis Vlasenko
def8898596 reviving libbusybox, adding CONFIG_INDIVIDUAL part 3 2007-10-07 17:06:01 +00:00
Denis Vlasenko
76a6b236a9 reviving libbusybox, adding CONFIG_INDIVIDUAL part 2 2007-10-07 17:05:42 +00:00
Denis Vlasenko
3240474c23 reviving libbusybox, adding CONFIG_INDIVIDUAL part 1 2007-10-07 17:05:22 +00:00
Denis Vlasenko
c9dc2ac578 make variables static 2007-09-27 10:08:02 +00:00
Denis Vlasenko
a619b85ef5 check-lxdialog.sh: no point in giving up, maybe -lcurses will work? 2007-09-26 18:18:59 +00:00
Bernhard Reutner-Fischer
3a252b8c12 - add microcom to defconfig 2007-09-22 21:13:17 +00:00
Denis Vlasenko
9862e6b056 trylink: reinstate accidentally deleted --verbose
trylink: remove commented-out parts
2007-09-03 11:28:14 +00:00
Bernhard Reutner-Fischer
d2bb2d3918 - Generally strip off -l that does not pull in a lib.
If l_list is non-empty then add the group flags.
2007-09-02 15:28:30 +00:00
Bernhard Reutner-Fischer
8d91c13df5 - fix bug where we linked again -lm even though it is not needed.
For BBOX_LIB_LIST="crypt m" trylink ... with just applet true, we pulled in
  libm because in this case we tried to use invalid flags (plain "-l" without
  a lib) which of course failed, thus the script thought that -lm was needed.

  The fix is not to pass "-l" without a lib if we are about to check if any
  or the last remaining lib is really needed.
2007-09-02 14:51:54 +00:00
Denis Vlasenko
f87f495e65 Update defconfig; fix comments 2007-08-24 10:27:41 +00:00
Denis Vlasenko
028f2d651c build system: stop moaning about unset integer CONFIGs. 2007-08-23 14:11:30 +00:00
Denis Vlasenko
18f2a6bc5e s/communal/common/ part 2 2007-08-21 10:54:59 +00:00
Denis Vlasenko
f7d9e84bc5 s/communal/common/ 2007-08-21 10:54:34 +00:00
Denis Vlasenko
0372f0f199 httpd: extend -p PORT to -p [IP[v6]:]PORT
httpd: comment out strange code which "closes connection properly"
(isnt exit(0) good enough?)

handle_incoming_and_exit                               -    2246   +2246
httpd_main                                          1116    1141     +25
getLine                                               75      77      +2
packed_usage                                       22827   22811     -16
parse_conf                                          1303    1284     -19
shutdown                                              32       -     -32
handleIncoming                                      2578       -   -2578
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/2 up/down: 2273/-2645)       Total: -372 bytes
   text    data     bss     dec     hex filename
 774704    1058   11092  786854   c01a6 busybox_old
 774335    1058   11092  786485   c0035 busybox_unstripped
2007-08-14 16:50:01 +00:00
Denis Vlasenko
dbe6e66d6a trylink: automatically use custom link script if user provides one
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
2007-08-14 16:43:01 +00:00
Denis Vlasenko
3952f20c24 expand, unexpand: new applets from Tito <farmatito@tiscali.it> 2007-08-13 14:10:24 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
eea72123a3 patch: fix -p -1 handling
checkstack.pl: add blackfin (by Alex Landau <landau_alex@yahoo.com>)
2007-08-06 13:34:10 +00:00
Denis Vlasenko
73f21e9cb3 trylink: s/&& exit 1/|| exit 1/ (spotted by Alex Landau <landau_alex@yahoo.com>) 2007-08-06 12:18:01 +00:00
Denis Vlasenko
8274e06677 sed: fix 'q' command handling ("Nguyen Thai Ngoc Duy" <pclouds@gmail.com>)
add testsuite entry for it. Fix applet order checker. Fix cmp yelling.
trylink: fix error file and map file generation
applets: fix applet order
2007-08-06 03:41:08 +00:00
Denis Vlasenko
557fb713e0 chpasswd: fixes and code shrink
update_passwd                                        732     734      +2
chpasswd_main                                        318     292     -26
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-26)             Total: -24 bytes
   text    data     bss     dec     hex filename
 781564    1168   11900  794632   c2008 busybox_old
 781548    1168   11900  794616   c1ff8 busybox_unstripped
2007-07-21 13:25:28 +00:00
Denis Vlasenko
21d1014b5b chpasswd: new applet by Alexander Shishkin <virtuoso@slind.org> 2007-07-20 21:28:41 +00:00
Denis Vlasenko
2a86a61c27 ifup/ifdown: make location of ifstate configurable 2007-07-19 21:49:30 +00:00
Denis Vlasenko
150d2fa114 Modify method of linking against libs. Now we fisrt try all
specified libs, and if it succeeds, we try to remove them
one-by-one. If link succeeds, then library is thrown out.
Should solve the problem with SELinux linking in libsepol
even when not needed.
2007-07-17 20:39:27 +00:00
Denis Vlasenko
fb79a2e2cf xioctl and friends by Tito <farmatito@tiscali.it>
function                                             old     new   delta
do_iptunnel                                          203     977    +774
process_dev                                         5328    5494    +166
ioctl_or_perror                                        -      54     +54
ioctl_or_perror_and_die                                -      51     +51
ioctl_alt_func                                         -      49     +49
bb_ioctl_or_warn                                       -      47     +47
do_add_ioctl                                         102     145     +43
bb_xioctl                                              -      39     +39
print_value_on_off                                     -      31     +31
get_lcm                                              105     123     +18
arp_main                                            2155    2167     +12
..................
zcip_main                                           1576    1566     -10
setlogcons_main                                       92      82     -10
dumpkmap_main                                        263     253     -10
do_get_ioctl                                          85      75     -10
setkeycodes_main                                     165     154     -11
write_table                                          244     232     -12
vconfig_main                                         318     306     -12
do_del_ioctl                                          93      81     -12
set_address                                           75      62     -13
maybe_set_utc                                         30      16     -14
loadfont_main                                        495     479     -16
slattach_main                                        712     695     -17
do_loadfont                                          191     174     -17
do_iplink                                           1155    1136     -19
getty_main                                          2583    2562     -21
fbset_main                                          2058    2035     -23
do_time                                              588     565     -23
xioctl                                                25       -     -25
read_rtc                                             186     160     -26
parse_conf                                          1299    1270     -29
udhcp_read_interface                                 269     239     -30
bb_ioctl                                              45       -     -45
bb_ioctl_alt                                          70       -     -70
bb_ioctl_on_off                                       78       -     -78
.rodata                                           129370  129018    -352
do_show                                              799       -    -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864)     Total: -548 bytes
   text	   data	    bss	    dec	    hex	filename
 675352	   2740	  13968	 692060	  a8f5c	busybox_old
 674804	   2740	  13968	 691512	  a8d38	busybox_unstripped
2007-07-14 22:07:14 +00:00
Bernhard Reutner-Fischer
1399282b47 - need to pass the PATH down to the gcc-version check to be able to find the correct cc.
Fixes make PATH="$CROSS_BIN:$PATH" CROSS_COMPILE=foo- like invocations that previously failed to resolve since the information about the path set by the user was lost.
2007-06-25 10:41:01 +00:00
Bernhard Reutner-Fischer
118b81df76 - handy to have the cross_compile block here, too 2007-06-22 17:39:21 +00:00
Denis Vlasenko
d67a606489 build system: remove kernel .config locations (spotted by walter harms <wharms@bfs.de>) 2007-06-21 12:57:29 +00:00
Denis Vlasenko
2d25491ed0 defconfig: update 2007-06-19 11:33:48 +00:00
Denis Vlasenko
d4fea900bd add script which measures stack consumption.
Current top users:

0x08052f52 uncompress []:                               393312
0x080c8a58 input_tab []:                                82104
0x08092d5b ifaddrlist []:                               32828
0x08056163 loadfont_main []:                            32796
0x0806e508 colon []:                                    16532
0x08056095 do_loadfont []:                              16400
0x0806da70 place_cursor []:                             16388
0x080792e8 login_main []:                               9176

393 kb of stack??? OMG...
2007-06-10 00:54:27 +00:00
Bernhard Reutner-Fischer
4b49512881 - update defconfig 2007-06-07 13:12:51 +00:00
Denis Vlasenko
74324c8666 Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly.
code: -103 bytes
2007-06-04 10:16:52 +00:00
Denis Vlasenko
4e5f82c76f find_stray_communal_vars: script which finds communal variables
resize: remove globals var
mdev: remove globals var
2007-06-03 22:30:22 +00:00
Denis Vlasenko
4b924f3a5c whitespace fixes 2007-05-30 00:29:55 +00:00
Bernhard Reutner-Fischer
64332bf857 - busybox.c was removed a while ago 2007-05-15 09:07:06 +00:00
Denis Vlasenko
be1a9d4237 deluser: add optional support for removing users from groups
(by Tito <farmatito@tiscali.it>)
2007-04-15 08:43:23 +00:00
Denis Vlasenko
87468857f6 style fixes 2007-04-13 23:22:00 +00:00
Denis Vlasenko
51742f4bb0 style fixes. No code changes 2007-04-12 00:32:05 +00:00
Denis Vlasenko
e4f2d064b0 rename: run_applet_by_name -> run_applet_and_exit 2007-04-11 17:03:19 +00:00
Denis Vlasenko
80d14beae9 Rename two config options:
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes
2007-04-10 23:03:30 +00:00
Denis Vlasenko
5694d5f8d2 adding small script, mostly for documentational purposes 2007-04-08 15:12:21 +00:00
Bernhard Reutner-Fischer
00c2c4868a - clean up addgroup, fix adding users to existing groups and make it optional (Tito) 2007-04-05 13:16:39 +00:00
Bernhard Reutner-Fischer
45aebfd32d - bail out if either file does not exist
Avoids filling my scrollback-buffer with superfluous information ;)
2007-04-05 12:27:12 +00:00
Bernhard Reutner-Fischer
febe3c4211 - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g" 2007-04-04 20:52:03 +00:00
Bernhard Reutner-Fischer
3d43edb28c - update defconfig 2007-03-28 22:19:46 +00:00
Bernhard Reutner-Fischer
0a537a0c57 - move additional fancy options not mandated by SUSv3 into a FANCY option 2007-03-28 16:48:40 +00:00
Bernhard Reutner-Fischer
10f8f5f443 - rough prototype for split(1). TODO: Still needs some love since it's way too big..
text	   data	    bss	    dec	    hex	filename
    602	      4	      0	    606	    25e	coreutils/split.o
2007-03-25 21:50:18 +00:00
Denis Vlasenko
41e1dc3f8b make clean deletes .kernelrelease now
trylink deleted empty linker stderr on success
2007-03-18 21:45:21 +00:00
Mike Frysinger
7a96504d30 dont use obsolete function index() as pointed out by src.obsolete.funcs 2007-03-17 06:29:05 +00:00
Denis Vlasenko
84a9b8750e build system: produce link map. Rather useful when you
are wondering why your busybox is much bigger that you hoped for.
2007-03-15 23:44:10 +00:00
Denis Vlasenko
5df955fce2 Do not fail password check if shadow password does not exist -
fall back to ordinary one

Reduced usage of functions returning datain static buffers.
(mostly passwd/group/shadow related):

function                                             old     new   delta
correct_password                                     143     193     +50
sulogin_main                                         490     533     +43
adduser_main                                         732     774     +42
passwd_main                                         1875    1915     +40
addgroup_main                                        330     365     +35
bb_internal_getspnam                                  38       -     -38
bb_internal_fgetpwent                                 38       -     -38
bb_internal_fgetgrent                                 38       -     -38
static.resultbuf                                     168      88     -80
static.buffer                                       1872    1104    -768
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 5/2 up/down: 210/-962)         Total: -752 bytes
2007-03-13 13:01:14 +00:00
Denis Vlasenko
ecea8f201e update defconfig 2007-03-11 12:29:25 +00:00
Bernhard Reutner-Fischer
71bc71a7dc - add chrt applet.
text    data     bss     dec     hex filename
    769       0       0     769     301 miscutils/chrt.o
and could use some further shrinkage
2007-03-09 16:56:38 +00:00
Bernhard Reutner-Fischer
e11b4a4705 - add selinux applets to the IMA workaround 2007-03-09 08:46:31 +00:00
Denis Vlasenko
018e085d44 stop using bash'isms ('function')
runtest: do not depend on busybox.links
2007-02-25 00:40:37 +00:00
Bernhard Reutner-Fischer
9a1c71a0f2 - check if the compiler supports -fwhole-program -- 4.0 does not 2007-02-12 12:57:38 +00:00
Denis Vlasenko
45854b5e3f mkconfigs: remove echo "..." contortion 2007-02-04 02:38:21 +00:00
Denis Vlasenko
a5c5ae03eb add TODO 2007-02-03 12:50:41 +00:00
Bernhard Reutner-Fischer
493691a4f5 - minor tweak 2007-02-02 16:11:24 +00:00
Denis Vlasenko
c562bb7487 disable -Wold-style-definition for gcc 3.x 2007-01-29 17:08:51 +00:00
Denis Vlasenko
e0eebc1ef3 Make -Werror configurable 2007-01-27 13:44:53 +00:00
Denis Vlasenko
b9a279ba94 Unify ping and ping6. ping has -4 and -6 which force
name resolution into IP or IPv6 only, otherwise
we take address family returned by host2sockaddr()
in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping,
"ping 127.0.0.1" will do IPv4 ping.
ping6 is aliased to "ping -6".
2007-01-24 23:53:22 +00:00
Bernhard Reutner-Fischer
1c747b32c7 - add hostcc-option checker 2007-01-23 11:44:14 +00:00
Bernhard Reutner-Fischer
b5bb40f088 - add an unsupported makefile for IMA compiles
Nice for catching eventual breakage early on..
2007-01-23 01:29:04 +00:00
Denis Vlasenko
5de9e9ce0b clean up commented out old code 2007-01-22 22:46:04 +00:00
Denis Vlasenko
3c99a59915 remove obsolete FEATURE_WGET_IP6_LITERAL 2007-01-22 09:14:02 +00:00
Denis Vlasenko
d8760a705c defconfig: refresh 2007-01-22 09:12:15 +00:00
Denis Vlasenko
38f6319421 cmdedit is not a 'command' editing anymore, it's just editing (generic),
so rename stuff accordingly.
2007-01-22 09:03:07 +00:00
Denis Vlasenko
00cdbd8fc2 Introduce FEATURE_EDITING_FANCY_KEYS, so that user can disable
less-known keys (e.g. Ctrl-B/E/F)
2007-01-21 19:21:21 +00:00
Denis Vlasenko
2f0c0d0b88 Introduce FEATURE_EXEC_PREFER_APPLETS = "re-execute our own
executable if we asked to exec someting with argv[0] == known_applet"
Use it in init. Also respect PATH in init, remove explicit "/sbin" etc
from exec. Patch by Gabriel L. Somlo <somlo@cmu.edu>
2007-01-21 00:41:04 +00:00
Denis Vlasenko
91f20ab510 fixes for amd64 compilation 2007-01-20 01:47:44 +00:00
Bernhard Reutner-Fischer
9e8df9354a - replace some occurances of "kernel" with busybox 2007-01-17 19:36:01 +00:00
Denis Vlasenko
150f402b36 whitespace fixes (leading spaces to tab) 2007-01-13 21:06:21 +00:00
Denis Vlasenko
6536a9b583 next part of ipv6-ization is here: wget & httpd 2007-01-12 10:35:23 +00:00
Denis Vlasenko
f7996f3b70 Trailing whitespace removal over entire tree 2007-01-11 17:20:00 +00:00
Bernhard Reutner-Fischer
f0b71c19ae - add arp to defconfig 2007-01-07 12:18:59 +00:00
Denis Vlasenko
3697a829de "kernel" => "busybox" 2007-01-06 10:31:45 +00:00
Denis Vlasenko
d1a302b52f rt_names: stop allocating 5k in rwdata
objsizes: don't show build machinery's object modules
2006-12-31 20:40:20 +00:00
Denis Vlasenko
cb04ff5c68 fixdep.c: avoit doing memcmp in most cases
uidgid_get.c: add forgotten copyright notice
pwd/grp/shadow: avoid collisions with libc names
2006-12-30 21:11:57 +00:00
Denis Vlasenko
80602a98bc saw commit of vapier@busybox.net (thanks!),
decided to stop doing FOUR memcmp's per each input character.
I should have fixed this much earlier...
2006-12-30 19:52:28 +00:00
Mike Frysinger
1b3e8179a2 kill off AUTOCONF_INCLUDED (again) since it tends to get into cat fights with the kernel headers 2006-12-30 19:46:38 +00:00
Mike Frysinger
68ffb9a85d make sure AUTOCONF_TIMESTAMP is filled up properly ... if user has a timezone of Factory for example, strftime() will overflow the string and leave us without a trailing "\n and all hell breaks loose when we compile 2006-12-30 19:43:35 +00:00
Mike Frysinger
40ae9b5617 prevent buffer underflows with empty lines 2006-12-30 19:30:20 +00:00
Mike Frysinger
c255f8b492 prevent accessing memory that we dont own 2006-12-30 19:21:48 +00:00
Denis Vlasenko
0849207ce0 convert "negaite" config option into reversed (INCLUDE_SUSv2) 2006-12-22 13:56:36 +00:00
Bernhard Reutner-Fischer
359d7ca0e7 - rename SU_SYSLOG to FEATURE_SU_SYSLOG 2006-12-19 08:55:38 +00:00
Denis Vlasenko
a883fa4cee exterminate last bzero's
version bump to 1.3.0
2006-12-13 23:52:32 +00:00
Denis Vlasenko
eb98be02ac "kernel config" -> "busybox config"
suggested by Roberto A. Foglietta <roberto.foglietta@gmail.com>
2006-11-30 22:40:32 +00:00
Denis Vlasenko
2425bdce34 od: fix buglet in --traditional, microoptimization,
document coreutils bug
bloat-o-meter: account for objects in rodata too
2006-11-29 14:32:01 +00:00
Denis Vlasenko
c61852a02b fix support for globally disabling --long-options.
(disabling them saves ~4K on fully configured bbox)
2006-11-29 11:09:43 +00:00
Denis Vlasenko
75f8d080a2 telnetd: we were having telnetd with is ONLY inetd or ONLY standalone.
What if I need to have both?? This patch introduces
CONFIG_FEATURE_TELNETD_STANDALONE: y - both, n - only inetd.
2006-11-22 15:54:52 +00:00
Bernhard Reutner-Fischer
d6bbf99a8b - reinstate "make checkhelp" 2006-11-22 09:39:48 +00:00
Bernhard Reutner-Fischer
921f5df25f - add 'ip rule' support. First take..
text    data     bss     dec     hex filename
   2999       0       0    2999     bb7 networking/libiproute/iprule.o
2006-11-21 15:36:08 +00:00
Bernhard Reutner-Fischer
3e7ef7ead4 - update defconfig 2006-11-21 10:53:05 +00:00
Denis Vlasenko
04291bc5ae httpd: slight reduction of #ifdef forest
few other applets: #ifdef CONFIG_ -> #if ENABLE_
traceroute: fix exposed bugs
defconfig: update
2006-11-21 10:15:25 +00:00
Bernhard Reutner-Fischer
d35d540217 - add nmeter and raidautorun to defconfig. 2006-10-24 20:07:29 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
b79b87a30f build system: (try to) get rid of bb_config.h hack 2006-10-19 22:17:44 +00:00
Denis Vlasenko
9fa9950784 build system: check for ENABLE_, USE_ and SKIP_ (not only for CONFIG_) 2006-10-19 22:14:58 +00:00
Denis Vlasenko
b560577cb2 move usage_compressed.h generation into applets/ 2006-10-19 22:12:47 +00:00
Denis Vlasenko
fdc101782a scripts/usage.c: de-uglify #includes 2006-10-19 22:10:07 +00:00
Denis Vlasenko
4fa499a17b build system: remove loeftover (two empty dirs) 2006-10-06 13:51:04 +00:00
Denis Vlasenko
a3310527db make defconfig now works 2006-10-05 18:26:35 +00:00
Denis Vlasenko
8bf7bb8541 yet another fixlet: make clean/distclean/mrproper 2006-10-05 17:42:55 +00:00
Denis Vlasenko
1868409c86 fixing build system overhaul fallout... 2006-10-05 17:11:08 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Denis Vlasenko
57308afb5b dpkg: reduce bss usage by ~130 kbytes (yes, kilobytes!)
at the cost of ~100 bytes of text.
Improves friendliness to nommu systems.
(Dunno whether nommu people ever use dpkg, though...)
2006-09-28 22:34:46 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Bernhard Reutner-Fischer
6eb2f8edce - make sure that the 'build' dir exists even if we are about to build just one applet. 2006-09-14 15:07:48 +00:00
Bernhard Reutner-Fischer
1d6fb6d448 - do away with silly comment and do the Right Thing wrt building the archives.
You have to provide the absolute path to the objdir/target.ext you want to build, as can be seen in the respective makefiles..
2006-09-14 15:04:31 +00:00
Rob Landley
519d7df930 Another whack at scripts/individual. Now builds 212 applets. 2006-08-09 20:56:23 +00:00
Rob Landley
236c6755d2 Teach md5sum and sha1sum to work the way other applets do so I don't have to
teach scripts/individual new tricks.  And while I'm at it, teach
scripts/individual other new tricks.  Now builds 198 applets, some of which
I should teach it to hardlink together because they're really the same app...
2006-08-06 02:13:36 +00:00
Rob Landley
affb7a61a6 scripts/individual now builds 171 applets. Some of them may even work. :) 2006-08-05 00:41:39 +00:00
Rob Landley
cb376eebf0 Digging up my old "make standalone" stuff from a year ago:
http://busybox.net/lists/busybox/2005-September/015766.html

I renamed it "individual" to not confuse it with the standalone shell.  (Which
it isn't compatible with for obvious reasons.)  Configure busybox (I did
make defconfig), then run scripts/individual and it'll build an individual
version of each applet in the "build" subdirectory.

Currently it builds 146 and fails to build 104 applets out of "make defconfig".
I haven't taught it about multi-file applets yet (like tar), or the ones where
two applets get built from the same source (for example, zcat is a trivial
variant of gunzip so there is no zcat.c).  But here's a start.
2006-08-04 21:05:33 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
"Robert P. J. Day"
7ccb65f3a4 Yet more "#if 0" content removed. 2006-07-01 15:09:17 +00:00
Bernhard Reutner-Fischer
1761b9dabe - use shorter boilerplate, more accurate header guard
- don't use multi-line string literals
2006-06-15 21:56:28 +00:00
Bernhard Reutner-Fischer
7011dd0e06 - drats. 2006-06-15 21:39:34 +00:00
Bernhard Reutner-Fischer
42f091a761 - let the scripts be prerequisites of the files the generate
- make sure that bbconfig isn't too stupid
2006-06-15 21:35:35 +00:00
Bernhard Reutner-Fischer
f81ac42689 - remove superfluous CONFIG_BEGIN and CONFIG_END 2006-06-11 18:04:23 +00:00
Rob Landley
3252b625b7 Since we have less than 100k of usage.h data anyway, using bzip -9 is silly.
That says use 900k chunks when compressing, which needs about 4 megs of data
structures to undo the Burrows-Wheeler transform.  Switching it down to
bzip -1 (100k chunks) should have no impact on the compression (since it
still all fits in one chunk) but should reduce runtime decompression memory
requirements to something like 500k.  Still larger than gunzip, but not
egregiously so.
2006-05-30 19:19:45 +00:00
Rob Landley
f14f7fc5ca Teach bloatometer about .rodata, and tweak the display into something that
has a better chance of getting merged.
2006-05-29 20:56:27 +00:00
Bernhard Reutner-Fischer
d29337580e - use strtol instead of strtoll if the latter does not exist
- add and use wrapper for attribute
- add and use replacement for vasprintf if it is unavailable
2006-05-26 19:58:58 +00:00
Bernhard Reutner-Fischer
7fca7e3378 - use the SED given by the user
- use the portable `` instead of $(). There is no bbsh, so this is needed.
2006-05-26 13:28:39 +00:00
Bernhard Reutner-Fischer
7fd9983c56 - patch from Tito to pretty print the overall delta 2006-05-26 10:29:40 +00:00
Mike Frysinger
fa6c4844b2 fix spelling mistakes 2006-05-26 01:48:17 +00:00
Bernhard Reutner-Fischer
a1e130f122 - check for existing usage binary, so it get's more obvious that the toplevel
Makefile uses the wrong path to the binary (it's in top_builddir and not in top_srcdir)
2006-05-21 10:45:01 +00:00
Rob Landley
712ba85b30 Tweak suggested by Matt Mackall when I submitted the bloat-o-meter changes
back to linux-kernel...
2006-05-08 18:30:33 +00:00
Rob Landley
a336e7cc25 Script to easily get an assembly dump of a single function. 2006-05-07 20:58:55 +00:00
Rob Landley
f8a8084267 Add "make bloatcheck" to run Matt Mackall's bloat-o-meter. Copy an old
busybox_unstripped to busybox_old, build a new version, and "make bloatcheck"
to see a detailed breakdown of the size difference.
2006-05-07 19:26:53 +00:00
Bernhard Reutner-Fischer
0e413e53e9 - ignore missing helptext for options which are not selectable. 2006-05-05 14:05:21 +00:00
Bernhard Reutner-Fischer
3916b2a560 - add script to check for missing help entries of config options
Currently we have these errors:

./modutils/Config.in: No helptext for 'CONFIG_FEATURE_QUERY_MODULE_INTERFACE'
./networking/Config.in: No helptext for 'CONFIG_IPADDR'
./networking/Config.in: No helptext for 'CONFIG_IPLINK'
./networking/Config.in: No helptext for 'CONFIG_IPROUTE'
./networking/Config.in: No helptext for 'CONFIG_IPTUNNEL'
./coreutils/Config.in: No helptext for 'CONFIG_UNIX2DOS'
2006-05-04 11:38:33 +00:00
Mike Frysinger
2514042661 termios.h is already included so dont include sys/termios.h as well 2006-04-29 04:45:22 +00:00
Rob Landley
7e21d5f6b1 Patch from Dennis Vlasenko to add the option to compress help text. 2006-04-27 23:34:46 +00:00
Bernhard Reutner-Fischer
06a81d368e - patch from Denis Vlasenko to make sizes PHONY and to add objsizes which prints
the sizes of the individual object files.
2006-04-26 10:10:25 +00:00
Mike Frysinger
f162183527 kill signed warnings 2006-04-20 04:00:11 +00:00
Mike Frysinger
0436b9f482 use strchr() not index() 2006-04-16 05:54:31 +00:00
Bernhard Reutner-Fischer
cb8d4319a3 find ./ -name .cvsignore | xargs svn rm 2006-03-29 15:51:19 +00:00
Bernhard Reutner-Fischer
df10094870 - revert back to r14406 2006-03-13 19:04:00 +00:00
Bernhard Reutner-Fischer
022eb311d5 - use absolute path for top_builddir and top_srcdir.
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e - fixes parallel builds (make -j)
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
e7c43b66d7 Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
Rob Landley
0d8766a3b1 Rename UNUSE() to SKIP(). 2006-02-20 23:05:06 +00:00
"Vladimir N. Oleynik"
b267f13c61 quick copy-paste typo 2006-02-17 09:05:41 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b moved BB_BANNER to applets/version.c file: make kernel like version,
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
"Vladimir N. Oleynik"
cb9b114d35 isolate and show busybox`s changes 2006-02-16 14:28:17 +00:00
"Vladimir N. Oleynik"
6732af2766 full removed config.h, use bb_config.h only 2006-02-15 12:29:37 +00:00
Bernhard Reutner-Fischer
5ba53c05fc - commentary typos 2006-02-14 10:43:40 +00:00
"Vladimir N. Oleynik"
63ca3bfe9d commentary typos. Thank by aldot 2006-02-14 09:23:25 +00:00
Rob Landley
7bfa88f315 New USE() macros
For each CONFIG_SYMBOL, include/bb_config.h now has both ENABLE_SYMBOL
and USE_SYMBOL(x).  ENABLE_SYMBOL is still always defined (1 or 0) so that
if(ENABLE) should optimize out when it's zero.  The USE_SYMBOL(X) will only
splice in X if the symbol is defined, otherwise it'll be empty.

Thus we can convert this:

#ifdef CONFIG_ARGS
    opt = bb_getopt_ulflags(argc, argv, "ab:c"
#ifdef CONFIG_THINGY
        "d:"
#endif
        , &bvalue
#ifdef CONFIG_THINGY
        , &thingy
#endif
    );
#endif

into this:
    if (ENABLE_ARGS) {
        opt = bb_getopt_ulflags(argc, argv, "ab:c" USE_THINGY("d:"), &bvalue
                USE_THINGY(, &thingy));
    }

And it should produce the same code.

Unlike the old versions in include/_usage.h, the new USE_SYMBOL(x) can handle
commas in its arguments (as shown above).  (The _usage.h file is obsolete and
no longer generated.)

Nobody should need to include config.h directly anymore, bb_config.h should
define all the configuration stuff we need.  Someday, the CONFIG_SYMBOL
versions should go away in favor of ENABLE_SYMBOL and USE_SYMBOL().

Thanks to vodz for the new version of bb_mkdep.c that works with function
macros.
2006-02-13 19:16:41 +00:00
Bernhard Reutner-Fischer
f251ec6847 - commentary typos 2006-02-12 11:25:32 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
4d57926bd3 removed unneed signed, avoid warning 2006-01-31 11:57:06 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
7a43bd07e6 Zap sysdeps directory, moving Config.in and defconfig to top of tree.
(Busybox should not be system dependent enough to have different default
configurations for different platforms.  We're not a kernel.)
2006-01-20 17:47:09 +00:00
Rob Landley
9a1e25d994 Make a few warnings go away. 2005-12-19 16:30:33 +00:00
"Vladimir N. Oleynik"
083d3f49c2 bb_mkdep: Rewroted. removed problem "include name must uniq", speed up * 3.
e2fsprogs: remove confuse bb_mkdep. Use internal e2fsprogs includes only.
other: remove confuse bb_mkdep.
2005-10-10 11:35:17 +00:00
"Vladimir N. Oleynik"
6c0642d772 fast replace if src outside 2005-10-07 15:36:26 +00:00
"Vladimir N. Oleynik"
664c6e7ea0 update documentation 2005-10-06 14:53:43 +00:00
"Vladimir N. Oleynik"
d5f2a18e19 bb_mkdep can use src outside now 2005-10-06 14:47:16 +00:00
"Vladimir N. Oleynik"
d128b71820 speed up * 2 2005-10-03 10:08:46 +00:00
"Vladimir N. Oleynik"
4cbe45934e small bug found after strength test 2005-09-19 10:26:45 +00:00
"Vladimir N. Oleynik"
af0dd596a8 speed up +10%, update (c), make CONFIG_FEATURE_MOD2_4 as config/feature/mod_2_4 2005-09-16 13:57:33 +00:00
Rob Landley
bfd94c4331 Whitespace patch (and removal of gratuitous use of cat) by Berhnard Fischer. 2005-09-15 18:33:30 +00:00
"Vladimir N. Oleynik"
7573ac6edf bb_mkdep version 2.0. speed up *2, remove problem of find e2fsprogs/uu*.h, spelling corrections by Bernhard Fischer 2005-09-14 15:09:06 +00:00
Rob Landley
2ee82723a8 Our config should write out each symbol once and only once, but still write
out all symbols in all sub-menus.  I think this finally does it right.
2005-09-14 14:40:01 +00:00
"Vladimir N. Oleynik"
676e95ea3d bb_mkdep release. speed up *3, clearing, more comments 2005-09-13 16:50:53 +00:00
"Vladimir N. Oleynik"
b1fe462116 bb_mkdep speed up * 10! 2005-09-12 16:39:47 +00:00
"Vladimir N. Oleynik"
5e60dc4a20 new my scripts/mm_mkdep, dependences work now 2005-09-12 12:33:27 +00:00
Rob Landley
6b00d0d3ca Put the menu_is_visible test back because it avoids printing spurious
(albeit commented out) garbage.
2005-09-08 11:50:48 +00:00
Rob Landley
8f99104362 The previous commit left confdata writing out:
CONFIG_NUMERIC_CONSTANT=

And on reading it back in, it would complain that '' was an invalid value for
that field.  I.E. "make allnoconfig && make" worked fine, but
"make allnoconfig && make menuconfig" barfed reading in the config file.

So now I have it write out "0" as the blank value.  (It's initialized to the
default value when the menu becomes visible anyway; I checked.)  That seems
to work.
2005-09-05 11:04:30 +00:00
Rob Landley
8a7a678b03 Fixes so "make allnoconfig" works again.
The configure system's save function edited out sub-menus that wouldn't be
displayed in the current configuration, meaning config.h wouldn't have #udef
entries for those symbols, meaning bb_config.h would have the relevant
ENABLE_ missing instead of defined to 0.  This broke the build.

So I fixed it, and then reorganized the applets.c and busybox.c to take
away the warnings this revealed (code that would be optimized out was making
calls to functions that hadn't been prototyped.  So I added an #else case
to those #ifdefs to #define the relevant functions to empty macros to
placate the warnings.

I also reorganized the applets.c code to make adding such an #else case less
of a pain (and make the need for prototyping go away by moving the functions
up before they were used, and generally wind up with fewer #ifdefs in
the code by putting all the logic in one place).  This resulted in a huge
seeming patch, when most if it just moves code from one place to another
without touching it...

Upside: make allyesconfig and make allnoconfig should both work now.
2005-09-05 04:13:33 +00:00
Rob Landley
e1d9633e20 Bernhard Fischer submitted a couple of Makefile patches:
- Fix building out-of-tree
- remove duplicate rule in toplevel Makefile
- peruse make's builtin notion of `dirname $@'
2005-08-24 00:41:52 +00:00
Eric Andersen
ff3a61b71d Do not define 'AUTOCONF_INCLUDED' 2005-08-02 00:59:44 +00:00
Paul Fox
79c142d938 new config display applet, from bug 46. i've changed the name
of the applet from "config" to "bbconfig", and renamed the
source filenames and symbols to match appropriately.
2005-08-01 16:04:40 +00:00
Peter Kjellerstedt
bae38db8e4 Updated to match trunk/uClibc/extra/config as of r10132, and thus
Linux 2.6.11.
2005-04-19 09:55:06 +00:00
Mike Frysinger
a9ae74d25b bernhardf reports with Bug 210:
For certain non-gcc compilers, alloca_h is defined (included) but there, 
no alloca() is declared.  Fallback to malloc if _ALLOCA_H is defined but 
still, there is no alloca() in the included _ALLOCA_H.
2005-04-16 04:06:14 +00:00
Eric Andersen
9e954abc4f As noticed by egor duda, current_menu is declared as 'extern struct menu
*current_menu;' in scripts/config/lkc.h line 63, and this conflicts with
static definition in mconf.c.
2004-10-08 07:58:30 +00:00
Eric Andersen
7daa076d3e egor duda writes:
Hi!

I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.

That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.

I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.

'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.

One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.

egor
2004-10-08 07:46:08 +00:00
Eric Andersen
837f058fb3 Peter Kjellerstedt at axis.com writes:
Hello,

the attached patch should bring extra/config in line
with the Linux 2.6.7 sources.

The following are the commit messages for the respective
files from the Linux bk-repository:

checklist.c:
* fix menuconfig choice item help display

confdata.c:
* config: choice fix
* kconfig: don't rename target dir when saving config

expr.c, expr.h:
* config: disable debug prints

mconf.c:
* fix menuconfig choice item help display

menu.c:
* Kconfig: use select statements

symbol.c:
* config: choice fix
* Avoid bogus warning about recursive dependencies
* c99 struct initialiser conversions

textbox.c:
* janitor: don't init statics to 0

util.c:
* fix lxdialog behaviour

//Peter
2004-07-15 06:01:05 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
16f94a6722 Minor updates from linux 2.6.1 2004-01-16 12:49:06 +00:00
Glenn L McGrath
7c87b67c08 Patch from Bastian Blank, allow the buildtime to be overriden with a
different string, used by the debian busybox-cvs to specify the debian
date based version number.
2004-01-13 10:57:32 +00:00
Glenn L McGrath
8ac86e33a2 Patch by Rob Landley, fix warning 2003-10-03 08:28:59 +00:00
Eric Andersen
7001480a5e Seems I missed a spot 2003-08-05 05:59:48 +00:00
Eric Andersen
72d8e444f0 Merge/rework config system per the latest from linux-2.6.0-test2.
Fix the config bugs revealed by the updated config system.
 -Erik
2003-08-05 02:18:25 +00:00
Eric Andersen
a63d09a517 Patch from Pavel Roskin to fixup toplevel help text 2003-06-30 18:14:36 +00:00
Eric Andersen
fa7532b91a Fix the location for the default config so 'make defconfig'
actually works
2003-06-12 22:09:08 +00:00
Eric Andersen
ddfe18df75 Update mkdep, per the "touchless dependencies for 2.4.x" patch
from Geert Uytterhoeven posted to the lkml.
 -Erik
2003-05-24 07:30:58 +00:00