From 1547e93d715e8d5e27061f9c89effd19e9578882 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 5 Jan 2010 03:23:52 +0100 Subject: [PATCH] kernel: scripts/localversion: Check if the git repo is actually a kernel repo This fixes the module loading problem. --- ...pts-localversion-check-git-repo-path.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 target/linux/generic-2.6/patches-2.6.31/997-scripts-localversion-check-git-repo-path.patch diff --git a/target/linux/generic-2.6/patches-2.6.31/997-scripts-localversion-check-git-repo-path.patch b/target/linux/generic-2.6/patches-2.6.31/997-scripts-localversion-check-git-repo-path.patch new file mode 100644 index 000000000..d7143f130 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.31/997-scripts-localversion-check-git-repo-path.patch @@ -0,0 +1,20 @@ +diff --git a/scripts/setlocalversion b/scripts/setlocalversion +index 46989b8..887960f 100755 +--- a/scripts/setlocalversion ++++ b/scripts/setlocalversion +@@ -18,6 +18,7 @@ cd "${1:-.}" || usage + + # Check for git and a git repo. + if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then ++if [ `git rev-parse --git-dir` = ".git" ]; then + + # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it, + # because this version is defined in the top level Makefile. +@@ -51,6 +52,7 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + # All done with git + exit + fi ++fi + + # Check for mercurial and a mercurial repo. + if hgid=`hg id 2>/dev/null`; then