From 84dbc01071f8cba3d02bf28951b08c01e2d3e06b Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 18 Nov 2010 01:00:50 +0100 Subject: [PATCH] linux26: introduced SDECFG_PKG_LINUX_CONFIG_FILE as replacement of the hardcoded $base/config/$config/linux.cfg --- base/linux26/config-700.in | 7 +++---- base/linux26/linux-conf.in | 11 ++++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/base/linux26/config-700.in b/base/linux26/config-700.in index b46d5245e..6726dc661 100644 --- a/base/linux26/config-700.in +++ b/base/linux26/config-700.in @@ -23,12 +23,11 @@ menu_begin MENU_PKG_LINUX 'Linux Kernel Options' humble 'Automatic, using defconfig but not forcing modules' \ nomodules 'Using defconfig but disabling all modules at the end' - if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" = none ]; then - comment " WARNING: you need config/$config/linux.cfg" - comment " for this setting to work." - fi + comment ' ' + text 'Custom settings file' SDECFG_PKG_LINUX_CONFIG_FILE "config/$config/linux.cfg" if pkgcheck uml_utilities X ; then + comment ' ' choice SDECFG_PKG_LINUX_UML_STYLE modules \ none 'Do not perform any automatic UML related optimization' \ skas3 'Build UML Host kernel with SKAS3 support' \ diff --git a/base/linux26/linux-conf.in b/base/linux26/linux-conf.in index 6c321a2aa..638f72113 100644 --- a/base/linux26/linux-conf.in +++ b/base/linux26/linux-conf.in @@ -31,7 +31,8 @@ fi lx_extraversion= lx_kernelrelease= -lx_customconf="$base/config/$config/linux.cfg" + +lx_customconf="${SDECFG_PKG_LINUX_CONFIG_FILE:-config/$config/linux.cfg}" # $lx_confmerge list of config snaps gets merged to .config.3 on auto_config() # @@ -287,8 +288,12 @@ lx_config() { echo "Generic linux configuration ..." hook_eval preconf if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then - echo "Using only ${lx_customconf#$base/}." - cp -vf $lx_customconf .config + echo_status "Using only ${lx_customconf}." + if expr "$lx_customconf" : '/*' > /dev/null; then + cp -vf "$lx_customconf" .config + else + cp -vf "$base/$lx_customconf" .config + fi eval $MAKE $makeopt oldconfig else echo "Automatically creating default configuration ...."