Update the list.
[oweals/busybox.git] / TODO
1 TODO list for busybox in no particular order. Just because something
2 is listed here doesn't mean that it is going to be added to busybox,
3 or that doing so is even a good idea. It just means that I _might_ get
4 around to it some time. If you have any good ideas, please let me know.
5
6 * login/sulogin/passwd/getty/etc are part of tinylogin, and so are not
7     needed or wanted in busybox (or else I'd have to link to libcrypt).
8
9 * Networking apps are probably going to be split out some time soon into a
10     separate package (named perhaps netkit-tiny?).  This would remove the
11     following items from BusyBox: hostid, hostname, nc, nslookup, telnet, 
12     and ping.  nfs mounting and syslogd (when it supports network logging)
13     will remain in BusyBox.
14
15  -Erik
16
17 -----------
18
19 Bugs that need fixing:
20
21  - 'ln -n' has been disabled for this release, till we can fix a memory
22     corruption bug.
23  - fix 'cp' (or test suite script) so that it passes the last item in
24     the test suite.
25  - ps dirent race bug (need to stat the file before attempting chdir)
26  - Make 'ln -s /tmp/file .' work the way GNU ln does (i.e. makes a link to 
27     /tmp/file in the current directory, rather then trying and failing to create
28     a symlink named "." in the current working directory).
29  - Prune sfdisk
30  - Graft fdisk instead
31
32
33 We will rework these to use libc regex functions instead (as per the mailing
34 list discussion):
35  - 'grep foo$ file' doesn't work
36  - 'grep *foo file' segfaults
37
38
39 -----------
40
41 Linux 2.4.x kernels
42
43 BusyBox 0.45 currently will not work with the Linux 2.4.x kernels.  
44 I know of the following problems:
45
46 1) The sysinfo syscall has changed what it does (binary incompatable), breaking
47     init and free.
48 2) BusyBox NFS support is broken with 2.4.x (needs to be adjusted for NFSv3 and
49     kernel header changes).
50 3) mount,umount,and df are all broken by the "none" entries for fake filesystems
51     such as the shared mem one.  Al Viro claims these will be disappearing soon...
52
53 I made a kernel patch that reverts the sysinfo changes
54     http://kernelnotes.org/lnxlists/linux-kernel/lk_0006_01/msg00619.html
55
56 and I have been fighting with Alan Cox to get these changes fixed in a binary
57 compatable way, but Alan has so far not been very receptive.  I am planning on
58 appealing to Linus (when he gets back from vacation) and then going with
59 whatever he decides...
60
61 So my thought is, 2.4.x just isn't ready for BusyBox to target it, and even if
62 it was, BusyBox isn't ready yet either.  Seems to me like this will not be
63 ready for a while, and we should just not worry about it yet.
64
65 As long as I have BB_FEATURE_NFSMOUNT turned off, everything compiles cleanly
66 for me with linux2.4.0test1-ac22-riel (i.e. I don't see the freeramdisk.c
67 problem you reported).  I use Debian potato (gcc 2.95.2, GNU libc 2.1.3).
68 Of course, as noted above, compiling != working.
69
70 -----------
71
72 * Make insmod actually work
73 * dnsdomainname
74 * traceroute/netstat
75 * rdate
76 * hwclock
77 * stty
78 * expr
79 * wget (or whatever I call it)
80 * tftp
81 * ftp
82 * group/commonize strings, remove dups (for i18n, l10n)
83 * consider making a unified option parser (if it can be done 
84     modular, small, etc.) 
85
86 -----------------------
87
88 Running the following:
89
90     rm -f busybox && make LDFLAGS+=-nostdlib 2>&1 | \
91         sed -ne 's/.*undefined reference to `\(.*\)..*/\1/gp' | sort | uniq
92
93 reveals the list of all external (i.e. libc) things that BusyBox depends on.
94 It would be a very nice thing to reduce this list to an absolute minimum, and
95 then create a microLibc to provide these functions.  There is no good reason
96 for GNU libc to be so big.  I'm sure it can be a lot better.
97
98 (BTW, this is more informative if BB_FEATURE_NFSMOUNT is turned off...)
99
100 Most wanted list:
101
102     [andersen@slag busybox]$ grep -l getgroups *.[ch]
103     test.c
104
105 Policy violation.  getgroups uses libc nss, which is unlikely
106 to be present in an embedded system.
107
108 -----------------------
109
110 Compile with debugging on, run 'nm --size-sort ./busybox'
111 and then start with the biggest things and make them smaller...
112
113 -----------------------
114
115 busybox.defs.h is too big and hard to follow.
116
117 Perhaps I need to add a better build system (like the Linux kernel?)
118
119 -----------------------
120
121 Feature request:
122
123 /bin/busybox --install -s    which makes all links to commands that it
124   can support (an optionnal -s should be used for symbolic links instead
125   of hard links).
126
127 -----------------------
128
129
130 > Have you ever thought of doig network logging in busybox syslogd ? It
131 > would quite make sense on embedded systems... :)
132
133 So far I had not considered it.  Basically, you wish to have
134 messages from the embedded box logged to a remote network
135 syslog box, right?  I can see that this would be useful.
136 I'll add this to the TODO list,
137
138
139 -----------------------
140
141
142  I think that the add_inode &c in utility.c needs to also stow the
143  st_dev field, and that du.c should NOT call `reset_inode_list'
144  because there can be hard links from inside one argv/ to inside
145  another argv/.  du.c probably ought to have an -x switch like GNU du
146  does also...
147
148
149 ------------------------------------------------------------------
150
151 An interesting email listing some apps that use /proc.  BusyBox
152 tries to avoid /proc as mush as is possible, so this stuff is
153 interesting (to me at least):
154
155
156 Date:   Fri, 25 Feb 2000 08:23:12 +0000 (GMT)
157 From: Riley Williams <rhw@MemAlpha.CX>
158 X-Sender: rhw@moo.cus.org.uk
159 To: almesber@lrc.di.epfl.ch
160 Cc: "Albert D. Cahalan" <acahalan@cs.uml.edu>,
161         Linux Kernel <linux-kernel@vger.rutgers.edu>
162 Subject: Re: What /proc should contain [was: /proc/driver/microcode]
163 In-Reply-To: <20000224165245.A29790@lrc.di.epfl.ch>
164 Message-ID: <Pine.LNX.4.21.0002250806220.8741-100000@moo.cus.org.uk>
165 Sender: owner-linux-kernel@vger.rutgers.edu
166 Precedence: bulk
167
168 Hi there.
169
170  >> Nope, most /proc access is does via programs written in C.
171
172  > That varies a lot from file to file. E.g. I haven't seen any
173  > programs that are specificly designed to read /proc/atm/* yet,
174  > and I know of only one (fuser) that reads /proc/mounts,
175  > extracting only partial information (just to pick two examples
176  > that I'm quite familiar with).
177
178 As a point of reference, here's a slightly tweaked analysis of the
179 programs on the system I'm reading your mail on. Basically, I ran the
180 following script...
181
182  Q> #!/bin/bash
183  Q> function use() {
184  Q>     for Z in $* ; do
185  Q>         strings $Z | grep /proc | sed "s=^=$Z ="
186  Q>     done
187  Q> }
188  Q> use /{,s}bin/* /usr/{,s}bin/* | sort -u | tee proc-usage
189
190 ...and then went through it removing comments and print format
191 strings. Replace /proc with /dev and you'd soon have an equivalent
192 list for that - although I can report that such is MUCH larger...
193
194 There are three programs therein that refer to /proc/mounts ...
195
196         /bin/mount
197         /bin/umount
198         /usr/bin/eject
199
200 ...and, as you stated, none that refer to /proc/atm on this system.
201 However, as this is a RedHat Linux 5.0 based system, that's not
202 necessarily an up to date reference thereto...
203
204 Here's the list anyway...
205
206 /bin/kill /proc/%d/cmdline
207 /bin/kill /proc/%d/stat
208
209 /bin/mount /proc/devices
210 /bin/mount /proc/filesystems
211 /bin/mount /proc/mounts
212
213 /bin/netstat /proc/net
214 /bin/netstat /proc/net/appletalk
215 /bin/netstat /proc/net/ax25
216 /bin/netstat /proc/net/ax25_route
217 /bin/netstat /proc/net/dev
218 /bin/netstat /proc/net/ip_masquerade
219 /bin/netstat /proc/net/ipx
220 /bin/netstat /proc/net/ipx_route
221 /bin/netstat /proc/net/netstat
222 /bin/netstat /proc/net/nr
223 /bin/netstat /proc/net/nr_neigh
224 /bin/netstat /proc/net/nr_nodes
225 /bin/netstat /proc/net/raw
226 /bin/netstat /proc/net/route
227 /bin/netstat /proc/net/rt_cache
228 /bin/netstat /proc/net/snmp
229 /bin/netstat /proc/net/tcp
230 /bin/netstat /proc/net/udp
231 /bin/netstat /proc/net/unix
232
233 /bin/umount /proc/devices
234 /bin/umount /proc/mounts
235
236 /sbin/arp /proc/net/appletalk
237 /sbin/arp /proc/net/arp
238 /sbin/arp /proc/net/ax25
239 /sbin/arp /proc/net/ipx
240 /sbin/arp /proc/net/nr
241 /sbin/arp /proc/net/unix
242
243 /sbin/cardctl /proc/devices
244
245 /sbin/cardmgr /proc/devices
246
247 /sbin/fdisk /proc/ide/%s/media
248 /sbin/fdisk /proc/scsi/scsi
249
250 /sbin/getty /proc/version
251
252 /sbin/ifconfig /proc/net
253 /sbin/ifconfig /proc/net/appletalk
254 /sbin/ifconfig /proc/net/ax25
255 /sbin/ifconfig /proc/net/dev
256 /sbin/ifconfig /proc/net/ipx
257 /sbin/ifconfig /proc/net/nr
258 /sbin/ifconfig /proc/net/unix
259
260 /sbin/ifup /proc/sys/kernel/modprobe
261
262 /sbin/ipchains /proc/net/ip_fwchains
263 /sbin/ipchains /proc/net/ip_fwnames
264 /sbin/ipchains /proc/net/ip_masquerade
265 /sbin/ipchains /proc/sys/net/ipv4/ip_forward
266
267 /sbin/ipmaddr /proc/net/dev_mcast
268 /sbin/ipmaddr /proc/net/igmp
269 /sbin/ipmaddr /proc/net/igmp6
270
271 /sbin/iptunnel /proc/net/dev
272
273 /sbin/killall5 /proc/%s/cmdline
274 /sbin/killall5 /proc/%s/exe
275 /sbin/killall5 /proc/%s/stat
276 /sbin/killall5 /proc/version
277
278 /sbin/klogd /proc/kmsg
279
280 /sbin/lsmod /proc/modules
281
282 /sbin/modprobe /proc/modules
283
284 /sbin/pidof /proc/%s/cmdline
285 /sbin/pidof /proc/%s/exe
286 /sbin/pidof /proc/%s/stat
287 /sbin/pidof /proc/version
288
289 /sbin/probe /proc/pci
290
291 /sbin/rarp /proc/net/ax25
292 /sbin/rarp /proc/net/nr
293 /sbin/rarp /proc/net/rarp
294
295 /sbin/rmmod /proc/modules
296
297 /sbin/rmmod.static /proc/modules
298
299 /sbin/route /proc/net/appletalk
300 /sbin/route /proc/net/ax25
301 /sbin/route /proc/net/ax25_route
302 /sbin/route /proc/net/ipx
303 /sbin/route /proc/net/ipx_route
304 /sbin/route /proc/net/nr
305 /sbin/route /proc/net/nr_neigh
306 /sbin/route /proc/net/nr_nodes
307 /sbin/route /proc/net/route
308 /sbin/route /proc/net/rt_cache
309 /sbin/route /proc/net/unix
310
311 /sbin/scsi_info /proc/scsi
312 /sbin/scsi_info /proc/scsi/%s
313 /sbin/scsi_info /proc/scsi/scsi
314
315 /sbin/slattach /proc/net/ax25
316 /sbin/slattach /proc/net/nr
317
318 /sbin/swapoff /proc/swaps
319
320 /sbin/swapon /proc/swaps
321
322 /sbin/uugetty /proc/version
323
324 /usr/bin/dig /proc/
325 /usr/bin/dig /proc/interrupts
326 /usr/bin/dig /proc/meminfo
327 /usr/bin/dig /proc/rtc
328 /usr/bin/dig /proc/self/status
329 /usr/bin/dig /proc/stat
330
331 /usr/bin/dnsquery /proc/
332 /usr/bin/dnsquery /proc/interrupts
333 /usr/bin/dnsquery /proc/meminfo
334 /usr/bin/dnsquery /proc/rtc
335 /usr/bin/dnsquery /proc/self/status
336 /usr/bin/dnsquery /proc/stat
337
338 /usr/bin/eject /proc/mounts
339
340 /usr/bin/emacs /proc/loadavg
341
342 /usr/bin/fetchmail /proc/net/dev
343
344 /usr/bin/free /proc/meminfo
345
346 /usr/bin/gmake /proc/loadavg
347
348 /usr/bin/gpm-root /proc/loadavg
349 /usr/bin/gpm-root /proc/meminfo
350
351 /usr/bin/host /proc/
352 /usr/bin/host /proc/interrupts
353 /usr/bin/host /proc/meminfo
354 /usr/bin/host /proc/rtc
355 /usr/bin/host /proc/self/status
356 /usr/bin/host /proc/stat
357
358 /usr/bin/hoststat /proc/loadavg
359
360 /usr/bin/hwdiag /proc/cpuinfo
361 /usr/bin/hwdiag /proc/pci
362 /usr/bin/hwdiag /proc/scsi/scsi
363 /usr/bin/hwdiag /proc/version
364
365 /usr/bin/lsdev /proc/dma
366 /usr/bin/lsdev /proc/interrupts
367 /usr/bin/lsdev /proc/ioports
368
369 /usr/bin/mailq /proc/loadavg
370
371 /usr/bin/make /proc/loadavg
372
373 /usr/bin/mcookie /proc/loadavg
374 /usr/bin/mcookie /proc/stat
375
376 /usr/bin/newaliases /proc/loadavg
377
378 /usr/bin/nslookup /proc/
379 /usr/bin/nslookup /proc/interrupts
380 /usr/bin/nslookup /proc/meminfo
381 /usr/bin/nslookup /proc/rtc
382 /usr/bin/nslookup /proc/self/status
383 /usr/bin/nslookup /proc/stat
384
385 /usr/bin/nsupdate /proc/
386 /usr/bin/nsupdate /proc/interrupts
387 /usr/bin/nsupdate /proc/meminfo
388 /usr/bin/nsupdate /proc/rtc
389 /usr/bin/nsupdate /proc/self/status
390 /usr/bin/nsupdate /proc/stat
391
392 /usr/bin/pgp /proc/version
393 /usr/bin/pgpe /proc/version
394 /usr/bin/pgpk /proc/version
395 /usr/bin/pgps /proc/version
396 /usr/bin/pgpv /proc/version
397
398 /usr/bin/procinfo /proc/cmdline
399 /usr/bin/procinfo /proc/devices
400 /usr/bin/procinfo /proc/dma
401 /usr/bin/procinfo /proc/filesystems
402 /usr/bin/procinfo /proc/interrupts
403 /usr/bin/procinfo /proc/loadavg
404 /usr/bin/procinfo /proc/meminfo
405 /usr/bin/procinfo /proc/modules
406 /usr/bin/procinfo /proc/stat
407 /usr/bin/procinfo /proc/uptime
408 /usr/bin/procinfo /proc/version
409
410 /usr/bin/purgestat /proc/loadavg
411
412 /usr/bin/screen /proc/loadavg
413
414 /usr/bin/strace /proc/%d/stat
415
416 /usr/bin/top /proc/cpuinfo
417 /usr/bin/top /proc/meminfo
418 /usr/bin/top /proc/stat
419
420 /usr/bin/vmstat /proc/%s/stat
421 /usr/bin/vmstat /proc/meminfo
422 /usr/bin/vmstat /proc/stat
423
424 /usr/sbin/atd /proc/loadavg
425
426 /usr/sbin/dnskeygen /proc/
427 /usr/sbin/dnskeygen /proc/interrupts
428 /usr/sbin/dnskeygen /proc/meminfo
429 /usr/sbin/dnskeygen /proc/rtc
430 /usr/sbin/dnskeygen /proc/self/status
431 /usr/sbin/dnskeygen /proc/stat
432
433 /usr/sbin/fuser /proc/%d/stat
434 /usr/sbin/fuser /proc/net/%s
435 /usr/sbin/fuser /proc/net/unix
436
437 /usr/sbin/in.identd /proc/net/tcp
438
439 /usr/sbin/irpd /proc/
440 /usr/sbin/irpd /proc/interrupts
441 /usr/sbin/irpd /proc/meminfo
442 /usr/sbin/irpd /proc/rtc
443 /usr/sbin/irpd /proc/self/status
444 /usr/sbin/irpd /proc/stat
445
446 /usr/sbin/named /proc/
447 /usr/sbin/named /proc/interrupts
448 /usr/sbin/named /proc/meminfo
449 /usr/sbin/named /proc/rtc
450 /usr/sbin/named /proc/self/status
451 /usr/sbin/named /proc/stat
452
453 /usr/sbin/named-xfer /proc/
454 /usr/sbin/named-xfer /proc/interrupts
455 /usr/sbin/named-xfer /proc/meminfo
456 /usr/sbin/named-xfer /proc/rtc
457 /usr/sbin/named-xfer /proc/self/status
458 /usr/sbin/named-xfer /proc/stat
459
460 /usr/sbin/readprofile /proc/profile
461
462 /usr/sbin/rwhod /proc/loadavg
463 /usr/sbin/rwhod /proc/uptime
464
465 /usr/sbin/sendmail /proc/loadavg
466
467 /usr/sbin/setconsole /proc/openprom/options
468 /usr/sbin/setconsole /proc/openprom/options/${console}-mode
469 /usr/sbin/setconsole /proc/openprom/options/input-device
470 /usr/sbin/setconsole /proc/openprom/options/output-device
471
472 Best wishes from Riley.
473
474  * Copyright (C) 1999, Memory Alpha Systems.
475  * All rights and wrongs reserved.
476
477 +----------------------------------------------------------------------+
478 | There is something frustrating about the quality and speed of Linux  |
479 | development, ie., the quality is too high and the speed is too high, |
480 | in other words, I can implement this XXXX feature, but I bet someone |
481 | else has already done so and is just about to release their patch.   |
482 +----------------------------------------------------------------------+
483  * http://www.memalpha.cx/Linux/Kernel/
484
485
486 -
487 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
488 the body of a message to majordomo@vger.rutgers.edu
489 Please read the FAQ at http://www.tux.org/lkml/
490