[PATCH] arm, kbuild: make "make install" not depend on vmlinux

From: Robert Richter
Date: Wed Jul 17 2013 - 12:05:21 EST


(trimmed cc list)

On 12.07.13 11:57:21, Robert Richter wrote:
> On 11.07.13 10:16:18, Linus Torvalds wrote:
> > On Thu, Jul 11, 2013 at 6:54 AM, Michal Marek <mmarek@xxxxxxx> wrote:
> > >
> > > Yeah. It also reveals another bug that we rewrite the kernel.release
> > > file each time.
>
> The odd thing I have in a specific configuration is that depmod is
> missing the kernelrelease when I only build install rules, though I
> had built everything before and kernelrelease should be there:
>
> $ make <makeflags>
> $ make <makeflags> modules_install zinstall
> ...
> DEPMOD
> Usage: .../scripts/depmod.sh /sbin/depmod <kernelrelease>
>
> Note that makeflags include the -j option, INSTALL_MOD_PATH and
> INSTALL_PATH variables set, so no root perms required in this case.

I narrowed this down. The problem is that zinstall on ARCH=arm has a
dependency to vmlinux which does a prepare/prepare3 and finally does a
forced rebuild of kernel.release even if it exists already.

Rebuilding it removes kernel.release first and then recreates it. This
might race with another parallel make job running depmod.

So on arm and maybe other archs we need the same as for x86:

1648e4f8 x86, kbuild: make "make install" not depend on vmlinux

The patch below fixes this for arm. It is build-tested in my
environment, but please test it in others too if possible.

Thanks,

-Robert