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
6 PLATFORM_LINUX is used as a dependency for applets or features
7 which require Linux-specific interfaces.
9 Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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(-)
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
38 compiler other than gcc.
39 If you do use gcc, this option may needlessly increase code size.
41 +config PLATFORM_LINUX
42 + bool "Enable Linux-specific applets and features"
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.
49 + Answering 'N' here will disable such applets and hide the
50 + corresponding configuration options.
53 prompt "Buffer allocation policy"
54 default FEATURE_BUFFERS_USE_MALLOC
57 bool "Support NSA Security Enhanced Linux"
59 + depends on PLATFORM_LINUX
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
71 + depends on PLATFORM_LINUX
73 This program is used to change to another terminal.
74 Example: chvt 4 (change to terminal /dev/tty4)
79 + depends on PLATFORM_LINUX
81 This program prints active (foreground) console number.
87 + depends on PLATFORM_LINUX
89 This program deallocates unused virtual consoles.
94 + depends on PLATFORM_LINUX
96 This program dumps the kernel's keyboard translation table to
97 stdout, in binary format. You can then use loadkmap to load it.
102 + depends on PLATFORM_LINUX
104 This program reports and sets keyboard mode.
109 + depends on PLATFORM_LINUX
111 This program loads a console font from standard input.
116 + depends on PLATFORM_LINUX
118 This program loads a keyboard translation table from
124 + depends on PLATFORM_LINUX
126 This program is used to start a command on an unused
132 + depends on PLATFORM_LINUX
134 This program redirects the system console to another device,
135 like the current tty while logged in via telnet.
140 + depends on PLATFORM_LINUX
142 Allows to load console screen map. Useful for i18n.
148 + depends on PLATFORM_LINUX
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 @@
156 + depends on PLATFORM_LINUX
158 This program redirects the output console of kernel messages.
163 + depends on PLATFORM_LINUX
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
175 + depends on PLATFORM_LINUX # statfs()
177 display file or filesystem status.
183 + depends on PLATFORM_LINUX
185 stty is used to change and print terminal line settings.
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
192 //config:config FEATURE_DATE_NANO
193 //config: bool "Support %[num]N nanosecond format specifier"
195 -//config: depends on DATE
196 +//config: depends on DATE && PLATFORM_LINUX # syscall(__NR_clock_gettime)
198 //config: Support %[num]N format specifier. Adds ~250 bytes of code.
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
208 + depends on PLATFORM_LINUX
210 lsattr lists the file attributes on a second extended file system.
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
220 + depends on PLATFORM_LINUX
221 select FEATURE_SYSLOG
223 init is the first program run when the system boots.
226 bool "poweroff, halt, and reboot"
228 + depends on PLATFORM_LINUX
230 Stop all processes and either halt, reboot, or power off the system.
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
237 //config:config BOOTCHARTD
238 //config: bool "bootchartd"
240 +//config: depends on PLATFORM_LINUX
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
249 config MONOTONIC_SYSCALL
250 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
252 + depends on PLATFORM_LINUX
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
264 + depends on PLATFORM_LINUX
265 select FEATURE_SYSLOG
267 getty lets you log in on a tty, it is normally invoked by init.
272 + depends on PLATFORM_LINUX
274 select FEATURE_SYSLOG
280 + depends on PLATFORM_LINUX
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
292 + depends on PLATFORM_LINUX
294 Adjtimex reads and optionally sets adjustment parameters for
295 the Linux clock adjustment algorithm.
300 + depends on PLATFORM_LINUX
302 The beep applets beeps in a given freq/Hz.
306 bool "devfsd (obsolete)"
308 + depends on PLATFORM_LINUX
309 select FEATURE_SYSLOG
311 This is deprecated and should NOT be used anymore.
314 bool "Use devfs names for all devices (obsolete)"
316 + depends on PLATFORM_LINUX
318 This is obsolete and should NOT be used anymore.
319 Use linux >= 2.6 (optionally with hotplug) and mdev instead!
324 + depends on PLATFORM_LINUX
326 Used to eject cdroms. (defaults to /dev/cdrom)
332 + depends on PLATFORM_LINUX
334 Shows splash image and progress bar on framebuffer device.
335 Can be used during boot phase of an embedded device. ~2kb.
340 + depends on PLATFORM_LINUX
342 Set/set program io scheduling class and priority
343 Requires kernel >= 2.6.13
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
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'.
360 + depends on PLATFORM_LINUX
362 Get/Set hard drive parameters. Primarily intended for ATA
363 drives. Adds about 13k (or around 30k if you enable the
368 + depends on PLATFORM_LINUX
370 raidautorun tells the kernel md driver to
371 search and start RAID arrays.
377 + depends on LFS && PLATFORM_LINUX
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.
384 default n # doesn't build on Ubuntu 9.04
385 + depends on PLATFORM_LINUX
387 Enable/disable wireless devices.
393 + depends on PLATFORM_LINUX
395 Receive files using the Xmodem protocol.
401 + depends on PLATFORM_LINUX
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
410 //config:config CONSPY
411 //config: bool "conspy"
413 +//config: depends on PLATFORM_LINUX
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
422 //config:config UBIATTACH
423 //config: bool "ubiattach"
425 +//config: depends on PLATFORM_LINUX
427 //config: Attach MTD device to an UBI device.
429 //config:config UBIDETACH
430 //config: bool "ubidetach"
432 +//config: depends on PLATFORM_LINUX
434 //config: Detach MTD device from an UBI device.
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
443 menu "Linux Module Utilities"
444 +depends on PLATFORM_LINUX
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
453 config VERBOSE_RESOLUTION_ERRORS
454 bool "Verbose resolution errors"
456 + depends on PLATFORM_LINUX #because of xsocket() in libbb/xfuncs_prinf.c
458 Enable if you are not satisfied with simplistic
459 "can't resolve 'hostname.com'" and want to know more.
464 + depends on PLATFORM_LINUX
466 Manipulate the system ARP cache.
471 + depends on PLATFORM_LINUX
473 Ping hosts by ARP packets.
478 + depends on PLATFORM_LINUX
480 Manage ethernet bridges.
481 Supports addbr/delbr and addif/delif.
486 + depends on PLATFORM_LINUX
488 Send a magic packet to wake up sleeping machines.
494 + depends on PLATFORM_LINUX
496 Ifconfig is used to configure the kernel-resident network interfaces.
502 + depends on PLATFORM_LINUX
504 Userspace application to bind several interfaces
505 to a logical interface (use with kernel bonding driver).
510 + depends on PLATFORM_LINUX
512 Network interface plug detection daemon.
515 config FEATURE_IFUPDOWN_IP_BUILTIN
516 bool "Use busybox ip applet"
518 - depends on FEATURE_IFUPDOWN_IP
519 + depends on FEATURE_IFUPDOWN_IP && PLATFORM_LINUX
521 select FEATURE_IP_ADDRESS
522 select FEATURE_IP_LINK
527 + depends on PLATFORM_LINUX
529 The "ip" applet is a TCP/IP interface configuration and routing
530 utility. You generally don't need "ip" to use busybox with
535 + depends on PLATFORM_LINUX
536 select FEATURE_SYSLOG
538 nameif is used to rename network interface by its MAC address.
543 + depends on PLATFORM_LINUX
545 netstat prints information about the Linux networking subsystem.
551 + depends on PLATFORM_LINUX
553 The NTP client/server daemon.
559 + depends on PLATFORM_LINUX
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 @@
567 + depends on PLATFORM_LINUX
569 Route displays or manipulates the kernel's IP routing tables.
574 + depends on PLATFORM_LINUX
576 slattach is a small utility to attach network interfaces to serial
582 + depends on PLATFORM_LINUX
584 tcpsvd listens on a TCP port and runs a program for each new
590 + depends on PLATFORM_LINUX
592 Utility to trace the route of IP packets.
598 + depends on PLATFORM_LINUX
600 tunctl creates or deletes tun devices.
606 + depends on PLATFORM_LINUX
608 udpsvd listens on an UDP port and runs a program for each new
614 + depends on PLATFORM_LINUX
616 Creates, removes, and configures VLAN interfaces
622 + depends on PLATFORM_LINUX
623 select FEATURE_SYSLOG
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
632 bool "udhcp server (udhcpd)"
634 + depends on PLATFORM_LINUX
636 udhcpd is a DHCP server geared primarily toward embedded systems,
637 while striving to be fully functional and RFC compliant.
640 bool "udhcp client (udhcpc)"
642 + depends on PLATFORM_LINUX
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
654 + depends on PLATFORM_LINUX #sysinfo()
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.
659 config FEATURE_PS_TIME
660 bool "Enable time and elapsed time output"
662 - depends on PS && DESKTOP
663 + depends on PS && DESKTOP && PLATFORM_LINUX #sysinfo()
665 Support -o time and -o etime output specifiers.
671 + depends on PLATFORM_LINUX #sysinfo()
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
683 + depends on PLATFORM_LINUX
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
695 + depends on PLATFORM_LINUX
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
703 + depends on PLATFORM_LINUX
706 Lists labels and UUIDs of all filesystems.
711 + depends on PLATFORM_LINUX
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
719 + depends on PLATFORM_LINUX
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
727 + depends on PLATFORM_LINUX
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 @@
735 + depends on PLATFORM_LINUX
737 fdformat is used to low-level format a floppy disk.
742 + depends on PLATFORM_LINUX
744 The fdisk utility is used to divide hard disks into one or more
745 logical disks, which are generally called partitions. This utility
750 + depends on PLATFORM_LINUX
753 Prints the name of a filesystem with given label or UUID.
758 + depends on PLATFORM_LINUX
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 @@
766 + depends on PLATFORM_LINUX
768 Utility to create EXT2 filesystems.
773 + depends on PLATFORM_LINUX
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
781 + depends on PLATFORM_LINUX
783 Utility to create ReiserFS filesystems.
784 Note: this applet needs a lot of testing and polishing.
789 + depends on PLATFORM_LINUX
791 Utility to create FAT32 filesystems.
797 + depends on PLATFORM_LINUX
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
805 + depends on PLATFORM_LINUX
808 The ipcs utility is used to provide information on the currently
813 + depends on PLATFORM_LINUX
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
821 + #depends on PLATFORM_LINUX
823 lspci is a utility for displaying information about PCI buses in the
824 system and devices connected to them.
829 + #depends on PLATFORM_LINUX
831 lsusb is a utility for displaying information about USB buses in the
832 system and devices connected to them.
837 + depends on PLATFORM_LINUX
839 mdev is a mini-udev implementation for dynamically creating device
840 nodes in the /dev directory.
845 + depends on PLATFORM_LINUX
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
853 + depends on PLATFORM_LINUX
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 @@
861 + #depends on PLATFORM_LINUX
863 This allows you to parse /proc/profile for basic profiling.
868 + depends on PLATFORM_LINUX
870 Enter a system sleep state until specified wakeup time.
876 + depends on PLATFORM_LINUX
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
884 + depends on PLATFORM_LINUX
886 This option enables both the 'swapon' and the 'swapoff' utilities.
887 Once you have created some swap space using 'mkswap', you also need
892 + depends on PLATFORM_LINUX
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
900 + depends on PLATFORM_LINUX
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
912 + depends on PLATFORM_LINUX
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