aboutsummaryrefslogtreecommitdiff
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-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
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 @@
menu "Init Utilities"
-config CONFIG_INIT
+config INIT
bool "init"
default n
- select CONFIG_FEATURE_SYSLOG
+ select FEATURE_SYSLOG
help
init is the first program run when the system boots.
-config CONFIG_DEBUG_INIT
+config DEBUG_INIT
bool "debugging aid"
default n
- depends on CONFIG_INIT
+ depends on INIT
help
Turn this on to disable all the dangerous
rebooting stuff when debugging.
-config CONFIG_FEATURE_USE_INITTAB
+config FEATURE_USE_INITTAB
bool "Support reading an inittab file"
default y
- depends on CONFIG_INIT
+ depends on INIT
help
Allow init to read an inittab file when the system boot.
-config CONFIG_FEATURE_INIT_SCTTY
+config FEATURE_INIT_SCTTY
bool "Support running commands with a controlling-tty"
default n
- depends on CONFIG_INIT
+ depends on INIT
help
If this option is enabled a command starting with hyphen (-)
is run in its own session (setsid(2)) and possibly with a
@@ -38,17 +38,17 @@ config CONFIG_FEATURE_INIT_SCTTY
behavour, but is often what you want in an embedded system where
the console is only accessed during development or for maintenance.
-config CONFIG_FEATURE_EXTRA_QUIET
+config FEATURE_EXTRA_QUIET
bool "Be _extra_ quiet on boot"
default y
- depends on CONFIG_INIT
+ depends on INIT
help
Prevent init from logging some messages to the console during boot.
-config CONFIG_FEATURE_INIT_COREDUMPS
+config FEATURE_INIT_COREDUMPS
bool "Support dumping core for child processes (debugging only)"
default n
- depends on CONFIG_INIT
+ depends on INIT
help
If this option is enabled and the file /.init_enable_core
exists, then init will call setrlimit() to allow unlimited
@@ -57,10 +57,10 @@ config CONFIG_FEATURE_INIT_COREDUMPS
-config CONFIG_FEATURE_INITRD
+config FEATURE_INITRD
bool "Support running init from within an initrd (not initramfs)"
default y
- depends on CONFIG_INIT
+ depends on INIT
help
Legacy support for running init under the old-style initrd. Allows
the name linuxrc to act as init, and it doesn't assume init is PID 1.
@@ -68,13 +68,13 @@ config CONFIG_FEATURE_INITRD
This does not apply to initramfs, which runs /init as PID 1 and
requires no special support.
-config CONFIG_HALT
+config HALT
bool "poweroff, halt, and reboot"
default y
help
Stop all processes and either halt, reboot, or power off the system.
-config CONFIG_MESG
+config MESG
bool "mesg"
default y
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 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
+#
+# Licensed under the GPL v2, see the file LICENSE in this tarball.
+
+lib-y:=
+lib-$(CONFIG_HALT) += halt.o
+lib-$(CONFIG_INIT) += init.o
+lib-$(CONFIG_MESG) += mesg.o
+lib-$(CONFIG_INIT) += init_shared.o
+lib-$(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 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-ifndef top_srcdir
-top_srcdir=..
-endif
-ifndef top_builddir
-top_builddir=..
-endif
-srcdir=$(top_srcdir)/init
-INIT_DIR:=./
-include $(top_srcdir)/Rules.mak
-include $(top_builddir)/.config
-include $(srcdir)/Makefile.in
-all: $(libraries-y)
--include $(top_builddir)/.depend
-
-clean:
- rm -f *.o *.a $(AR_TARGET)
-
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 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-INIT_AR:=init.a
-ifndef $(INIT_DIR)
-INIT_DIR:=$(top_builddir)/init/
-endif
-srcdir=$(top_srcdir)/init
-
-INIT-y:=
-INIT-$(CONFIG_HALT) += halt.o
-INIT-$(CONFIG_INIT) += init.o
-INIT-$(CONFIG_MESG) += mesg.o
-
-ifeq ($(strip $(CONFIG_HALT)),y)
-CONFIG_INIT_SHARED=y
-else
-ifeq ($(strip $(CONFIG_INIT)),y)
-CONFIG_INIT_SHARED=y
-else
-CONFIG_INIT_SHARED=n
-endif
-endif
-
-INIT-$(CONFIG_INIT_SHARED) += init_shared.o
-
-ifneq ($(strip $(INIT-y)),)
-libraries-y+=$(INIT_DIR)$(INIT_AR)
-endif
-
-INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y))
-INIT_SRC-a:=$(wildcard $(srcdir)/*.c)
-APPLET_SRC-y+=$(INIT_SRC-y)
-APPLET_SRC-a+=$(INIT_SRC-a)
-
-$(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y))
- $(do_ar)
-
-$(INIT_DIR)%.o: $(srcdir)/%.c
- $(compile.c)