From c027752d4ebc54522a4dcd84c9ff01b488898046 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Sun, 7 Sep 2003 04:26:58 +0000 Subject: [PATCH] implemented fully static kernel configuration without any automated generation (of course optional) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1330 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- Documentation/Developers/CHANGELOG-RENE | 2 + package/base/linux24/config-500.hlp | 10 ++-- package/base/linux24/config-500.in | 32 ++++++++----- package/base/linux24/lx_config.sh | 64 +++++++++++++++---------- 4 files changed, 66 insertions(+), 42 deletions(-) diff --git a/Documentation/Developers/CHANGELOG-RENE b/Documentation/Developers/CHANGELOG-RENE index 8cfcc1df7..2c2b07133 100644 --- a/Documentation/Developers/CHANGELOG-RENE +++ b/Documentation/Developers/CHANGELOG-RENE @@ -2,6 +2,8 @@ *) 2003-09-06 (2.0.0-rc1 - 2.0.0-rc2) - fixed nvrec and libsdl_gfx for non x86 builds + - implemented fully static kernel configuration without + any automated generation *) 2003-09-05 (2.0.0-rc1 - 2.0.0-rc2) diff --git a/package/base/linux24/config-500.hlp b/package/base/linux24/config-500.hlp index 5bb377b45..54680a45e 100644 --- a/package/base/linux24/config-500.hlp +++ b/package/base/linux24/config-500.hlp @@ -34,9 +34,13 @@ ROCKCFG_DEFAULT_KERNEL (and thus used for 3rd-party kernel modules like ALSA and lm_sensors) and which headers will be installed into /usr/include/{asm,linux}. -ROCKCFG_PKG_LINUX_MODS - Please check here if you want to build all not-activated parts of the - kernel as modules. +ROCKCFG_PKG_LINUX_CONFIG_STYLE + This options selects whether to do no automated kernel configuration + generation, to parse the normal ROCK Linux configuraton templats - or + to perform the normal parsing and additionally enable all modules (the + default setting). The first option - to disable the configuration - + is useful if you want to supply a full configuration in + config/$id/linux.cfg. ROCKCFG_PKG_LINUX_USE25MODTOOLS Please check here if you want to use the newer modutils. This is diff --git a/package/base/linux24/config-500.in b/package/base/linux24/config-500.in index 34fa12de1..92b55f1c0 100644 --- a/package/base/linux24/config-500.in +++ b/package/base/linux24/config-500.in @@ -21,18 +21,6 @@ # --- ROCK-COPYRIGHT-NOTE-END --- menu_begin MENU_PKG_LINUX 'Linux Kernel Options' - bool 'Apply custom kernel build configuration settings' \ - ROCKCFG_PKG_LINUX_CUSTCONFIG 0 - if [ "$ROCKCFG_PKG_LINUX_CUSTCONFIG" = 1 ] ; then - block_begin 3 - editfile ROCKCFG_PKG_LINUX_CUSTCONFIG_FILE \ - config/$config/linux.cfg \ - 'Linux kernel build config settings' - block_end - else - rm -f config/$config/linux.cfg - fi - default='' ; list='' while read pkg ver ; do default=${default:-$pkg} ; [ $pkg = linux24 ] && default=linux24 @@ -47,7 +35,25 @@ menu_begin MENU_PKG_LINUX 'Linux Kernel Options' pkgfilter sed -e "/ linux.*-header / s/^./O/" \ -e "/ $ROCKCFG_DEFAULT_KERNEL-header / s/^./X/" - bool 'Build all (not disabled) kernel modules' ROCKCFG_PKG_LINUX_MODS 1 + bool 'Apply custom kernel build configuration settings' \ + ROCKCFG_PKG_LINUX_CUSTCONFIG 0 + + if [ "$ROCKCFG_PKG_LINUX_CUSTCONFIG" = 1 ] ; then + block_begin 3 + comment 'The kernel config is strored in:' + comment "config/$config/linux.cfg" + editfile ROCKCFG_PKG_LINUX_CUSTCONFIG_FILE \ + config/$config/linux.cfg \ + 'Linux kernel build config settings' + block_end + else + rm -f config/$config/linux.cfg + fi + + choice ROCKCFG_PKG_LINUX_CONFIG_STYLE modules \ + none 'Do not perform any automatic kernel configuration' \ + nomodules 'Perform normal kernel configuration without modules' \ + modules 'Perform normal kernel configuration including modules' bool 'Build kernel 2.5.x module utils (module-init-tools)' \ ROCKCFG_PKG_LINUX_USE25MODTOOLS 1 diff --git a/package/base/linux24/lx_config.sh b/package/base/linux24/lx_config.sh index b204673fb..3284180f5 100644 --- a/package/base/linux24/lx_config.sh +++ b/package/base/linux24/lx_config.sh @@ -41,31 +41,8 @@ for x in $patchfiles ; do fi done -lx_config () +auto_config () { - echo "Generic linux source patching and configuration ..." - - hook_eval prepatch - apply_patchfiles - hook_eval postpatch - - echo "Redefining some VERSION flags ..." - x="-`echo $ver-rock | cut -d - -f 2-`" - sed -e "s/^EXTRAVERSION =.*/EXTRAVERSION = $x/" Makefile > Makefile.new - mv Makefile.new Makefile - - echo "Correcting user and permissions ..." - chown -R root.root . * ; chmod -R u=rwX,go=rX . - - if [[ $treever = 24* ]] ; then - echo "Create symlinks and a few headers for <$lx_cpu> ... " - eval $MAKE include/linux/version.h symlinks - cp $base/package/base/linux24/autoconf.h include/linux/ - touch include/linux/modversions.h - fi - - echo "Creating default configuration ...." - if [ -f $base/architecture/$arch/kernel$treever.conf.sh ] ; then echo " using: architecture/$arch/kernel$treever.conf.sh" . $base/architecture/$arch/kernel$treever.conf.sh > .config @@ -149,12 +126,47 @@ lx_config () mv .config .config_nomods # which .config to use? - if [ "$ROCKCFG_PKG_LINUX_MODS" = 0 ] ; then + if [ "$ROCKCFG_PKG_LINUX_CONFIG_STYLE" = "modules" ] ; then + cp .config_modules .config + else cp .config_nomods .config + fi +} + +lx_config () +{ + echo "Generic linux source patching and configuration ..." + + hook_eval prepatch + apply_patchfiles + hook_eval postpatch + + echo "Redefining some VERSION flags ..." + x="-`echo $ver-rock | cut -d - -f 2-`" + sed -e "s/^EXTRAVERSION =.*/EXTRAVERSION = $x/" Makefile > Makefile.new + mv Makefile.new Makefile + + echo "Correcting user and permissions ..." + chown -R root.root . * ; chmod -R u=rwX,go=rX . + + if [[ $treever = 24* ]] ; then + echo "Create symlinks and a few headers for <$lx_cpu> ... " + eval $MAKE include/linux/version.h symlinks + cp $base/package/base/linux24/autoconf.h include/linux/ + touch include/linux/modversions.h + fi + + if [ "$$ROCKCFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then + echo "Using \$base/config/\$config/linux.cfg." + echo "Since automatic generation is disabled ..." + cp -v $base/config/$config/linux.cfg .config else - cp .config_modules .config + echo "Automatically creating default configuration ...." + auto_config fi + echo "... configuration finished!" + if [[ $treever != 24* ]] ; then echo "Create symlinks and a few headers for <$lx_cpu> ... " eval $MAKE include/linux/version.h include/asm