The linux kernel config file is now optional. If none is given, a default one is created using the default target for the given architecture.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Apr 23 21:06:09 2007 +0000 (2007-04-23)
changeset 49f431118daec4
parent 48 d19bdc2c5fff
child 50 db48fd40bdb9
The linux kernel config file is now optional. If none is given, a default one is created using the default target for the given architecture.
config/kernel_linux.in
scripts/build/kernel_linux.sh
     1.1 --- a/config/kernel_linux.in	Mon Apr 23 21:03:49 2007 +0000
     1.2 +++ b/config/kernel_linux.in	Mon Apr 23 21:06:09 2007 +0000
     1.3 @@ -117,8 +117,9 @@
     1.4      prompt "Configuration file"
     1.5      default ""
     1.6      help
     1.7 -      Path to the kernel configuration file.
     1.8 +      Path to a kernel configuration file.
     1.9        
    1.10 -      You _must_ provide one (for now).
    1.11 +      If you don't provide one, then the default configuration for
    1.12 +      your target will be used.
    1.13  
    1.14  endif
     2.1 --- a/scripts/build/kernel_linux.sh	Mon Apr 23 21:03:49 2007 +0000
     2.2 +++ b/scripts/build/kernel_linux.sh	Mon Apr 23 21:06:09 2007 +0000
     2.3 @@ -6,8 +6,21 @@
     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" ]; then
     2.8 -        CT_TestOrAbort "You did not provide a kernel config file!" -n "${CT_KERNEL_LINUX_CONFIG_FILE}" -a -f "${CT_KERNEL_LINUX_CONFIG_FILE}"
     2.9 +    if [    "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" \
    2.10 +         -a \( -z "${CT_KERNEL_LINUX_CONFIG_FILE}" -o ! -r "${CT_KERNEL_LINUX_CONFIG_FILE}" \) ]; then
    2.11 +        CT_DoLog WARN "You did not provide a kernel configuration file!"
    2.12 +        CT_DoLog WARN "I will try to generate one for you, but beware!"
    2.13 +
    2.14 +        CT_DoStep INFO "Building a default configuration file for linux kernel"
    2.15 +
    2.16 +        mkdir -p "${CT_BUILD_DIR}/build-kernel-defconfig"
    2.17 +        cd "${CT_BUILD_DIR}/build-kernel-defconfig"
    2.18 +        make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=`pwd`   \
    2.19 +             ARCH=${CT_KERNEL_ARCH} defconfig               2>&1 |CT_DoLog DEBUG
    2.20 +
    2.21 +        CT_KERNEL_LINUX_CONFIG_FILE="`pwd`/.config"
    2.22 +
    2.23 +        CT_EndStep
    2.24      fi
    2.25  
    2.26      CT_EndStep