#!/bin/bash
# $Id$
+# Fills variable KERNEL_CONFIG
determine_config_file() {
if [ "${CMD_KERNEL_CONFIG}" != "" ]
then
else
gen_die 'Error: No kernel .config specified, or file not found!'
fi
+ KERNEL_CONFIG="$(readlink -f "${KERNEL_CONFIG}")"
}
config_kernel() {
# or we might remove configurations someone is trying to test.
if isTrue "${MRPROPER}" || [ ! -f "${KERNEL_DIR}/.config" ]
then
- cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die 'Could not copy configuration file!'
+ local message='Could not copy configuration file!'
+ if [[ "$(file --brief --mime-type "${KERNEL_CONFIG}")" == application/x-gzip ]]; then
+ # Support --kernel-config=/proc/config.gz, mainly
+ zcat "${KERNEL_CONFIG}" > "${KERNEL_DIR}/.config" || gen_die "${message}"
+ else
+ cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "${message}"
+ fi
fi
if isTrue "${OLDCONFIG}"
else
print_info 1 "kernel: --clean is disabled; not running 'make clean'."
fi
-
+
if isTrue ${MENUCONFIG}
then
print_info 1 'kernel: >> Invoking menuconfig...'
- compile_generic menuconfig runtask
+ compile_generic menuconfig kernelruntask
[ "$?" ] || gen_die 'Error: menuconfig failed!'
elif isTrue ${CMD_GCONFIG}
then