diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/Makefile | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 0e432843db74..d872b7942a30 100644 --- a/firmware/Makefile +++ b/firmware/Makefile | |||
@@ -161,27 +161,15 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/% | |||
161 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) | 161 | $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) |
162 | $(call cmd,ihex) | 162 | $(call cmd,ihex) |
163 | 163 | ||
164 | # Don't depend on ihex2fw if we're installing and it already exists. | ||
165 | # Putting it after | in the dependencies doesn't seem sufficient when | ||
166 | # we're installing after a cross-compile, because ihex2fw has dependencies | ||
167 | # on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and | ||
168 | # thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree | ||
169 | # is exported read-only for someone to run 'make install'. | ||
170 | ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw) | ||
171 | ihex2fw_dep := | ||
172 | else | ||
173 | ihex2fw_dep := $(obj)/ihex2fw | ||
174 | endif | ||
175 | |||
176 | # .HEX is also Intel HEX, but where the offset and length in each record | 164 | # .HEX is also Intel HEX, but where the offset and length in each record |
177 | # 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 |
178 | # 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 |
179 | # more compact binary representation of ihex records (<linux/ihex.h>) | 167 | # more compact binary representation of ihex records (<linux/ihex.h>) |
180 | $(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) | 168 | $(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) |
181 | $(call cmd,ihex2fw) | 169 | $(call cmd,ihex2fw) |
182 | 170 | ||
183 | # .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. |
184 | $(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) | 172 | $(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) |
185 | $(call cmd,h16tofw) | 173 | $(call cmd,h16tofw) |
186 | 174 | ||
187 | $(firmware-dirs): | 175 | $(firmware-dirs): |