summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /init
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
downloadbusybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip
build system overhaul
Diffstat (limited to 'init')
-rw-r--r--init/Config.in32
-rw-r--r--init/Kbuild12
-rw-r--r--init/Makefile23
-rw-r--r--init/Makefile.in43
4 files changed, 28 insertions, 82 deletions
diff --git a/init/Config.in b/init/Config.in
index 2a39d50e5..c0ad5263d 100644
--- a/init/Config.in
+++ b/init/Config.in
@@ -5,32 +5,32 @@
5 5
6menu "Init Utilities" 6menu "Init Utilities"
7 7
8config CONFIG_INIT 8config INIT
9 bool "init" 9 bool "init"
10 default n 10 default n
11 select CONFIG_FEATURE_SYSLOG 11 select FEATURE_SYSLOG
12 help 12 help
13 init is the first program run when the system boots. 13 init is the first program run when the system boots.
14 14
15config CONFIG_DEBUG_INIT 15config DEBUG_INIT
16 bool "debugging aid" 16 bool "debugging aid"
17 default n 17 default n
18 depends on CONFIG_INIT 18 depends on INIT
19 help 19 help
20 Turn this on to disable all the dangerous 20 Turn this on to disable all the dangerous
21 rebooting stuff when debugging. 21 rebooting stuff when debugging.
22 22
23config CONFIG_FEATURE_USE_INITTAB 23config FEATURE_USE_INITTAB
24 bool "Support reading an inittab file" 24 bool "Support reading an inittab file"
25 default y 25 default y
26 depends on CONFIG_INIT 26 depends on INIT
27 help 27 help
28 Allow init to read an inittab file when the system boot. 28 Allow init to read an inittab file when the system boot.
29 29
30config CONFIG_FEATURE_INIT_SCTTY 30config FEATURE_INIT_SCTTY
31 bool "Support running commands with a controlling-tty" 31 bool "Support running commands with a controlling-tty"
32 default n 32 default n
33 depends on CONFIG_INIT 33 depends on INIT
34 help 34 help
35 If this option is enabled a command starting with hyphen (-) 35 If this option is enabled a command starting with hyphen (-)
36 is run in its own session (setsid(2)) and possibly with a 36 is run in its own session (setsid(2)) and possibly with a
@@ -38,17 +38,17 @@ config CONFIG_FEATURE_INIT_SCTTY
38 behavour, but is often what you want in an embedded system where 38 behavour, but is often what you want in an embedded system where
39 the console is only accessed during development or for maintenance. 39 the console is only accessed during development or for maintenance.
40 40
41config CONFIG_FEATURE_EXTRA_QUIET 41config FEATURE_EXTRA_QUIET
42 bool "Be _extra_ quiet on boot" 42 bool "Be _extra_ quiet on boot"
43 default y 43 default y
44 depends on CONFIG_INIT 44 depends on INIT
45 help 45 help
46 Prevent init from logging some messages to the console during boot. 46 Prevent init from logging some messages to the console during boot.
47 47
48config CONFIG_FEATURE_INIT_COREDUMPS 48config FEATURE_INIT_COREDUMPS
49 bool "Support dumping core for child processes (debugging only)" 49 bool "Support dumping core for child processes (debugging only)"
50 default n 50 default n
51 depends on CONFIG_INIT 51 depends on INIT
52 help 52 help
53 If this option is enabled and the file /.init_enable_core 53 If this option is enabled and the file /.init_enable_core
54 exists, then init will call setrlimit() to allow unlimited 54 exists, then init will call setrlimit() to allow unlimited
@@ -57,10 +57,10 @@ config CONFIG_FEATURE_INIT_COREDUMPS
57 57
58 58
59 59
60config CONFIG_FEATURE_INITRD 60config FEATURE_INITRD
61 bool "Support running init from within an initrd (not initramfs)" 61 bool "Support running init from within an initrd (not initramfs)"
62 default y 62 default y
63 depends on CONFIG_INIT 63 depends on INIT
64 help 64 help
65 Legacy support for running init under the old-style initrd. Allows 65 Legacy support for running init under the old-style initrd. Allows
66 the name linuxrc to act as init, and it doesn't assume init is PID 1. 66 the name linuxrc to act as init, and it doesn't assume init is PID 1.
@@ -68,13 +68,13 @@ config CONFIG_FEATURE_INITRD
68 This does not apply to initramfs, which runs /init as PID 1 and 68 This does not apply to initramfs, which runs /init as PID 1 and
69 requires no special support. 69 requires no special support.
70 70
71config CONFIG_HALT 71config HALT
72 bool "poweroff, halt, and reboot" 72 bool "poweroff, halt, and reboot"
73 default y 73 default y
74 help 74 help
75 Stop all processes and either halt, reboot, or power off the system. 75 Stop all processes and either halt, reboot, or power off the system.
76 76
77config CONFIG_MESG 77config MESG
78 bool "mesg" 78 bool "mesg"
79 default y 79 default y
80 help 80 help
diff --git a/init/Kbuild b/init/Kbuild
new file mode 100644
index 000000000..e99360241
--- /dev/null
+++ b/init/Kbuild
@@ -0,0 +1,12 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7lib-y:=
8lib-$(CONFIG_HALT) += halt.o
9lib-$(CONFIG_INIT) += init.o
10lib-$(CONFIG_MESG) += mesg.o
11lib-$(CONFIG_INIT) += init_shared.o
12lib-$(CONFIG_HALT) += init_shared.o
diff --git a/init/Makefile b/init/Makefile
deleted file mode 100644
index 63816f6aa..000000000
--- a/init/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7ifndef top_srcdir
8top_srcdir=..
9endif
10ifndef top_builddir
11top_builddir=..
12endif
13srcdir=$(top_srcdir)/init
14INIT_DIR:=./
15include $(top_srcdir)/Rules.mak
16include $(top_builddir)/.config
17include $(srcdir)/Makefile.in
18all: $(libraries-y)
19-include $(top_builddir)/.depend
20
21clean:
22 rm -f *.o *.a $(AR_TARGET)
23
diff --git a/init/Makefile.in b/init/Makefile.in
deleted file mode 100644
index a48ead446..000000000
--- a/init/Makefile.in
+++ /dev/null
@@ -1,43 +0,0 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7INIT_AR:=init.a
8ifndef $(INIT_DIR)
9INIT_DIR:=$(top_builddir)/init/
10endif
11srcdir=$(top_srcdir)/init
12
13INIT-y:=
14INIT-$(CONFIG_HALT) += halt.o
15INIT-$(CONFIG_INIT) += init.o
16INIT-$(CONFIG_MESG) += mesg.o
17
18ifeq ($(strip $(CONFIG_HALT)),y)
19CONFIG_INIT_SHARED=y
20else
21ifeq ($(strip $(CONFIG_INIT)),y)
22CONFIG_INIT_SHARED=y
23else
24CONFIG_INIT_SHARED=n
25endif
26endif
27
28INIT-$(CONFIG_INIT_SHARED) += init_shared.o
29
30ifneq ($(strip $(INIT-y)),)
31libraries-y+=$(INIT_DIR)$(INIT_AR)
32endif
33
34INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y))
35INIT_SRC-a:=$(wildcard $(srcdir)/*.c)
36APPLET_SRC-y+=$(INIT_SRC-y)
37APPLET_SRC-a+=$(INIT_SRC-a)
38
39$(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
40 $(do_ar)
41
42$(INIT_DIR)%.o: $(srcdir)/%.c
43 $(compile.c)