Skip to content

Commit 8b249b6

Browse files
committed
fix modules_install via NFS
Rafael reported: I get the following error from 'make modules_install' on my test boxes: HOSTCC firmware/ihex2fw /home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system compilation terminated. make[3]: *** [firmware/ihex2fw] Error 1 make[2]: *** [_modinst_post] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 where the configuration is that the kernel is compiled on a build box with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by each test box (full path to this directory is the same on the build box and on the test boxes). Then, I cd into <destdir>, run 'make modules_install' and get the error above. The issue turns out to be that we when we install firmware pick up the list of firmware blobs from firmware/Makefile. And this triggers the Makefile rules to update ihex2fw. There were two solutions for this issue: 1) Move the list of firmware blobs to a separate file 2) Avoid ihex2fw rebuild by moving it to scripts As I seriously beleive that the list of firmware blobs should be done in a fundamental different way solution 2) was selected. Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org>
1 parent 8d1a0a1 commit 8b249b6

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

firmware/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
*.bin
44
*.csp
55
*.dsp
6-
ihex2fw

firmware/Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ quiet_cmd_ihex = IHEX $@
9999
cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@
100100

101101
quiet_cmd_ihex2fw = IHEX2FW $@
102-
cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@
102+
cmd_ihex2fw = $(objtree)/scripts/ihex2fw $< $@
103103

104104
quiet_cmd_h16tofw = H16TOFW $@
105-
cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@
105+
cmd_h16tofw = $(objtree)/scripts/ihex2fw -w $< $@
106106

107107
quiet_cmd_fwbin = MK_FW $@
108108
cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
@@ -165,11 +165,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
165165
# is actually meaningful, because the firmware has to be loaded in a certain
166166
# order rather than as a single binary blob. Thus, we convert them into our
167167
# more compact binary representation of ihex records (<linux/ihex.h>)
168-
$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
168+
$(obj)/%.fw: $(obj)/%.HEX | $(objtree)/$(obj)/$$(dir %)
169169
$(call cmd,ihex2fw)
170170

171171
# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
172-
$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
172+
$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
173173
$(call cmd,h16tofw)
174174

175175
$(firmware-dirs):
@@ -186,5 +186,3 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
186186
# Without this, built-in.o won't be created when it's empty, and the
187187
# final vmlinux link will fail.
188188
obj-n := dummy
189-
190-
hostprogs-y := ihex2fw

scripts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
22
# Generated files
33
#
4+
ihex2fw
45
conmakehash
56
kallsyms
67
pnmtologo

scripts/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# scripts contains sources for various helper programs used throughout
33
# the kernel for the build process.
44
# ---------------------------------------------------------------------------
5+
# ihex2fw: Parser/loader for IHEX formatted data
56
# kallsyms: Find all symbols in vmlinux
67
# pnmttologo: Convert pnm files to logo files
7-
# conmakehash: Create chartable
88
# conmakehash: Create arrays for initializing the kernel console tables
99

10+
hostprogs-y := ihex2fw
1011
hostprogs-$(CONFIG_KALLSYMS) += kallsyms
1112
hostprogs-$(CONFIG_LOGO) += pnmtologo
1213
hostprogs-$(CONFIG_VT) += conmakehash
File renamed without changes.

0 commit comments

Comments
 (0)