mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-09 04:14:20 +00:00
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(-)
This commit is contained in:
parent
fa3f4b4f05
commit
cce0841d96
@ -1,4 +1,5 @@
|
||||
# Bare metal config options
|
||||
# EXPERIMENTAL
|
||||
|
||||
config KERNEL_bare_metal
|
||||
select BARE_METAL
|
@ -659,6 +659,53 @@ The "functions" file API:
|
||||
- default to:
|
||||
- all empty
|
||||
|
||||
Kernel specific |
|
||||
----------------+
|
||||
|
||||
A kernel is defined by:
|
||||
|
||||
- a human-readable name, in lower case letters, with numbers as appropriate.
|
||||
The underscore is allowed; space and special characters are not (although
|
||||
they are internally replaced with underscores.
|
||||
Eg.: linux, bare-metal
|
||||
- a file in "config/kernel/", named after the kernel name, and suffixed with
|
||||
".in".
|
||||
Eg.: config/kernel/linux.in, config/kernel/bare-metal.in
|
||||
|
||||
The kernel's ".in" file must contain:
|
||||
> an optional lines containing exactly "# EXPERIMENTAL", starting on the
|
||||
first column, and without any following space or other character.
|
||||
If this line is present, then this kernel is considered EXPERIMENTAL,
|
||||
and correct dependency on EXPERIMENTAL will be set.
|
||||
> the config option "KERNEL_%kernel_name%" (where %kernel_name% is to be
|
||||
replaced with the actual kernel name, with all special characters and
|
||||
spaces replaced by underscores).
|
||||
That config option must have *neither* a type, *nor* a prompt! Also, it can
|
||||
*not* depends on EXPERIMENTAL.
|
||||
Eg.: KERNEL_linux, KERNEL_bare_metal
|
||||
+ mandatory:
|
||||
defines a (terse) help entry for this kernel.
|
||||
Eg.:
|
||||
config KERNEL_bare_metal
|
||||
help
|
||||
Build a compiler for use without any kernel.
|
||||
+ optional:
|
||||
selects adequate associated config options.
|
||||
Eg.:
|
||||
config KERNEL_bare_metal
|
||||
select BARE_METAL
|
||||
help
|
||||
Build a compiler for use without any kernel.
|
||||
|
||||
> other kernel specific options, at your discretion. Note however that, to
|
||||
avoid name-clashing, such options should be prefixed with
|
||||
"KERNEL_%kernel_name%", where %kernel_name% is again tp be replaced with
|
||||
the actual kernel name.
|
||||
(Note: due to historical reasons, and lack of time to clean up the code,
|
||||
I may have left some config options that do not completely conform to
|
||||
this, as the kernel name was written all upper case. However, the prefix
|
||||
is unique among kernels, and does not cause harm).
|
||||
|
||||
Adding a new version of a component |
|
||||
------------------------------------+
|
||||
|
||||
|
@ -48,7 +48,8 @@ $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
|
||||
echo "# Generated file, do not edit!!!"; \
|
||||
echo ""; \
|
||||
for arch in $(ARCHS); do \
|
||||
echo "config ARCH_$${arch}"; \
|
||||
_arch=$$(echo "$${arch}" |sed -r -s -e 's/[-.+]/_/g;'); \
|
||||
echo "config ARCH_$${_arch}"; \
|
||||
echo " bool"; \
|
||||
printf " prompt \"$${arch}"; \
|
||||
if [ -f $(CT_LIB_DIR)/arch/$${arch}/experimental ]; then \
|
||||
@ -57,9 +58,9 @@ $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
|
||||
else \
|
||||
echo "\""; \
|
||||
fi; \
|
||||
echo "if ARCH_$${arch}"; \
|
||||
echo "if ARCH_$${_arch}"; \
|
||||
echo "config ARCH"; \
|
||||
echo " default \"$${arch}\" if ARCH_$${arch}"; \
|
||||
echo " default \"$${arch}\" if ARCH_$${_arch}"; \
|
||||
echo "source config/arch/$${arch}/config.in"; \
|
||||
echo "endif"; \
|
||||
echo ""; \
|
||||
@ -68,29 +69,27 @@ $(CT_TOP_DIR)/config.gen/arch.in: $(ARCH_CONFIG_FILES)
|
||||
|
||||
$(CT_TOP_DIR)/config.gen/kernel.in: $(KERN_CONFIG_FILES)
|
||||
@echo ' IN config.gen/kernel.in'
|
||||
@(echo "# Kernel menu"; \
|
||||
echo "# Generated file, do not edit!!!"; \
|
||||
echo ""; \
|
||||
for kern in $(KERNELS); do \
|
||||
_exp="$${kern/*./}"; \
|
||||
_kern1="$${kern/.experimental/}"; \
|
||||
_kern2=$$(echo "$${_kern1}" |sed -r -e 's/[ -\/]/_/g;'); \
|
||||
echo "config KERNEL_$${_kern2}"; \
|
||||
echo " bool"; \
|
||||
printf " prompt \"$${_kern1}"; \
|
||||
if [ "$${_exp}" != "$${kern}" ]; then \
|
||||
echo " (EXPERIMENTAL)\""; \
|
||||
echo " depends on EXPERIMENTAL"; \
|
||||
else \
|
||||
echo "\""; \
|
||||
fi; \
|
||||
echo "if KERNEL_$${_kern2}"; \
|
||||
echo "config KERNEL"; \
|
||||
echo " default \"$${_kern1}\" if KERNEL_$${_kern2}"; \
|
||||
echo "source config/kernel/$${kern}.in"; \
|
||||
echo "endif"; \
|
||||
echo ""; \
|
||||
done; \
|
||||
@(echo "# Kernel menu"; \
|
||||
echo "# Generated file, do not edit!!!"; \
|
||||
echo ""; \
|
||||
for kern in $(KERNELS); do \
|
||||
_kern=$$(echo "$${kern}" |sed -r -s -e 's/[-.+]/_/g;'); \
|
||||
echo "config KERNEL_$${_kern}"; \
|
||||
echo " bool"; \
|
||||
printf " prompt \"$${kern}"; \
|
||||
if grep -E '^# +EXPERIMENTAL$$' config/kernel/$${kern}.in >/dev/null 2>&1; then \
|
||||
echo " (EXPERIMENTAL)\""; \
|
||||
echo " depends on EXPERIMENTAL"; \
|
||||
else \
|
||||
echo "\""; \
|
||||
fi; \
|
||||
echo "if KERNEL_$${_kern}"; \
|
||||
echo "config KERNEL"; \
|
||||
echo " default \"$${kern}\" if KERNEL_$${_kern}"; \
|
||||
echo "source config/kernel/$${kern}.in"; \
|
||||
echo "endif"; \
|
||||
echo ""; \
|
||||
done; \
|
||||
) >$@
|
||||
|
||||
$(CT_TOP_DIR)/config.gen/debug.in: $(DEBUG_CONFIG_FILES)
|
||||
|
Loading…
x
Reference in New Issue
Block a user