Re: [PATCH V1 1/3] kbuild: serialize modules and modules_install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 11, 2019 at 11:33 PM Steve Sistare
<steven.sistare@xxxxxxxxxx> wrote:
>
> "make -j 16 modules modules_install" allows both targets to run concurrently
> and produces warnings and incorrect results in the install area.  Force
> them to be run serially, the same way that "install modules_install" is
> already seralized.

Probably you know many projects are
configured, compiled, and installed
in the following 3 steps:

$ ./configure
$ make
$ make install


I have never seen instruction like this:

$ ./configure
$ make -j8 all install


Compile and install are separate steps, one reason is
"make install" is quite often run under the root privilege
in order to copy files to /usr/ or /usr/local/.


Following the same logic, Kbuild does not support
the simultaneous compile & installation.
(Please note the default install location of modules is
/lib/modules/$(uname -r)/, which needs root permission for write.)


For the same reason, we do not support
"make -j8 vmlinux install"
 or
"make -j8 dtbs dtbs_install".




> Signed-off-by: Steve Sistare <steven.sistare@xxxxxxxxxx>
> ---
>  Makefile | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 026fbc4..4988dcc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -291,9 +291,11 @@ ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
>          endif
>  endif
>
> -# install and modules_install need also be processed one by one
> -ifneq ($(filter install,$(MAKECMDGOALS)),)
> -        ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
> +# modules_install and {install or modules} need to be processed one by one
> +ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
> +        ifneq ($(filter install,$(MAKECMDGOALS)),)
> +               mixed-targets := 1
> +        else ifneq ($(filter modules,$(MAKECMDGOALS)),)
>                 mixed-targets := 1
>          endif
>  endif
> --
> 1.8.3.1
>


-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux