summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2018-07-01 19:46:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-17 21:01:10 +0200
commit50123ab8c47d6e747ca333b19ac11e2b86e8dc2a (patch)
treec46286dfee1a6751c1e7bb3d47bb6dbb234b3b1a /scripts
parent3d0170b8af8dd66f67989e71469cb905b2a20bdd (diff)
kbuild: verify that $DEPMOD is installed
commit 934193a654c1f4d0643ddbf4b2529b508cae926e upstream. Verify that 'depmod' ($DEPMOD) is installed. This is a partial revert of commit 620c231c7a7f ("kbuild: do not check for ancient modutils tools"). Also update Documentation/process/changes.rst to refer to kmod instead of module-init-tools. Fixes kernel bugzilla #198965: https://bugzilla.kernel.org/show_bug.cgi?id=198965 Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Lucas De Marchi <lucas.de.marchi@gmail.com> Cc: Michal Marek <michal.lkml@markovi.net> Cc: Jessica Yu <jeyu@kernel.org> Cc: Chih-Wei Huang <cwhuang@linux.org.tw> Cc: stable@vger.kernel.org # any kernel since 2012 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/depmod.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/depmod.sh b/scripts/depmod.sh
index 9831cca31240..f41b0a4b575c 100755
--- a/scripts/depmod.sh
+++ b/scripts/depmod.sh
@@ -11,10 +11,16 @@ DEPMOD=$1
KERNELRELEASE=$2
SYMBOL_PREFIX=$3
-if ! test -r System.map -a -x "$DEPMOD"; then
+if ! test -r System.map ; then
exit 0
fi
+if [ -z $(command -v $DEPMOD) ]; then
+ echo "'make modules_install' requires $DEPMOD. Please install it." >&2
+ echo "This is probably in the kmod package." >&2
+ exit 1
+fi
+
# older versions of depmod don't support -P <symbol-prefix>
# support was added in module-init-tools 3.13
if test -n "$SYMBOL_PREFIX"; then