path: root/arch/arm/boot/
diff options
authorRobert Richter <>2013-07-17 18:05:06 +0200
committerMichal Marek <>2013-10-02 22:30:35 +0200
commit19514fc665ffbce624785f76ee7ad0ea6378a527 (patch)
tree818f56b1c54b6a3978cffedf4697891a3c787e2c /arch/arm/boot/
parent272b98c6455f00884f0350f775c5342358ebb73f (diff)
arm, kbuild: make "make install" not depend on vmlinux
Install targets (install, zinstall, uinstall) on arm have a dependency to vmlinux. This may cause parts of the kernel to be rebuilt during installation. We must avoid this since this may run as root. Install targets "ABSOLUTELY MUST NOT MODIFY THE SOURCE TREE." as Linus emphasized this in: So on arm and maybe other archs we need the same as for x86: 1648e4f8 x86, kbuild: make "make install" not depend on vmlinux This patch fixes this for arm. Dependencies are removed and instead a check to is added for the files that are needed. This issue was uncovered by this build error where the -j option is used in conjunction with install targets: $ make <makeflags> $ make <makeflags> zinstall ... DEPMOD Usage: .../scripts/ /sbin/depmod <kernelrelease> (INSTALL_MOD_PATH and INSTALL_PATH variables set, so no root perms required in this case.) The problem is that zinstall on arm due to its dependency to vmlinux does a prepare/prepare3 and finally does a forced rewrite of kernel.release even if it exists already. Rebuilding kernel.release removes it first and then recreates it. This might race with another parallel make job running depmod. So this patch should fix this one too. Also quoting $(KERNELRELEASE) arg for as this messes argument order in case it is empty (which is the case if the kernel was not built yet). Signed-off-by: Robert Richter <> Signed-off-by: Robert Richter <> Acked-by: Michal Marek <>. Acked-by: Linus Torvalds <> Signed-off-by: "Yann E. MORIN" <> Signed-off-by: Michal Marek <>
Diffstat (limited to 'arch/arm/boot/')
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/boot/ b/arch/arm/boot/
index 06ea7d42ce8e..2a45092a40e3 100644
--- a/arch/arm/boot/
+++ b/arch/arm/boot/
@@ -20,6 +20,20 @@
# $4 - default install path (blank if root directory)
+verify () {
+ if [ ! -f "$1" ]; then
+ echo "" 1>&2
+ echo " *** Missing file: $1" 1>&2
+ echo ' *** You need to run "make" before "make install".' 1>&2
+ echo "" 1>&2
+ exit 1
+ fi
+# Make sure the files actually exist
+verify "$2"
+verify "$3"
# User may have a custom install script
if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi