am335x: Revert how the header load size is calculated to an earlier method.

The current method will treat hex values as 0 and would calculate the wrong
size. This change switches back to an earlier method which used shell syntax
to add the offset and size.

Change-Id: I9fb2d9b323f113cc56a5ad2e38b47d2d22084f08
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: http://review.coreboot.org/3432
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Gabe Black 2013-06-10 20:49:15 -04:00 committed by Ronald G. Minnich
parent 73b7632ad4
commit 6e5c86ff7d
1 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,10 @@ real-target: $(obj)/MLO
header_ld = $(src)/cpu/ti/am335x/header.ld header_ld = $(src)/cpu/ti/am335x/header.ld
get_header_size=$(shell $(CBFSTOOL) $(1) print | grep $(2) | awk '{print $$2 + $$4}') get_header_size= \
$(eval omap_header_info=$(shell $(CBFSTOOL) $(1) print | grep $(2))) \
$(shell echo $$(($(word 2,$(omap_header_info)) + \
$(word 4,$(omap_header_info)))))
$(obj)/omap-header.bin: $$(omap-header-objs) $$(header_ld) $(obj)/coreboot.rom $(obj)/omap-header.bin: $$(omap-header-objs) $$(header_ld) $(obj)/coreboot.rom
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"