summaryrefslogtreecommitdiff
path: root/src/soc/ti/am335x/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/ti/am335x/Makefile.inc')
-rw-r--r--src/soc/ti/am335x/Makefile.inc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/soc/ti/am335x/Makefile.inc b/src/soc/ti/am335x/Makefile.inc
index 2865338217..e744c72526 100644
--- a/src/soc/ti/am335x/Makefile.inc
+++ b/src/soc/ti/am335x/Makefile.inc
@@ -30,17 +30,13 @@ real-target: $(obj)/MLO
header_ld := $(call src-to-obj,omap-header,$(dir)/header.ld)
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)))))
+ $(shell echo $$(wc -c < $(objcbfs)/bootblock.bin))
-$(obj)/omap-header.bin: $$(omap-header-objs) $(obj)/coreboot.rom
+$(obj)/omap-header.bin: $$(omap-header-objs) $(objcbfs)/bootblock.bin
@printf " CC $(subst $(obj)/,,$(@))\n"
$(CC_omap-header) -nostdlib -nostartfiles -static -include $(obj)/config.h \
-Wl,--defsym,header_load_size=$(strip \
- $(call get_header_size,$(obj)/coreboot.rom, \
- $(CONFIG_CBFS_PREFIX)/romstage \
- ) \
+ $(call get_header_size,$(obj)/coreboot.rom) \
) \
-o $@.tmp $< -T $(header_ld)
$(OBJCOPY_omap-header) --only-section=".header" -O binary $@.tmp $@