8f89c3e310f9dd83218173c28f245815859bbcd7
[external/busybox.git] / util-linux / debian / patches / mark-Linux-specific-configuration-options.patch
1 From 1d7266d3b59be361763dab61f680103bbb70f3e9 Mon Sep 17 00:00:00 2001
2 From: Jeremie Koenig <jk@jk.fr.eu.org>
3 Date: Mon, 19 Jul 2010 00:44:56 +0200
4 Subject: [PATCH 2/9] mark Linux-specific configuration options
5
6 PLATFORM_LINUX is used as a dependency for applets or features
7 which require Linux-specific interfaces.
8
9 Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
11 ---
12  Config.in                     |   12 ++++++++++++
13  console-tools/Config.src      |   13 +++++++++++++
14  coreutils/Config.src          |    2 ++
15  coreutils/date.c              |    2 +-
16  e2fsprogs/Config.src          |    1 +
17  init/Config.src               |    2 ++
18  init/bootchartd.c             |    1 +
19  libbb/Config.src              |    1 +
20  loginutils/Config.src         |    3 +++
21  miscutils/Config.src          |   19 ++++++++++++++++++-
22  miscutils/conspy.c            |    1 +
23  miscutils/ubi_attach_detach.c |    2 ++
24  modutils/Config.src           |    1 +
25  networking/Config.src         |   23 ++++++++++++++++++++++-
26  networking/udhcp/Config.src   |    2 ++
27  procps/Config.src             |    4 +++-
28  shell/cttyhack.c              |    1 +
29  sysklogd/Config.src           |    1 +
30  util-linux/Config.src         |   27 +++++++++++++++++++++++++++
31  19 files changed, 114 insertions(+), 4 deletions(-)
32
33 Index: busybox-1.17.1/Config.in
34 ===================================================================
35 --- busybox-1.17.1.orig/Config.in       2010-08-01 05:24:36.000000000 +0200
36 +++ busybox-1.17.1/Config.in    2010-08-01 05:32:43.000000000 +0200
37 @@ -47,6 +47,17 @@
38           compiler other than gcc.
39           If you do use gcc, this option may needlessly increase code size.
40  
41 +config PLATFORM_LINUX
42 +       bool "Enable Linux-specific applets and features"
43 +       default y
44 +       help
45 +         For the most part, busybox requires only POSIX compatibility
46 +         from the target system, but some applets and features use
47 +         Linux-specific interfaces.
48 +
49 +         Answering 'N' here will disable such applets and hide the
50 +         corresponding configuration options.
51 +
52  choice
53         prompt "Buffer allocation policy"
54         default FEATURE_BUFFERS_USE_MALLOC
55 @@ -353,6 +364,7 @@
56  config SELINUX
57         bool "Support NSA Security Enhanced Linux"
58         default n
59 +       depends on PLATFORM_LINUX
60         help
61           Enable support for SELinux in applets ls, ps, and id. Also provide
62           the option of compiling in SELinux applets.
63 Index: busybox-1.17.1/console-tools/Config.src
64 ===================================================================
65 --- busybox-1.17.1.orig/console-tools/Config.src        2010-07-25 00:12:43.000000000 +0200
66 +++ busybox-1.17.1/console-tools/Config.src     2010-08-01 05:32:43.000000000 +0200
67 @@ -10,6 +10,7 @@
68  config CHVT
69         bool "chvt"
70         default y
71 +       depends on PLATFORM_LINUX
72         help
73           This program is used to change to another terminal.
74           Example: chvt 4 (change to terminal /dev/tty4)
75 @@ -17,6 +18,7 @@
76  config FGCONSOLE
77         bool "fgconsole"
78         default y
79 +       depends on PLATFORM_LINUX
80         help
81           This program prints active (foreground) console number.
82  
83 @@ -29,12 +31,14 @@
84  config DEALLOCVT
85         bool "deallocvt"
86         default y
87 +       depends on PLATFORM_LINUX
88         help
89           This program deallocates unused virtual consoles.
90  
91  config DUMPKMAP
92         bool "dumpkmap"
93         default y
94 +       depends on PLATFORM_LINUX
95         help
96           This program dumps the kernel's keyboard translation table to
97           stdout, in binary format. You can then use loadkmap to load it.
98 @@ -42,18 +46,21 @@
99  config KBD_MODE
100         bool "kbd_mode"
101         default y
102 +       depends on PLATFORM_LINUX
103         help
104           This program reports and sets keyboard mode.
105  
106  config LOADFONT
107         bool "loadfont"
108         default y
109 +       depends on PLATFORM_LINUX
110         help
111           This program loads a console font from standard input.
112  
113  config LOADKMAP
114         bool "loadkmap"
115         default y
116 +       depends on PLATFORM_LINUX
117         help
118           This program loads a keyboard translation table from
119           standard input.
120 @@ -61,6 +68,7 @@
121  config OPENVT
122         bool "openvt"
123         default y
124 +       depends on PLATFORM_LINUX
125         help
126           This program is used to start a command on an unused
127           virtual terminal.
128 @@ -92,6 +100,7 @@
129  config SETCONSOLE
130         bool "setconsole"
131         default y
132 +       depends on PLATFORM_LINUX
133         help
134           This program redirects the system console to another device,
135           like the current tty while logged in via telnet.
136 @@ -106,6 +115,7 @@
137  config SETFONT
138         bool "setfont"
139         default y
140 +       depends on PLATFORM_LINUX
141         help
142           Allows to load console screen map. Useful for i18n.
143  
144 @@ -127,6 +137,7 @@
145  config SETKEYCODES
146         bool "setkeycodes"
147         default y
148 +       depends on PLATFORM_LINUX
149         help
150           This program loads entries into the kernel's scancode-to-keycode
151           map, allowing unusual keyboards to generate usable keycodes.
152 @@ -134,12 +145,14 @@
153  config SETLOGCONS
154         bool "setlogcons"
155         default y
156 +       depends on PLATFORM_LINUX
157         help
158           This program redirects the output console of kernel messages.
159  
160  config SHOWKEY
161         bool "showkey"
162         default y
163 +       depends on PLATFORM_LINUX
164         help
165           Shows keys pressed.
166  
167 Index: busybox-1.17.1/coreutils/Config.src
168 ===================================================================
169 --- busybox-1.17.1.orig/coreutils/Config.src    2010-07-25 00:12:43.000000000 +0200
170 +++ busybox-1.17.1/coreutils/Config.src 2010-08-01 05:32:43.000000000 +0200
171 @@ -591,6 +591,7 @@
172  config STAT
173         bool "stat"
174         default y
175 +       depends on PLATFORM_LINUX # statfs()
176         help
177           display file or filesystem status.
178  
179 @@ -606,6 +607,7 @@
180  config STTY
181         bool "stty"
182         default y
183 +       depends on PLATFORM_LINUX
184         help
185           stty is used to change and print terminal line settings.
186  
187 Index: busybox-1.17.1/coreutils/date.c
188 ===================================================================
189 --- busybox-1.17.1.orig/coreutils/date.c        2010-07-25 00:12:43.000000000 +0200
190 +++ busybox-1.17.1/coreutils/date.c     2010-08-01 05:32:43.000000000 +0200
191 @@ -72,7 +72,7 @@
192  //config:config FEATURE_DATE_NANO
193  //config:      bool "Support %[num]N nanosecond format specifier"
194  //config:      default n
195 -//config:      depends on DATE
196 +//config:      depends on DATE && PLATFORM_LINUX # syscall(__NR_clock_gettime)
197  //config:      help
198  //config:        Support %[num]N format specifier. Adds ~250 bytes of code.
199  //config:
200 Index: busybox-1.17.1/e2fsprogs/Config.src
201 ===================================================================
202 --- busybox-1.17.1.orig/e2fsprogs/Config.src    2010-07-25 00:12:56.000000000 +0200
203 +++ busybox-1.17.1/e2fsprogs/Config.src 2010-08-01 05:32:43.000000000 +0200
204 @@ -33,6 +33,7 @@
205  config LSATTR
206         bool "lsattr"
207         default y
208 +       depends on PLATFORM_LINUX
209         help
210           lsattr lists the file attributes on a second extended file system.
211  
212 Index: busybox-1.17.1/init/Config.src
213 ===================================================================
214 --- busybox-1.17.1.orig/init/Config.src 2010-07-25 00:12:43.000000000 +0200
215 +++ busybox-1.17.1/init/Config.src      2010-08-01 05:32:43.000000000 +0200
216 @@ -10,6 +10,7 @@
217  config INIT
218         bool "init"
219         default y
220 +       depends on PLATFORM_LINUX
221         select FEATURE_SYSLOG
222         help
223           init is the first program run when the system boots.
224 @@ -92,6 +93,7 @@
225  config HALT
226         bool "poweroff, halt, and reboot"
227         default y
228 +       depends on PLATFORM_LINUX
229         help
230           Stop all processes and either halt, reboot, or power off the system.
231  
232 Index: busybox-1.17.1/init/bootchartd.c
233 ===================================================================
234 --- busybox-1.17.1.orig/init/bootchartd.c       2010-07-25 00:12:56.000000000 +0200
235 +++ busybox-1.17.1/init/bootchartd.c    2010-08-01 05:32:43.000000000 +0200
236 @@ -6,6 +6,7 @@
237  //config:config BOOTCHARTD
238  //config:      bool "bootchartd"
239  //config:      default y
240 +//config:      depends on PLATFORM_LINUX
241  //config:      help
242  //config:        bootchartd is commonly used to profile the boot process
243  //config:        for the purpose of speeding it up. In this case, it is started
244 Index: busybox-1.17.1/libbb/Config.src
245 ===================================================================
246 --- busybox-1.17.1.orig/libbb/Config.src        2010-07-25 00:12:56.000000000 +0200
247 +++ busybox-1.17.1/libbb/Config.src     2010-08-01 05:32:43.000000000 +0200
248 @@ -153,6 +153,7 @@
249  config MONOTONIC_SYSCALL
250         bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
251         default n
252 +       depends on PLATFORM_LINUX
253         help
254           Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
255           time intervals (time, ping, traceroute etc need this).
256 Index: busybox-1.17.1/loginutils/Config.src
257 ===================================================================
258 --- busybox-1.17.1.orig/loginutils/Config.src   2010-07-25 00:12:43.000000000 +0200
259 +++ busybox-1.17.1/loginutils/Config.src        2010-08-01 05:32:43.000000000 +0200
260 @@ -179,6 +179,7 @@
261  config GETTY
262         bool "getty"
263         default y
264 +       depends on PLATFORM_LINUX
265         select FEATURE_SYSLOG
266         help
267           getty lets you log in on a tty, it is normally invoked by init.
268 @@ -186,6 +187,7 @@
269  config LOGIN
270         bool "login"
271         default y
272 +       depends on PLATFORM_LINUX
273         select FEATURE_SUID
274         select FEATURE_SYSLOG
275         help
276 @@ -295,6 +297,7 @@
277  config VLOCK
278         bool "vlock"
279         default y
280 +       depends on PLATFORM_LINUX
281         select FEATURE_SUID
282         help
283           Build the "vlock" applet which allows you to lock (virtual) terminals.
284 Index: busybox-1.17.1/miscutils/Config.src
285 ===================================================================
286 --- busybox-1.17.1.orig/miscutils/Config.src    2010-07-25 00:12:56.000000000 +0200
287 +++ busybox-1.17.1/miscutils/Config.src 2010-08-01 05:32:43.000000000 +0200
288 @@ -10,6 +10,7 @@
289  config ADJTIMEX
290         bool "adjtimex"
291         default y
292 +       depends on PLATFORM_LINUX
293         help
294           Adjtimex reads and optionally sets adjustment parameters for
295           the Linux clock adjustment algorithm.
296 @@ -24,6 +25,7 @@
297  config BEEP
298         bool "beep"
299         default y
300 +       depends on PLATFORM_LINUX
301         help
302           The beep applets beeps in a given freq/Hz.
303  
304 @@ -180,6 +182,7 @@
305  config DEVFSD
306         bool "devfsd (obsolete)"
307         default n
308 +       depends on PLATFORM_LINUX
309         select FEATURE_SYSLOG
310         help
311           This is deprecated and should NOT be used anymore.
312 @@ -223,6 +226,7 @@
313  config FEATURE_DEVFS
314         bool "Use devfs names for all devices (obsolete)"
315         default n
316 +       depends on PLATFORM_LINUX
317         help
318           This is obsolete and should NOT be used anymore.
319           Use linux >= 2.6 (optionally with hotplug) and mdev instead!
320 @@ -242,6 +246,7 @@
321  config EJECT
322         bool "eject"
323         default y
324 +       depends on PLATFORM_LINUX
325         help
326           Used to eject cdroms. (defaults to /dev/cdrom)
327  
328 @@ -256,6 +261,7 @@
329  config FBSPLASH
330         bool "fbsplash"
331         default y
332 +       depends on PLATFORM_LINUX
333         help
334           Shows splash image and progress bar on framebuffer device.
335           Can be used during boot phase of an embedded device. ~2kb.
336 @@ -305,6 +311,7 @@
337  config IONICE
338         bool "ionice"
339         default y
340 +       depends on PLATFORM_LINUX
341         help
342           Set/set program io scheduling class and priority
343           Requires kernel >= 2.6.13
344 @@ -344,6 +351,11 @@
345  config LESS
346         bool "less"
347         default y
348 +       depends on PLATFORM_LINUX
349 +       depends on PLATFORM_LINUX
350 +       depends on PLATFORM_LINUX
351 +       depends on PLATFORM_LINUX
352 +       depends on PLATFORM_LINUX
353         help
354           'less' is a pager, meaning that it displays text files. It possesses
355           a wide array of features, and is an improvement over 'more'.
356 @@ -410,6 +422,7 @@
357  config HDPARM
358         bool "hdparm"
359         default y
360 +       depends on PLATFORM_LINUX
361         help
362           Get/Set hard drive parameters. Primarily intended for ATA
363           drives. Adds about 13k (or around 30k if you enable the
364 @@ -526,6 +539,7 @@
365  config RAIDAUTORUN
366         bool "raidautorun"
367         default y
368 +       depends on PLATFORM_LINUX
369         help
370           raidautorun tells the kernel md driver to
371           search and start RAID arrays.
372 @@ -533,7 +547,7 @@
373  config READAHEAD
374         bool "readahead"
375         default y
376 -       depends on LFS
377 +       depends on LFS && PLATFORM_LINUX
378         help
379           Preload the files listed on the command line into RAM cache so that
380           subsequent reads on these files will not block on disk I/O.
381 @@ -550,6 +564,7 @@
382  config RFKILL
383         bool "rfkill"
384         default n  # doesn't build on Ubuntu 9.04
385 +       depends on PLATFORM_LINUX
386         help
387           Enable/disable wireless devices.
388  
389 @@ -570,6 +585,7 @@
390  config RX
391         bool "rx"
392         default y
393 +       depends on PLATFORM_LINUX
394         help
395           Receive files using the Xmodem protocol.
396  
397 @@ -641,6 +657,7 @@
398  config WATCHDOG
399         bool "watchdog"
400         default y
401 +       depends on PLATFORM_LINUX
402         help
403           The watchdog utility is used with hardware or software watchdog
404           device drivers. It opens the specified watchdog device special file
405 Index: busybox-1.17.1/miscutils/conspy.c
406 ===================================================================
407 --- busybox-1.17.1.orig/miscutils/conspy.c      2010-07-25 00:12:43.000000000 +0200
408 +++ busybox-1.17.1/miscutils/conspy.c   2010-08-01 05:32:43.000000000 +0200
409 @@ -17,6 +17,7 @@
410  //config:config CONSPY
411  //config:      bool "conspy"
412  //config:      default n
413 +//config:      depends on PLATFORM_LINUX
414  //config:      help
415  //config:        A text-mode VNC like program for Linux virtual terminals.
416  //config:        example:  conspy NUM      shared access to console num
417 Index: busybox-1.17.1/miscutils/ubi_attach_detach.c
418 ===================================================================
419 --- busybox-1.17.1.orig/miscutils/ubi_attach_detach.c   2010-07-25 00:12:43.000000000 +0200
420 +++ busybox-1.17.1/miscutils/ubi_attach_detach.c        2010-08-01 05:32:43.000000000 +0200
421 @@ -12,12 +12,14 @@
422  //config:config UBIATTACH
423  //config:      bool "ubiattach"
424  //config:      default n
425 +//config:      depends on PLATFORM_LINUX
426  //config:      help
427  //config:        Attach MTD device to an UBI device.
428  //config:
429  //config:config UBIDETACH
430  //config:      bool "ubidetach"
431  //config:      default n
432 +//config:      depends on PLATFORM_LINUX
433  //config:      help
434  //config:        Detach MTD device from an UBI device.
435  
436 Index: busybox-1.17.1/modutils/Config.src
437 ===================================================================
438 --- busybox-1.17.1.orig/modutils/Config.src     2010-07-25 00:12:43.000000000 +0200
439 +++ busybox-1.17.1/modutils/Config.src  2010-08-01 05:32:43.000000000 +0200
440 @@ -4,6 +4,7 @@
441  #
442  
443  menu "Linux Module Utilities"
444 +depends on PLATFORM_LINUX
445  
446  INSERT
447  
448 Index: busybox-1.17.1/networking/Config.src
449 ===================================================================
450 --- busybox-1.17.1.orig/networking/Config.src   2010-07-25 00:12:43.000000000 +0200
451 +++ busybox-1.17.1/networking/Config.src        2010-08-01 05:32:43.000000000 +0200
452 @@ -43,6 +43,7 @@
453  config VERBOSE_RESOLUTION_ERRORS
454         bool "Verbose resolution errors"
455         default n
456 +       depends on PLATFORM_LINUX #because of xsocket() in libbb/xfuncs_prinf.c
457         help
458           Enable if you are not satisfied with simplistic
459           "can't resolve 'hostname.com'" and want to know more.
460 @@ -51,18 +52,21 @@
461  config ARP
462         bool "arp"
463         default y
464 +       depends on PLATFORM_LINUX
465         help
466           Manipulate the system ARP cache.
467  
468  config ARPING
469         bool "arping"
470         default y
471 +       depends on PLATFORM_LINUX
472         help
473           Ping hosts by ARP packets.
474  
475  config BRCTL
476         bool "brctl"
477         default y
478 +       depends on PLATFORM_LINUX
479         help
480           Manage ethernet bridges.
481           Supports addbr/delbr and addif/delif.
482 @@ -95,6 +99,7 @@
483  config ETHER_WAKE
484         bool "ether-wake"
485         default y
486 +       depends on PLATFORM_LINUX
487         help
488           Send a magic packet to wake up sleeping machines.
489  
490 @@ -269,6 +274,7 @@
491  config IFCONFIG
492         bool "ifconfig"
493         default y
494 +       depends on PLATFORM_LINUX
495         help
496           Ifconfig is used to configure the kernel-resident network interfaces.
497  
498 @@ -316,6 +322,7 @@
499  config IFENSLAVE
500         bool "ifenslave"
501         default y
502 +       depends on PLATFORM_LINUX
503         help
504           Userspace application to bind several interfaces
505           to a logical interface (use with kernel bonding driver).
506 @@ -323,6 +330,7 @@
507  config IFPLUGD
508         bool "ifplugd"
509         default y
510 +       depends on PLATFORM_LINUX
511         help
512           Network interface plug detection daemon.
513  
514 @@ -364,7 +372,7 @@
515  config FEATURE_IFUPDOWN_IP_BUILTIN
516         bool "Use busybox ip applet"
517         default y
518 -       depends on FEATURE_IFUPDOWN_IP
519 +       depends on FEATURE_IFUPDOWN_IP && PLATFORM_LINUX
520         select IP
521         select FEATURE_IP_ADDRESS
522         select FEATURE_IP_LINK
523 @@ -483,6 +491,7 @@
524  config IP
525         bool "ip"
526         default y
527 +       depends on PLATFORM_LINUX
528         help
529           The "ip" applet is a TCP/IP interface configuration and routing
530           utility. You generally don't need "ip" to use busybox with
531 @@ -598,6 +607,7 @@
532  config NAMEIF
533         bool "nameif"
534         default y
535 +       depends on PLATFORM_LINUX
536         select FEATURE_SYSLOG
537         help
538           nameif is used to rename network interface by its MAC address.
539 @@ -626,6 +636,7 @@
540  config NETSTAT
541         bool "netstat"
542         default y
543 +       depends on PLATFORM_LINUX
544         help
545           netstat prints information about the Linux networking subsystem.
546  
547 @@ -654,6 +665,7 @@
548  config NTPD
549         bool "ntpd"
550         default y
551 +       depends on PLATFORM_LINUX
552         help
553           The NTP client/server daemon.
554  
555 @@ -668,6 +680,7 @@
556  config PING
557         bool "ping"
558         default y
559 +       depends on PLATFORM_LINUX
560         help
561           ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
562           elicit an ICMP ECHO_RESPONSE from a host or gateway.
563 @@ -696,12 +709,14 @@
564  config ROUTE
565         bool "route"
566         default y
567 +       depends on PLATFORM_LINUX
568         help
569           Route displays or manipulates the kernel's IP routing tables.
570  
571  config SLATTACH
572         bool "slattach"
573         default y
574 +       depends on PLATFORM_LINUX
575         help
576           slattach is a small utility to attach network interfaces to serial
577           lines.
578 @@ -719,6 +734,7 @@
579  config TCPSVD
580         bool "tcpsvd"
581         default y
582 +       depends on PLATFORM_LINUX
583         help
584           tcpsvd listens on a TCP port and runs a program for each new
585           connection.
586 @@ -888,6 +904,7 @@
587  config TRACEROUTE
588         bool "traceroute"
589         default y
590 +       depends on PLATFORM_LINUX
591         help
592           Utility to trace the route of IP packets.
593  
594 @@ -924,6 +941,7 @@
595  config TUNCTL
596         bool "tunctl"
597         default y
598 +       depends on PLATFORM_LINUX
599         help
600           tunctl creates or deletes tun devices.
601  
602 @@ -949,6 +967,7 @@
603  config UDPSVD
604         bool "udpsvd"
605         default y
606 +       depends on PLATFORM_LINUX
607         help
608           udpsvd listens on an UDP port and runs a program for each new
609           connection.
610 @@ -956,6 +975,7 @@
611  config VCONFIG
612         bool "vconfig"
613         default y
614 +       depends on PLATFORM_LINUX
615         help
616           Creates, removes, and configures VLAN interfaces
617  
618 @@ -990,6 +1010,7 @@
619  config ZCIP
620         bool "zcip"
621         default y
622 +       depends on PLATFORM_LINUX
623         select FEATURE_SYSLOG
624         help
625           ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
626 Index: busybox-1.17.1/networking/udhcp/Config.src
627 ===================================================================
628 --- busybox-1.17.1.orig/networking/udhcp/Config.src     2010-07-25 00:12:43.000000000 +0200
629 +++ busybox-1.17.1/networking/udhcp/Config.src  2010-08-01 05:32:43.000000000 +0200
630 @@ -8,6 +8,7 @@
631  config UDHCPD
632         bool "udhcp server (udhcpd)"
633         default y
634 +       depends on PLATFORM_LINUX
635         help
636           udhcpd is a DHCP server geared primarily toward embedded systems,
637           while striving to be fully functional and RFC compliant.
638 @@ -51,6 +52,7 @@
639  config UDHCPC
640         bool "udhcp client (udhcpc)"
641         default y
642 +       depends on PLATFORM_LINUX
643         help
644           udhcpc is a DHCP client geared primarily toward embedded systems,
645           while striving to be fully functional and RFC compliant.
646 Index: busybox-1.17.1/procps/Config.src
647 ===================================================================
648 --- busybox-1.17.1.orig/procps/Config.src       2010-07-25 00:12:43.000000000 +0200
649 +++ busybox-1.17.1/procps/Config.src    2010-08-01 05:32:43.000000000 +0200
650 @@ -10,6 +10,7 @@
651  config FREE
652         bool "free"
653         default y
654 +       depends on PLATFORM_LINUX #sysinfo()
655         help
656           free displays the total amount of free and used physical and swap
657           memory in the system, as well as the buffers used by the kernel.
658 @@ -104,7 +105,7 @@
659  config FEATURE_PS_TIME
660         bool "Enable time and elapsed time output"
661         default y
662 -       depends on PS && DESKTOP
663 +       depends on PS && DESKTOP && PLATFORM_LINUX #sysinfo()
664         help
665           Support -o time and -o etime output specifiers.
666  
667 @@ -200,6 +201,7 @@
668  config UPTIME
669         bool "uptime"
670         default y
671 +       depends on PLATFORM_LINUX #sysinfo()
672         help
673           uptime gives a one line display of the current time, how long
674           the system has been running, how many users are currently logged
675 Index: busybox-1.17.1/sysklogd/Config.src
676 ===================================================================
677 --- busybox-1.17.1.orig/sysklogd/Config.src     2010-07-25 00:12:43.000000000 +0200
678 +++ busybox-1.17.1/sysklogd/Config.src  2010-08-01 05:32:43.000000000 +0200
679 @@ -109,6 +109,7 @@
680  config KLOGD
681         bool "klogd"
682         default y
683 +       depends on PLATFORM_LINUX
684         help
685           klogd is a utility which intercepts and logs all
686           messages from the Linux kernel and sends the messages
687 Index: busybox-1.17.1/util-linux/Config.src
688 ===================================================================
689 --- busybox-1.17.1.orig/util-linux/Config.src   2010-07-25 00:12:56.000000000 +0200
690 +++ busybox-1.17.1/util-linux/Config.src        2010-08-01 05:32:43.000000000 +0200
691 @@ -10,6 +10,7 @@
692  config ACPID
693         bool "acpid"
694         default y
695 +       depends on PLATFORM_LINUX
696         help
697           acpid listens to ACPI events coming either in textual form from
698           /proc/acpi/event (though it is marked deprecated it is still widely
699 @@ -32,6 +33,7 @@
700  config BLKID
701         bool "blkid"
702         default y
703 +       depends on PLATFORM_LINUX
704         select VOLUMEID
705         help
706           Lists labels and UUIDs of all filesystems.
707 @@ -41,6 +43,7 @@
708  config DMESG
709         bool "dmesg"
710         default y
711 +       depends on PLATFORM_LINUX
712         help
713           dmesg is used to examine or control the kernel ring buffer. When the
714           Linux kernel prints messages to the system log, they are stored in
715 @@ -74,6 +77,7 @@
716  config FBSET
717         bool "fbset"
718         default y
719 +       depends on PLATFORM_LINUX
720         help
721           fbset is used to show or change the settings of a Linux frame buffer
722           device. The frame buffer device provides a simple and unique
723 @@ -102,6 +106,7 @@
724  config FDFLUSH
725         bool "fdflush"
726         default y
727 +       depends on PLATFORM_LINUX
728         help
729           fdflush is only needed when changing media on slightly-broken
730           removable media drives. It is used to make Linux believe that a
731 @@ -114,12 +119,14 @@
732  config FDFORMAT
733         bool "fdformat"
734         default y
735 +       depends on PLATFORM_LINUX
736         help
737           fdformat is used to low-level format a floppy disk.
738  
739  config FDISK
740         bool "fdisk"
741         default y
742 +       depends on PLATFORM_LINUX
743         help
744           The fdisk utility is used to divide hard disks into one or more
745           logical disks, which are generally called partitions. This utility
746 @@ -187,6 +194,7 @@
747  config FINDFS
748         bool "findfs"
749         default y
750 +       depends on PLATFORM_LINUX
751         select VOLUMEID
752         help
753           Prints the name of a filesystem with given label or UUID.
754 @@ -202,6 +210,7 @@
755  config FREERAMDISK
756         bool "freeramdisk"
757         default y
758 +       depends on PLATFORM_LINUX
759         help
760           Linux allows you to create ramdisks. This utility allows you to
761           delete them and completely free all memory that was used for the
762 @@ -224,12 +233,14 @@
763  config MKFS_EXT2
764         bool "mkfs_ext2"
765         default y
766 +       depends on PLATFORM_LINUX
767         help
768           Utility to create EXT2 filesystems.
769  
770  config MKFS_MINIX
771         bool "mkfs_minix"
772         default y
773 +       depends on PLATFORM_LINUX
774         help
775           The minix filesystem is a nice, small, compact, read-write filesystem
776           with little overhead. If you wish to be able to create minix
777 @@ -247,6 +258,7 @@
778  config MKFS_REISER
779         bool "mkfs_reiser"
780         default n
781 +       depends on PLATFORM_LINUX
782         help
783           Utility to create ReiserFS filesystems.
784           Note: this applet needs a lot of testing and polishing.
785 @@ -254,6 +266,7 @@
786  config MKFS_VFAT
787         bool "mkfs_vfat"
788         default y
789 +       depends on PLATFORM_LINUX
790         help
791           Utility to create FAT32 filesystems.
792  
793 @@ -302,6 +315,7 @@
794  config HWCLOCK
795         bool "hwclock"
796         default y
797 +       depends on PLATFORM_LINUX
798         help
799           The hwclock utility is used to read and set the hardware clock
800           on a system. This is primarily used to set the current time on
801 @@ -341,6 +355,7 @@
802  config IPCS
803         bool "ipcs"
804         default y
805 +       depends on PLATFORM_LINUX
806         select FEATURE_SUID
807         help
808           The ipcs utility is used to provide information on the currently
809 @@ -349,6 +364,7 @@
810  config LOSETUP
811         bool "losetup"
812         default y
813 +       depends on PLATFORM_LINUX
814         help
815           losetup is used to associate or detach a loop device with a regular
816           file or block device, and to query the status of a loop device. This
817 @@ -357,6 +373,7 @@
818  config LSPCI
819         bool "lspci"
820         default y
821 +       #depends on PLATFORM_LINUX
822         help
823           lspci is a utility for displaying information about PCI buses in the
824           system and devices connected to them.
825 @@ -366,6 +383,7 @@
826  config LSUSB
827         bool "lsusb"
828         default y
829 +       #depends on PLATFORM_LINUX
830         help
831           lsusb is a utility for displaying information about USB buses in the
832           system and devices connected to them.
833 @@ -375,6 +393,7 @@
834  config MDEV
835         bool "mdev"
836         default y
837 +       depends on PLATFORM_LINUX
838         help
839           mdev is a mini-udev implementation for dynamically creating device
840           nodes in the /dev directory.
841 @@ -473,6 +492,7 @@
842  config MOUNT
843         bool "mount"
844         default y
845 +       depends on PLATFORM_LINUX
846         help
847           All files and filesystems in Unix are arranged into one big directory
848           tree. The 'mount' utility is used to graft a filesystem onto a
849 @@ -555,6 +575,7 @@
850  config PIVOT_ROOT
851         bool "pivot_root"
852         default y
853 +       depends on PLATFORM_LINUX
854         help
855           The pivot_root utility swaps the mount points for the root filesystem
856           with some other mounted filesystem. This allows you to do all sorts
857 @@ -582,12 +603,14 @@
858  config READPROFILE
859         bool "readprofile"
860         default y
861 +       #depends on PLATFORM_LINUX
862         help
863           This allows you to parse /proc/profile for basic profiling.
864  
865  config RTCWAKE
866         bool "rtcwake"
867         default y
868 +       depends on PLATFORM_LINUX
869         help
870           Enter a system sleep state until specified wakeup time.
871  
872 @@ -607,6 +630,7 @@
873  config SETARCH
874         bool "setarch"
875         default y
876 +       depends on PLATFORM_LINUX
877         help
878           The linux32 utility is used to create a 32bit environment for the
879           specified program (usually a shell). It only makes sense to have
880 @@ -616,6 +640,7 @@
881  config SWAPONOFF
882         bool "swaponoff"
883         default y
884 +       depends on PLATFORM_LINUX
885         help
886           This option enables both the 'swapon' and the 'swapoff' utilities.
887           Once you have created some swap space using 'mkswap', you also need
888 @@ -634,6 +659,7 @@
889  config SWITCH_ROOT
890         bool "switch_root"
891         default y
892 +       depends on PLATFORM_LINUX
893         help
894           The switch_root utility is used from initramfs to select a new
895           root device. Under initramfs, you have to use this instead of
896 @@ -653,6 +679,7 @@
897  config UMOUNT
898         bool "umount"
899         default y
900 +       depends on PLATFORM_LINUX
901         help
902           When you want to remove a mounted filesystem from its current mount
903           point, for example when you are shutting down the system, the
904 Index: busybox-1.17.1/shell/Config.src
905 ===================================================================
906 --- busybox-1.17.1.orig/shell/Config.src        2010-08-01 05:33:24.000000000 +0200
907 +++ busybox-1.17.1/shell/Config.src     2010-08-01 05:33:34.000000000 +0200
908 @@ -370,6 +370,7 @@
909  config CTTYHACK
910         bool "cttyhack"
911         default y
912 +       depends on PLATFORM_LINUX
913         help
914           One common problem reported on the mailing list is "can't access tty;
915           job control turned off" error message which typically appears when