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.

This commit is contained in:
Yann E. MORIN" 2007-04-23 21:06:09 +00:00
parent dfe9efd35f
commit 4902ad7b07
2 changed files with 18 additions and 4 deletions

View File

@ -117,8 +117,9 @@ config KERNEL_LINUX_CONFIG_FILE
prompt "Configuration file"
default ""
help
Path to the kernel configuration file.
Path to a kernel configuration file.
You _must_ provide one (for now).
If you don't provide one, then the default configuration for
your target will be used.
endif

View File

@ -6,8 +6,21 @@
do_kernel_check_config() {
CT_DoStep INFO "Checking kernel configuration"
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" ]; then
CT_TestOrAbort "You did not provide a kernel config file!" -n "${CT_KERNEL_LINUX_CONFIG_FILE}" -a -f "${CT_KERNEL_LINUX_CONFIG_FILE}"
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" != "y" \
-a \( -z "${CT_KERNEL_LINUX_CONFIG_FILE}" -o ! -r "${CT_KERNEL_LINUX_CONFIG_FILE}" \) ]; then
CT_DoLog WARN "You did not provide a kernel configuration file!"
CT_DoLog WARN "I will try to generate one for you, but beware!"
CT_DoStep INFO "Building a default configuration file for linux kernel"
mkdir -p "${CT_BUILD_DIR}/build-kernel-defconfig"
cd "${CT_BUILD_DIR}/build-kernel-defconfig"
make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=`pwd` \
ARCH=${CT_KERNEL_ARCH} defconfig 2>&1 |CT_DoLog DEBUG
CT_KERNEL_LINUX_CONFIG_FILE="`pwd`/.config"
CT_EndStep
fi
CT_EndStep