diff options
author | Sam Lewis <sam.vr.lewis@gmail.com> | 2020-08-03 20:18:29 +1000 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-08-19 07:17:37 +0000 |
commit | ad7b2e23ab5954f150a4b2f62378f1e7133e56c9 (patch) | |
tree | 545ce0a7cbf0eb2aa034a45d136ac0998339741f /src/soc/ti/am335x/Makefile.inc | |
parent | cb287987a1750577e4471d3a474391a2c25321ab (diff) |
cpu/ti/am335x: Move from cpu to soc in tree
The AM335X is a SoC, so should be in the soc tree.
This moves all the existing am335x code to soc/ and updates any
references. It also adds a soc.c file as required for the ramstage.
Change-Id: Ic1ccb0e9b9c24a8b211b723b5f4cc26cdd0eaaab
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44378
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/soc/ti/am335x/Makefile.inc')
-rw-r--r-- | src/soc/ti/am335x/Makefile.inc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/soc/ti/am335x/Makefile.inc b/src/soc/ti/am335x/Makefile.inc new file mode 100644 index 0000000000..2865338217 --- /dev/null +++ b/src/soc/ti/am335x/Makefile.inc @@ -0,0 +1,56 @@ +ifeq ($(CONFIG_SOC_TI_AM335X),y) +bootblock-y += bootblock.c +bootblock-y += bootblock_media.c +bootblock-y += dmtimer.c +bootblock-y += gpio.c +bootblock-y += pinmux.c +bootblock-y += monotonic_timer.c + +romstage-y += nand.c +romstage-y += cbmem.c +romstage-y += dmtimer.c +romstage-y += monotonic_timer.c + +ramstage-y += dmtimer.c +ramstage-y += monotonic_timer.c +ramstage-y += nand.c +ramstage-y += soc.c + +bootblock-y += uart.c +romstage-y += uart.c +ramstage-y += uart.c + +$(call add-class,omap-header) +$(eval $(call create_class_compiler,omap-header,arm)) + +omap-header-generic-ccopts += -D__COREBOOT_ARM_ARCH__=7 + +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))))) + +$(obj)/omap-header.bin: $$(omap-header-objs) $(obj)/coreboot.rom + @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 \ + ) \ + ) \ + -o $@.tmp $< -T $(header_ld) + $(OBJCOPY_omap-header) --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 + +omap-header-srcs += $(CONFIG_MEMLAYOUT_LD_FILE) +omap-header-y += header.ld +endif |