The existing test .config files are moved to configs/ and renamed
to *_defconfig. 'make xyz_defconfig' will enable the
configuration in that specific file.

Signed-off-by: Daniel Fandrich <[email protected]>
---

The idea with this is to make it easy to add some more default Busybox
configurations from which users can start their own configuration. This
will be most useful for platforms with restrictions on which applets are
usable (e.g. FreeBSD, Android) since it can take a long time of trial
and error to find the largest set of applets that can be compiled or are
relevant.

It could also be useful to have some default configurations somewhere
between allnoconfig and defconfig as starting points. For example,
'initrd_defconfig' might have only those few utilities normally found
within an initial RAM disk, 'minimal_boot_defconfig' could have a
minimal configuration that can be used to boot a system to a shell (e.g.
mdev, mount, hush, mkdir, poweroff, etc.), 'coreutils_defconfig' might
have only the core utilities enabled and nothing else, and so on.

>>> Dan


 INSTALL                                            |    8 +++++---
 Makefile                                           |   11 +----------
 Makefile.help                                      |    4 ++++
 TEST_config_nommu => configs/TEST_nommu_defconfig  |    0
 .../TEST_noprintf_defconfig                        |    0
 TEST_config_rh9 => configs/TEST_rh9_defconfig      |    0
 scripts/kconfig/Makefile                           |    2 +-
 7 files changed, 11 insertions(+), 14 deletions(-)
 rename TEST_config_nommu => configs/TEST_nommu_defconfig (100%)
 rename TEST_config_noprintf => configs/TEST_noprintf_defconfig (100%)
 rename TEST_config_rh9 => configs/TEST_rh9_defconfig (100%)

diff --git a/INSTALL b/INSTALL
index ec2b028..e1cd708 100644
--- a/INSTALL
+++ b/INSTALL
@@ -70,7 +70,9 @@ create a known starting point.
 Other starting configurations (mostly used for testing purposes) include
 "make allbareconfig" (enables all applets but disables all optional features),
 "make allyesconfig" (enables absolutely everything including debug features),
-and "make randconfig" (produce a random configuration).
+and "make randconfig" (produce a random configuration).  The configs/ directory
+contains a number of additional configuration files ending in _defconfig which
+are useful in specific cases.  "make help" will list them.
 
 Configuring BusyBox produces a file ".config", which can be saved for future
 use.  Run "make oldconfig" to bring a .config file from an older version of
@@ -97,8 +99,8 @@ first argument to determine which applet to behave as, for 
example
 "./busybox cat LICENSE".  (Running the busybox applet with no arguments gives
 a list of all enabled applets.) The standalone shell can also call busybox
 applets without links to busybox under other names in the filesystem.  You can
-also configure a standaone install capability into the busybox base applet,
-and then install such links at runtime with one of "busybox --install" (for
+also configure a standalone install capability into the busybox base applet,
+and then install such links at run-time with one of "busybox --install" (for
 hardlinks) or "busybox --install -s" (for symlinks).
 
 If you enabled the busybox shared library feature (libbusybox.so) and want
diff --git a/Makefile b/Makefile
index c58097d..0fb3d4c 100644
--- a/Makefile
+++ b/Makefile
@@ -1042,7 +1042,7 @@ rpm: FORCE
 # Brief documentation of the typical targets used
 # ---------------------------------------------------------------------------
 
-boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
+boards := $(wildcard $(srctree)/configs/*_defconfig)
 boards := $(notdir $(boards))
 
 -include $(srctree)/Makefile.help
@@ -1131,15 +1131,6 @@ clean: $(clean-dirs)
                -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
                -type f -print | xargs rm -f
 
-help:
-       @echo  '  Building external modules.'
-       @echo  '  Syntax: make -C path/to/kernel/src M=$$PWD target'
-       @echo  ''
-       @echo  '  modules         - default target, build the module(s)'
-       @echo  '  modules_install - install the module'
-       @echo  '  clean           - remove generated files in module directory 
only'
-       @echo  ''
-
 # Dummies...
 PHONY += prepare scripts
 prepare: ;
diff --git a/Makefile.help b/Makefile.help
index 999d029..119dd6f 100644
--- a/Makefile.help
+++ b/Makefile.help
@@ -25,6 +25,10 @@ help:
        @echo '                           You can use these commands if the 
commands on the host'
        @echo '                           is unusable. Afterwards use it like:'
        @echo '                           make SED="$(objtree)/sed"'
+       @$(if $(boards), \
+               $(foreach b, $(boards), \
+               printf "  %-21s - Build for %s\\n" $(b) $(subst 
_defconfig,,$(b));) \
+               echo '')
        @echo
        @echo 'Installation:'
        @echo '  install                - install busybox into CONFIG_PREFIX'
diff --git a/TEST_config_nommu b/configs/TEST_nommu_defconfig
similarity index 100%
rename from TEST_config_nommu
rename to configs/TEST_nommu_defconfig
diff --git a/TEST_config_noprintf b/configs/TEST_noprintf_defconfig
similarity index 100%
rename from TEST_config_noprintf
rename to configs/TEST_noprintf_defconfig
diff --git a/TEST_config_rh9 b/configs/TEST_rh9_defconfig
similarity index 100%
rename from TEST_config_rh9
rename to configs/TEST_rh9_defconfig
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index b5708e2..1651390 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -87,7 +87,7 @@ endif
        $(MTIME_IS_COARSE) && sleep 1
 
 %_defconfig: $(obj)/conf
-       $(Q)$< -D $@ Config.in
+       $(Q)$< -D configs/$@ Config.in
        $(MTIME_IS_COARSE) && sleep 1
 
 # Help text used by make help
-- 
1.7.0.4

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to