aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2009-01-07 14:52:43 -0500
committerSam Ravnborg <sam@ravnborg.org>2009-01-07 15:44:20 -0500
commit8b249b6856f16f09b0e5b79ce5f4d435e439b9d6 (patch)
treed7915dd672c03ff04faef8fc50b741cef01f1a86 /firmware/Makefile
parent8d1a0a13edecfdcb47fee3238ed4a2af2a2867f9 (diff)
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>
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index d872b7942a30..55d3082ea13e 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -99,10 +99,10 @@ quiet_cmd_ihex = IHEX $@
99 cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@ 99 cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@
100 100
101quiet_cmd_ihex2fw = IHEX2FW $@ 101quiet_cmd_ihex2fw = IHEX2FW $@
102 cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@ 102 cmd_ihex2fw = $(objtree)/scripts/ihex2fw $< $@
103 103
104quiet_cmd_h16tofw = H16TOFW $@ 104quiet_cmd_h16tofw = H16TOFW $@
105 cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@ 105 cmd_h16tofw = $(objtree)/scripts/ihex2fw -w $< $@
106 106
107quiet_cmd_fwbin = MK_FW $@ 107quiet_cmd_fwbin = MK_FW $@
108 cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \ 108 cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
@@ -165,11 +165,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
165# is actually meaningful, because the firmware has to be loaded in a certain 165# is actually meaningful, because the firmware has to be loaded in a certain
166# order rather than as a single binary blob. Thus, we convert them into our 166# order rather than as a single binary blob. Thus, we convert them into our
167# more compact binary representation of ihex records (<linux/ihex.h>) 167# 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 %)
169 $(call cmd,ihex2fw) 169 $(call cmd,ihex2fw)
170 170
171# .H16 is our own modified form of Intel HEX, with 16-bit length for records. 171# .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 %)
173 $(call cmd,h16tofw) 173 $(call cmd,h16tofw)
174 174
175$(firmware-dirs): 175$(firmware-dirs):
@@ -186,5 +186,3 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
186# Without this, built-in.o won't be created when it's empty, and the 186# Without this, built-in.o won't be created when it's empty, and the
187# final vmlinux link will fail. 187# final vmlinux link will fail.
188obj-n := dummy 188obj-n := dummy
189
190hostprogs-y := ihex2fw