Simplify kernel config file need.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon May 07 21:45:31 2007 +0000 (2007-05-07)
changeset 66c77d59891a0d
parent 65 312fe9ff8370
child 67 f502c78444af
Simplify kernel config file need.
Don't build a default config file when not needed.
config/kernel_linux.in
scripts/build/kernel_linux.sh
     1.1 --- a/config/kernel_linux.in	Mon May 07 16:10:17 2007 +0000
     1.2 +++ b/config/kernel_linux.in	Mon May 07 21:45:31 2007 +0000
     1.3 @@ -15,15 +15,17 @@
     1.4      bool
     1.5      prompt "Mazur's sanitized headers (OBSOLETE)"
     1.6      depends on OBSOLETE
     1.7 +    select KERNEL_LINUX_NEEDS_CONFIG
     1.8      help
     1.9        M. Mazur used to maintain a tree of sanitised headers, but it is now
    1.10 -      obsoleted by the headers_install rule (above), and has not seen eny
    1.11 +      obsoleted by the headers_install rule (above), and has not seen any
    1.12        update since 2.6.12
    1.13  
    1.14  config KERNEL_LINUX_HEADERS_COPY
    1.15      bool
    1.16      prompt "pure kernel headers (REALLY OBSOLETE)"
    1.17      depends on OBSOLETE
    1.18 +    select KERNEL_LINUX_NEEDS_CONFIG
    1.19      help
    1.20        This will simply copy the kernel headers to the toolchain.
    1.21  
    1.22 @@ -114,9 +116,14 @@
    1.23      default 1 if KERNEL_LINUX_VERBOSITY_1
    1.24      default 2 if KERNEL_LINUX_VERBOSITY_2
    1.25  
    1.26 +config KERNEL_LINUX_NEEDS_CONFIG
    1.27 +    bool
    1.28 +    default n
    1.29 +
    1.30  config KERNEL_LINUX_CONFIG_FILE
    1.31      string
    1.32      prompt "Configuration file"
    1.33 +    depends on KERNEL_LINUX_NEEDS_CONFIG
    1.34      default ""
    1.35      help
    1.36        Path to a kernel configuration file.
     2.1 --- a/scripts/build/kernel_linux.sh	Mon May 07 16:10:17 2007 +0000
     2.2 +++ b/scripts/build/kernel_linux.sh	Mon May 07 21:45:31 2007 +0000
     2.3 @@ -27,8 +27,13 @@
     2.4  do_kernel_check_config() {
     2.5      CT_DoStep INFO "Checking kernel configuration"
     2.6  
     2.7 -    if [    "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" \
     2.8 -         -a \( -z "${CT_KERNEL_LINUX_CONFIG_FILE}" -o ! -r "${CT_KERNEL_LINUX_CONFIG_FILE}" \) ]; then
     2.9 +    # Only the copied or sanitised headers need a config file.
    2.10 +    # Pre-existing headers as well as headers_install don't.
    2.11 +    if [ "${CT_KERNEL_LINUX_NEEDS_CONFIG}" = "y"        \
    2.12 +         -a \( -z "${CT_KERNEL_LINUX_CONFIG_FILE}"      \
    2.13 +               -o ! -r "${CT_KERNEL_LINUX_CONFIG_FILE}" \
    2.14 +            \)                                          \
    2.15 +       ]; then
    2.16          CT_DoLog WARN "You did not provide a kernel configuration file!"
    2.17          CT_DoLog WARN "I will try to generate one for you, but beware!"
    2.18