Browse Source

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
rocklinux
Rene Rebe 21 years ago
parent
commit
c027752d4e
4 changed files with 66 additions and 42 deletions
  1. +2
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +7
    -3
      package/base/linux24/config-500.hlp
  3. +19
    -13
      package/base/linux24/config-500.in
  4. +38
    -26
      package/base/linux24/lx_config.sh

+ 2
- 0
Documentation/Developers/CHANGELOG-RENE

@ -2,6 +2,8 @@
*) 2003-09-06 (2.0.0-rc1 - 2.0.0-rc2) *) 2003-09-06 (2.0.0-rc1 - 2.0.0-rc2)
- fixed nvrec and libsdl_gfx for non x86 builds - 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) *) 2003-09-05 (2.0.0-rc1 - 2.0.0-rc2)

+ 7
- 3
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 thus used for 3rd-party kernel modules like ALSA and lm_sensors)
and which headers will be installed into /usr/include/{asm,linux}. 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 ROCKCFG_PKG_LINUX_USE25MODTOOLS
Please check here if you want to use the newer modutils. This is Please check here if you want to use the newer modutils. This is

+ 19
- 13
package/base/linux24/config-500.in

@ -21,18 +21,6 @@
# --- ROCK-COPYRIGHT-NOTE-END --- # --- ROCK-COPYRIGHT-NOTE-END ---
menu_begin MENU_PKG_LINUX 'Linux Kernel Options' 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='' default='' ; list=''
while read pkg ver ; do while read pkg ver ; do
default=${default:-$pkg} ; [ $pkg = linux24 ] && default=linux24 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/" \ pkgfilter sed -e "/ linux.*-header / s/^./O/" \
-e "/ $ROCKCFG_DEFAULT_KERNEL-header / s/^./X/" -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)' \ bool 'Build kernel 2.5.x module utils (module-init-tools)' \
ROCKCFG_PKG_LINUX_USE25MODTOOLS 1 ROCKCFG_PKG_LINUX_USE25MODTOOLS 1

+ 38
- 26
package/base/linux24/lx_config.sh

@ -41,31 +41,8 @@ for x in $patchfiles ; do
fi fi
done 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 if [ -f $base/architecture/$arch/kernel$treever.conf.sh ] ; then
echo " using: architecture/$arch/kernel$treever.conf.sh" echo " using: architecture/$arch/kernel$treever.conf.sh"
. $base/architecture/$arch/kernel$treever.conf.sh > .config . $base/architecture/$arch/kernel$treever.conf.sh > .config
@ -149,12 +126,47 @@ lx_config ()
mv .config .config_nomods mv .config .config_nomods
# which .config to use? # 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 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 else
cp .config_modules .config
echo "Automatically creating default configuration ...."
auto_config
fi fi
echo "... configuration finished!"
if [[ $treever != 24* ]] ; then if [[ $treever != 24* ]] ; then
echo "Create symlinks and a few headers for <$lx_cpu> ... " echo "Create symlinks and a few headers for <$lx_cpu> ... "
eval $MAKE include/linux/version.h include/asm eval $MAKE include/linux/version.h include/asm

Loading…
Cancel
Save