Fix the kerncache parsing of CONFIG_LOCALVERSION

A couple of problems here.

1. CONFIG_LOCALVERSION was never added the kerncache.config.
2. Parsing of CONFIG_LOCALVERSION expects kernel .config style syntax.
   For this point I opted for the extra space, to make the
   kerncache.config syntax consistent. There is no good reason to even
   keep the CONFIG_LOCALVERSION name.
master
Georgi Georgiev 12 years ago committed by Georgi Georgiev
parent a7d7711cb5
commit 037070b547

@ -12,7 +12,7 @@ get_KV() {
PAT=`grep ^PATCHLEVEL\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'`
SUB=`grep ^SUBLEVEL\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'`
EXV=`grep ^EXTRAVERSION\ \= ${TEMP}/kerncache.config | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
LOV=`grep ^CONFIG_LOCALVERSION\= ${TEMP}/kerncache.config | sed -e "s/CONFIG_LOCALVERSION=\"\(.*\)\"/\1/"`
LOV=`grep ^CONFIG_LOCALVERSION\ \= ${TEMP}/kerncache.config | sed -e "s/CONFIG_LOCALVERSION =//" -e "s/ //g"`
KV=${VER}.${PAT}.${SUB}${EXV}${LOV}
else
gen_die "Could not find kerncache.config in the kernel cache! Exiting."

@ -95,6 +95,7 @@ gen_kerncache()
echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config"
echo "SUBLEVEL = ${SUB}" >> "${TEMP}/kerncache/kerncache.config"
echo "EXTRAVERSION = ${EXV}" >> "${TEMP}/kerncache/kerncache.config"
echo "CONFIG_LOCALVERSION = ${LOV}" >> "${TEMP}/kerncache/kerncache.config"
mkdir -p "${TEMP}/kerncache/lib/modules/"

Loading…
Cancel
Save