Rework the way EXPERIMENTAL kernels are marked as such.
/trunk/kconfig/kconfig.mk | 51 25 26 0 ++++++++++++++++++++++----------------------
/trunk/docs/overview.txt | 47 47 0 0 +++++++++++++++++++++++++++++++++++++++++
/trunk/config/kernel/bare-metal.in | 1 1 0 0 +
3 files changed, 73 insertions(+), 26 deletions(-)
1.1 --- a/config/kernel/bare-metal.experimental.in Mon Sep 29 18:16:03 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,11 +0,0 @@
1.4 -# Bare metal config options
1.5 -
1.6 -config KERNEL_bare_metal
1.7 - select BARE_METAL
1.8 - help
1.9 - 'Bare metal' refers to those programs that run without any kernel.
1.10 -
1.11 - You probably want to say 'y' here if you plan to use your compiler
1.12 - to build bootloaders. It is not yet suitable to build Linux kernels,
1.13 - though, because the APCI stuff relies on the target C library headers
1.14 - being available?!?!...
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/kernel/bare-metal.in Mon Sep 29 20:19:45 2008 +0000
2.3 @@ -0,0 +1,12 @@
2.4 +# Bare metal config options
2.5 +# EXPERIMENTAL
2.6 +
2.7 +config KERNEL_bare_metal
2.8 + select BARE_METAL
2.9 + help
2.10 + 'Bare metal' refers to those programs that run without any kernel.
2.11 +
2.12 + You probably want to say 'y' here if you plan to use your compiler
2.13 + to build bootloaders. It is not yet suitable to build Linux kernels,
2.14 + though, because the APCI stuff relies on the target C library headers
2.15 + being available?!?!...
3.1 --- a/docs/overview.txt Mon Sep 29 18:16:03 2008 +0000
3.2 +++ b/docs/overview.txt Mon Sep 29 20:19:45 2008 +0000
3.3 @@ -659,6 +659,53 @@
3.4 - default to:
3.5 - all empty
3.6
3.7 +Kernel specific |
3.8 +----------------+
3.9 +
3.10 +A kernel is defined by:
3.11 +
3.12 + - a human-readable name, in lower case letters, with numbers as appropriate.
3.13 + The underscore is allowed; space and special characters are not (although
3.14 + they are internally replaced with underscores.
3.15 + Eg.: linux, bare-metal
3.16 + - a file in "config/kernel/", named after the kernel name, and suffixed with
3.17 + ".in".
3.18 + Eg.: config/kernel/linux.in, config/kernel/bare-metal.in
3.19 +
3.20 +The kernel's ".in" file must contain:
3.21 + > an optional lines containing exactly "# EXPERIMENTAL", starting on the
3.22 + first column, and without any following space or other character.
3.23 + If this line is present, then this kernel is considered EXPERIMENTAL,
3.24 + and correct dependency on EXPERIMENTAL will be set.
3.25 + > the config option "KERNEL_%kernel_name%" (where %kernel_name% is to be
3.26 + replaced with the actual kernel name, with all special characters and
3.27 + spaces replaced by underscores).
3.28 + That config option must have *neither* a type, *nor* a prompt! Also, it can
3.29 + *not* depends on EXPERIMENTAL.
3.30 + Eg.: KERNEL_linux, KERNEL_bare_metal
3.31 + + mandatory:
3.32 + defines a (terse) help entry for this kernel.
3.33 + Eg.:
3.34 + config KERNEL_bare_metal
3.35 + help
3.36 + Build a compiler for use without any kernel.
3.37 + + optional:
3.38 + selects adequate associated config options.
3.39 + Eg.:
3.40 + config KERNEL_bare_metal
3.41 + select BARE_METAL
3.42 + help
3.43 + Build a compiler for use without any kernel.
3.44 +
3.45 + > other kernel specific options, at your discretion. Note however that, to
3.46 + avoid name-clashing, such options should be prefixed with
3.47 + "KERNEL_%kernel_name%", where %kernel_name% is again tp be replaced with
3.48 + the actual kernel name.
3.49 + (Note: due to historical reasons, and lack of time to clean up the code,
3.50 + I may have left some config options that do not completely conform to
3.51 + this, as the kernel name was written all upper case. However, the prefix
3.52 + is unique among kernels, and does not cause harm).
3.53 +
3.54 Adding a new version of a component |
3.55 ------------------------------------+
3.56
4.1 --- a/kconfig/kconfig.mk Mon Sep 29 18:16:03 2008 +0000
4.2 +++ b/kconfig/kconfig.mk Mon Sep 29 20:19:45 2008 +0000
4.3 @@ -48,7 +48,8 @@
4.4 echo "# Generated file, do not edit!!!"; \
4.5 echo ""; \
4.6 for arch in $(ARCHS); do \
4.7 - echo "config ARCH_$${arch}"; \
4.8 + _arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \
4.9 + echo "config ARCH_$${_arch}"; \
4.10 echo " bool"; \
4.11 printf " prompt \"$${arch}"; \
4.12 if [ -f $(CT_LIB_DIR)/arch/$${arch}/experimental ]; then \
4.13 @@ -57,9 +58,9 @@
4.14 else \
4.15 echo "\""; \
4.16 fi; \
4.17 - echo "if ARCH_$${arch}"; \
4.18 + echo "if ARCH_$${_arch}"; \
4.19 echo "config ARCH"; \
4.20 - echo " default \"$${arch}\" if ARCH_$${arch}"; \
4.21 + echo " default \"$${arch}\" if ARCH_$${_arch}"; \
4.22 echo "source config/arch/$${arch}/config.in"; \
4.23 echo "endif"; \
4.24 echo ""; \
4.25 @@ -68,29 +69,27 @@
4.26
4.27 $(CT_TOP_DIR)/config.gen/kernel.in: $(KERN_CONFIG_FILES)
4.28 @echo ' IN config.gen/kernel.in'
4.29 - @(echo "# Kernel menu"; \
4.30 - echo "# Generated file, do not edit!!!"; \
4.31 - echo ""; \
4.32 - for kern in $(KERNELS); do \
4.33 - _exp="$${kern/*./}"; \
4.34 - _kern1="$${kern/.experimental/}"; \
4.35 - _kern2=$$(echo "$${_kern1}" |sed -r -e 's/[ -\/]/_/g;'); \
4.36 - echo "config KERNEL_$${_kern2}"; \
4.37 - echo " bool"; \
4.38 - printf " prompt \"$${_kern1}"; \
4.39 - if [ "$${_exp}" != "$${kern}" ]; then \
4.40 - echo " (EXPERIMENTAL)\""; \
4.41 - echo " depends on EXPERIMENTAL"; \
4.42 - else \
4.43 - echo "\""; \
4.44 - fi; \
4.45 - echo "if KERNEL_$${_kern2}"; \
4.46 - echo "config KERNEL"; \
4.47 - echo " default \"$${_kern1}\" if KERNEL_$${_kern2}"; \
4.48 - echo "source config/kernel/$${kern}.in"; \
4.49 - echo "endif"; \
4.50 - echo ""; \
4.51 - done; \
4.52 + @(echo "# Kernel menu"; \
4.53 + echo "# Generated file, do not edit!!!"; \
4.54 + echo ""; \
4.55 + for kern in $(KERNELS); do \
4.56 + _kern=$$(echo "$${kern}" |sed -r -s -e 's/[-.+]/_/g;'); \
4.57 + echo "config KERNEL_$${_kern}"; \
4.58 + echo " bool"; \
4.59 + printf " prompt \"$${kern}"; \
4.60 + if grep -E '^# +EXPERIMENTAL$$' config/kernel/$${kern}.in >/dev/null 2>&1; then \
4.61 + echo " (EXPERIMENTAL)\""; \
4.62 + echo " depends on EXPERIMENTAL"; \
4.63 + else \
4.64 + echo "\""; \
4.65 + fi; \
4.66 + echo "if KERNEL_$${_kern}"; \
4.67 + echo "config KERNEL"; \
4.68 + echo " default \"$${kern}\" if KERNEL_$${_kern}"; \
4.69 + echo "source config/kernel/$${kern}.in"; \
4.70 + echo "endif"; \
4.71 + echo ""; \
4.72 + done; \
4.73 ) >$@
4.74
4.75 $(CT_TOP_DIR)/config.gen/debug.in: $(DEBUG_CONFIG_FILES)