From 59890f74e51abffd0dd017785d89f8a8475d489d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 26 Jun 2008 13:55:30 +0100 Subject: ihex: Add support for long records to ihex2fw.c Some drivers could do with using records like Intel HEX, but with each record being larger than 256 bytes. This has been possible in the binary representation (struct ihex_binrec) in the kernel since the beginning -- at least of the the current version of history. But we haven't been able to represent that in the .HEX files which get converted to .fw files. This adds a '-w' option to ihex2fw to make it interpret the first _two_ bytes of each line as the record length, instead of only one byte. And adds makefile rules for %.H16->%.fw which use that. Signed-off-by: David Woodhouse --- firmware/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/Makefile') diff --git a/firmware/Makefile b/firmware/Makefile index 9e780a331e10..40881a96be00 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -35,6 +35,9 @@ quiet_cmd_ihex = IHEX $@ quiet_cmd_ihex2fw = IHEX2FW $@ cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@ +quiet_cmd_h16tofw = H16TOFW $@ + cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@ + quiet_cmd_fwbin = MK_FW $@ cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \ FWSTR="$(subst /,_,$(subst .,_,$(subst -,_,$(patsubst \ @@ -99,6 +102,10 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %) $(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) $(call cmd,ihex2fw) +# .H16 is our own modified form of Intel HEX, with 16-bit length for records. +$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) + $(call cmd,h16tofw) + $(firmware-dirs): $(call cmd,mkdir) -- cgit v1.2.3