Alexander Couzens | 8c53b75 | 2014-10-24 23:52:56 +0200 | [diff] [blame] | 1 | bootblock-y += bootblock.c |
Gabe Black | 630e4e8 | 2013-07-01 05:38:45 -0700 | [diff] [blame] | 2 | bootblock-y += bootblock_media.c |
Alexander Couzens | 8c53b75 | 2014-10-24 23:52:56 +0200 | [diff] [blame] | 3 | bootblock-y += dmtimer.c |
Gabe Black | 5acc76c | 2013-06-17 01:17:55 -0700 | [diff] [blame] | 4 | bootblock-y += pinmux.c |
Gabe Black | 3c7e939 | 2013-05-26 07:15:57 -0700 | [diff] [blame] | 5 | |
| 6 | romstage-y += nand.c |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 7 | romstage-y += cbmem.c |
Gabe Black | 3c7e939 | 2013-05-26 07:15:57 -0700 | [diff] [blame] | 8 | |
| 9 | ramstage-y += dmtimer.c |
| 10 | ramstage-y += monotonic_timer.c |
| 11 | ramstage-y += nand.c |
Kyösti Mälkki | a38d1b2 | 2014-11-10 15:08:47 +0200 | [diff] [blame] | 12 | ramstage-y += cbmem.c |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 13 | |
| 14 | ifeq ($(CONFIG_DRIVERS_UART),y) |
| 15 | bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c |
| 16 | romstage-y += uart.c |
Gabe Black | 3c7e939 | 2013-05-26 07:15:57 -0700 | [diff] [blame] | 17 | ramstage-y += uart.c |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 18 | endif |
Gabe Black | ddbfc64 | 2013-05-29 16:42:35 +0200 | [diff] [blame] | 19 | |
| 20 | $(call add-class,omap-header) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 21 | $(eval $(call create_class_compiler,omap-header,arm)) |
Gabe Black | ddbfc64 | 2013-05-29 16:42:35 +0200 | [diff] [blame] | 22 | |
| 23 | real-target: $(obj)/MLO |
| 24 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 25 | header_ld = $(obj)/cpu/ti/am335x/header.omap-header.ld |
Gabe Black | ddbfc64 | 2013-05-29 16:42:35 +0200 | [diff] [blame] | 26 | |
Gabe Black | 6e5c86f | 2013-06-10 20:49:15 -0400 | [diff] [blame] | 27 | get_header_size= \ |
| 28 | $(eval omap_header_info=$(shell $(CBFSTOOL) $(1) print | grep $(2))) \ |
| 29 | $(shell echo $$(($(word 2,$(omap_header_info)) + \ |
| 30 | $(word 4,$(omap_header_info))))) |
Gabe Black | 1ef5ff2 | 2013-06-10 02:07:17 -0400 | [diff] [blame] | 31 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 32 | $(obj)/omap-header.bin: $$(omap-header-objs) $(obj)/coreboot.rom |
Gabe Black | ddbfc64 | 2013-05-29 16:42:35 +0200 | [diff] [blame] | 33 | @printf " CC $(subst $(obj)/,,$(@))\n" |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 34 | $(CC_omap-header) -nostdlib -nostartfiles -static -include $(obj)/config.h \ |
Gabe Black | 1ef5ff2 | 2013-06-10 02:07:17 -0400 | [diff] [blame] | 35 | -Wl,--defsym,header_load_size=$(strip \ |
| 36 | $(call get_header_size,$(obj)/coreboot.rom, \ |
| 37 | $(CONFIG_CBFS_PREFIX)/romstage \ |
| 38 | ) \ |
| 39 | ) \ |
| 40 | -o $@.tmp $< -T $(header_ld) |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 41 | $(OBJCOPY_omap-header) --only-section=".header" -O binary $@.tmp $@ |
Gabe Black | ddbfc64 | 2013-05-29 16:42:35 +0200 | [diff] [blame] | 42 | |
| 43 | $(obj)/MLO: $(obj)/coreboot.rom $(obj)/omap-header.bin |
| 44 | @printf " HEADER $(subst $(obj)/,,$(@))\n" |
| 45 | $(Q)cat $(obj)/omap-header.bin $(obj)/coreboot.rom > $@ |
| 46 | |
| 47 | omap-header-y += header.c |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 48 | |
| 49 | bootblock-y += memlayout.ld |
| 50 | romstage-y += memlayout.ld |
| 51 | ramstage-y += memlayout.ld |
| 52 | omap-header-y += memlayout.ld |
| 53 | omap-header-y += header.ld |