aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile16
1 files changed, 2 insertions, 14 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 4993a4b3d8ab..6968388818be 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -150,27 +150,15 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/%
150$(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) 150$(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
151 $(call cmd,ihex) 151 $(call cmd,ihex)
152 152
153# Don't depend on ihex2fw if we're installing and it already exists.
154# Putting it after | in the dependencies doesn't seem sufficient when
155# we're installing after a cross-compile, because ihex2fw has dependencies
156# on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and
157# thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree
158# is exported read-only for someone to run 'make install'.
159ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw)
160ihex2fw_dep :=
161else
162ihex2fw_dep := $(obj)/ihex2fw
163endif
164
165# .HEX is also Intel HEX, but where the offset and length in each record 153# .HEX is also Intel HEX, but where the offset and length in each record
166# is actually meaningful, because the firmware has to be loaded in a certain 154# is actually meaningful, because the firmware has to be loaded in a certain
167# order rather than as a single binary blob. Thus, we convert them into our 155# order rather than as a single binary blob. Thus, we convert them into our
168# more compact binary representation of ihex records (<linux/ihex.h>) 156# more compact binary representation of ihex records (<linux/ihex.h>)
169$(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) 157$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
170 $(call cmd,ihex2fw) 158 $(call cmd,ihex2fw)
171 159
172# .H16 is our own modified form of Intel HEX, with 16-bit length for records. 160# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
173$(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %) 161$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
174 $(call cmd,h16tofw) 162 $(call cmd,h16tofw)
175 163
176$(firmware-dirs): 164$(firmware-dirs):