summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2010-06-20 13:00:18 (GMT)
committer Jaromil <jaromil@dyne.org>2010-06-20 13:00:18 (GMT)
commit63997661bc6cd10525a4a6d3a865db67db3bbda9 (patch)
treee21afa559c2c86d9e2e8b7a2d824b8067b6ebaa4
parente7cdaac2af43d4e034a94298d96c75d05eab6578 (diff)
sdk mkkern now retrieves the kernel version from makefile
-rwxr-xr-xdyneII/devel/dynesdk18
1 files changed, 17 insertions, 1 deletions
diff --git a/dyneII/devel/dynesdk b/dyneII/devel/dynesdk
index 8b7a9e6..d56b4c9 100755
--- a/dyneII/devel/dynesdk
+++ b/dyneII/devel/dynesdk
@@ -828,6 +828,23 @@ mkusr() {
}
mkkern() {
+ # check we are in the kernel source
+ if ! [ -r Makefile ]; then
+ error "run this command from the top directory of the Linux kernel source"
+ exit 1;
+ fi
+
+ # retrieve the version of the kernel source we are in
+ # it is stored in the Makefile..
+
+ KRN=`cat Makefile | awk'
+ BEGIN { krn="" }
+ /^VERSION/ { krn = krn $3 }
+ /^PATCHLEVEL/ { krn = krn $3 }
+ /^SUBLEVEL/ { krn = krn $3 }
+ /^EXTRAVERSION/ { krn = krn $3 }
+ END { print krn }'`-dyne
+
notice "packing the kernel version $KRN"
# compose the kernel file name removing all . or -
@@ -885,7 +902,6 @@ mkkern() {
fi
# now the modules, if they are not squashed
-
modpack="$PFX/cdrom/dyne/linux-${KRN}.kmods"
krnverabbr="`echo $krnfile | cut -d. -f1`"