From 037070b547c5e0de162600b3733232760c36c005 Mon Sep 17 00:00:00 2001 From: Georgi Georgiev Date: Fri, 25 Jan 2013 02:46:06 +0900 Subject: [PATCH] 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. --- gen_determineargs.sh | 2 +- gen_package.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index aa885c0..dea0d0f 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -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." diff --git a/gen_package.sh b/gen_package.sh index 9f88278..fc77f9c 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -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/"