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