aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/ti/am335x/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/ti/am335x/Makefile.inc')
-rw-r--r--src/cpu/ti/am335x/Makefile.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cpu/ti/am335x/Makefile.inc b/src/cpu/ti/am335x/Makefile.inc
index 8c4c663113..c1bbcf6ce7 100644
--- a/src/cpu/ti/am335x/Makefile.inc
+++ b/src/cpu/ti/am335x/Makefile.inc
@@ -10,3 +10,20 @@ ramstage-y += monotonic_timer.c
ramstage-y += nand.c
ramstage-y += timer.c
ramstage-y += uart.c
+
+$(call add-class,omap-header)
+
+real-target: $(obj)/MLO
+
+header_ld = $(src)/cpu/ti/am335x/header.ld
+
+$(obj)/omap-header.bin: $$(omap-header-objs) $$(header_ld)
+ @printf " CC $(subst $(obj)/,,$(@))\n"
+ $(CC) -nostdlib -nostartfiles -static -include $(obj)/config.h -o $@.tmp $< -T $(header_ld)
+ $(OBJCOPY) --only-section=".header" -O binary $@.tmp $@
+
+$(obj)/MLO: $(obj)/coreboot.rom $(obj)/omap-header.bin
+ @printf " HEADER $(subst $(obj)/,,$(@))\n"
+ $(Q)cat $(obj)/omap-header.bin $(obj)/coreboot.rom > $@
+
+omap-header-y += header.c