Bug 39192 - [PATCH]firmware_install fails with parallel make
Summary: [PATCH]firmware_install fails with parallel make
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks: 36912
  Show dependency tree
 
Reported: 2011-07-12 09:35 UTC by Ambroz Bizjak
Modified: 2018-06-27 20:22 UTC (History)
9 users (show)

See Also:
Kernel Version: 3.3
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Ambroz Bizjak 2011-07-12 09:35:45 UTC
make firmware_install (also modules_install) fails with parallel make when the firmware dir doesn't exist. Appears to be a regression from 3.0-rc6.

linux-3.0-rc7 # mkdir /tmp/install
linux-3.0-rc7 # make O=/var/tmp/paludis/sys-kernel-linux-3.0_rc7/work/build INSTALL_MOD_PATH=/tmp/install firmware_install -j9
  MKDIR   /tmp/install/lib/firmware/keyspan/
make[2]: *** No rule to make target `/tmp/install/lib/firmware/./', needed by `/tmp/install/lib/firmware/atmsar11.fw'.  Stop.
make[2]: *** Waiting for unfinished jobs....
  MKDIR   /tmp/install/lib/firmware/acenic/
  MKDIR   /tmp/install/lib/firmware/adaptec/
make[1]: *** [firmware_install] Error 2
make: *** [sub-make] Error 2
Comment 1 Florian Mickler 2012-01-25 19:47:12 UTC
Is this still a problem in 3.2 or 3.3-rc1?
Comment 2 Devin J. Pohly 2012-01-25 20:43:38 UTC
Yes, it still happens it with 3.3-rc1 (checked out from git) and make 3.82:

$ make -j8 INSTALL_MOD_PATH=../modtest firmware_install
make[1]: *** No rule to make target `../modtest/lib/firmware/./', needed by `../modtest/lib/firmware/atmsar11.fw'.  Stop.
make[1]: *** Waiting for unfinished jobs....
  MKDIR   ../modtest/lib/firmware/keyspan/
  MKDIR   ../modtest/lib/firmware/acenic/
  MKDIR   ../modtest/lib/firmware/adaptec/
make: *** [firmware_install] Error 2

Changing the following at scripts/Makefile.fwinst:30 seems to make it work:
-installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/.
+installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./

... though I have to wonder if this is a make bug, or something that could be dealt with more cleanly.
Comment 3 Gabriel M Beddingfield 2014-09-06 19:03:49 UTC
Looks like this was fixed by:

commit 5180d5f483486859c0a822c9020ec459f4504b59
Author: Michal Marek <mmarek@suse.cz>
Date:   Tue Apr 29 11:54:47 2014 +0200

    firmware: Simplify directory creation
    
    When building the firmware blobs, use a simple loop to create
    directories in $(objtree), like in Makefile.build. This simplifies the
    rules and also makes it possible to set $(objtree) to '.' later. Before
    this change, a dependency on $(objtree)/<dir> would be satisfied by
    <dir> in $(srctree).
    
    When installing the firmware blobs, call mkdir like in Makefile.modinst.
    
    Cc: David Woodhouse <dwmw2@infradead.org>
    Acked-by: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: Michal Marek <mmarek@suse.cz>

Which first appears in 3.15 (>=3.15-rc2).
Comment 4 Michal Marek 2014-09-08 11:55:09 UTC
I think this had been fixed even earlier.
Comment 5 Michal Marek 2014-09-08 12:03:36 UTC
I can't close this :-(
Comment 6 Randy Dunlap 2018-03-10 20:27:24 UTC
Closed for Michal.

Note You need to log in before you can comment on or make changes to this bug.