|
|
|
@ -29,7 +29,19 @@ config_kernel() {
|
|
|
|
|
determine_config_file
|
|
|
|
|
cd "${KERNEL_DIR}" || gen_die 'Could not switch to the kernel directory!'
|
|
|
|
|
|
|
|
|
|
isTrue "${CLEAN}" && cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" > /dev/null 2>&1
|
|
|
|
|
# Backup and replace kernel .config
|
|
|
|
|
if isTrue "${CLEAN}" || [ ! -f "${KERNEL_DIR}/.config" ]
|
|
|
|
|
then
|
|
|
|
|
print_info 1 "config: Using config from ${KERNEL_CONFIG}"
|
|
|
|
|
if [ -f "${KERNEL_DIR}/.config" ]
|
|
|
|
|
then
|
|
|
|
|
cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" \
|
|
|
|
|
|| gen_die "Could not backup kernel config (${KERNEL_DIR}/.config)"
|
|
|
|
|
print_info 1 ' Previous config backed up to .config.bak'
|
|
|
|
|
fi
|
|
|
|
|
cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die 'Could not copy configuration file!'
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if isTrue ${MRPROPER}
|
|
|
|
|
then
|
|
|
|
|
print_info 1 'kernel: >> Running mrproper...'
|
|
|
|
@ -39,12 +51,6 @@ config_kernel() {
|
|
|
|
|
# If we're not cleaning, then we don't want to try to overwrite the configs
|
|
|
|
|
# or we might remove configurations someone is trying to test.
|
|
|
|
|
|
|
|
|
|
if isTrue "${CLEAN}"
|
|
|
|
|
then
|
|
|
|
|
print_info 1 "config: Using config from ${KERNEL_CONFIG}"
|
|
|
|
|
print_info 1 ' Previous config backed up to .config.bak'
|
|
|
|
|
cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die 'Could not copy configuration file!'
|
|
|
|
|
fi
|
|
|
|
|
if isTrue "${OLDCONFIG}"
|
|
|
|
|
then
|
|
|
|
|
print_info 1 ' >> Running oldconfig...'
|
|
|
|
@ -55,7 +61,7 @@ config_kernel() {
|
|
|
|
|
print_info 1 'kernel: >> Cleaning...'
|
|
|
|
|
compile_generic clean kernel
|
|
|
|
|
else
|
|
|
|
|
print_info 1 "config: --no-clean is enabled; leaving the .config alone."
|
|
|
|
|
print_info 1 "config: --no-clean is enabled; not running 'make clean'."
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if isTrue ${MENUCONFIG}
|
|
|
|
|