Browse Source

Improved linux26/linux-conf.in's auto_config() to make 2 loops over .3,.4,.5

early
Alejandro Mery 17 years ago
parent
commit
c0cded1a92
  1. 56
      base/linux26/linux-conf.in

56
base/linux26/linux-conf.in

@ -57,6 +57,7 @@ var_append makeopt ' ' "ARCH=$lx_cpu CROSS_COMPILE=$archprefix KCC=$KCC"
makeinstopt="$makeopt"
auto_config() {
local x= loop=
# get defconfig (.config.1)
#
if [ -f $base/architecture/$arch/kernel$treever.conf.sh ] ; then
@ -90,33 +91,38 @@ auto_config() {
echo "Enabling all modules ..."
yes '' | eval $MAKE $makeopt no2modconfig > /dev/null ; cp .config{,.2}
# call scripts to tweak the config file
# for "safety" we will apply the config twice, so hidden options have time
# to appear
#
for x in $lx_confscripts ; do
echo " running: $x"
sh $x .config
for loop in 1 2; do
# call scripts to tweak the config file
#
for x in $lx_confscripts ; do
echo " running: $x"
sh $x .config
done
cp .config{,.3.$loop}
# merge various text/plain config files
#
for x in $lx_confmerge; do
if [ -f $x ] ; then
echo " merging: '$x'"
tag="$(sed '/CONFIG_/ ! d; s,.*CONFIG_\([^ =]*\).*,\1,' \
$x | tr '\n' '|')"
egrep -v "\bCONFIG_($tag)\b" < .config > .config.4.$loop
sed 's,\(CONFIG_.*\)=n,# \1 is not set,' \
$x >> .config.4.$loop
cp .config{.4.$loop,}
else
echo_warning "Can't find '${x#$base/}' for merging."
fi
done
# create a valid .config
#
yes '' | eval $MAKE $makeopt oldconfig > /dev/null ; cp .config{,.5.$loop}
done
cp .config{,.3}
# merge various text/plain config files
#
for x in $lx_confmerge; do
if [ -f $x ] ; then
echo " merging: '$x'"
tag="$(sed '/CONFIG_/ ! d; s,.*CONFIG_\([^ =]*\).*,\1,' \
$x | tr '\n' '|')"
egrep -v "\bCONFIG_($tag)\b" < .config > .config.4
sed 's,\(CONFIG_.*\)=n,# \1 is not set,' \
$x >> .config.4
cp .config{.4,}
else
echo_warning "Can't find '${x#$base/}' for merging."
fi
done
# create a valid .config
#
yes '' | eval $MAKE $makeopt oldconfig > /dev/null ; cp .config{,.5}
# last disable broken stuff
#

Loading…
Cancel
Save