Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 1 | # |
| 2 | # This file is part of the coreboot project. |
| 3 | # |
| 4 | # Copyright (C) 2014 Imagination Technologies |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU General Public License as |
| 8 | # published by the Free Software Foundation; version 2 of |
| 9 | # the License. |
| 10 | # |
| 11 | # This program is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | # You should have received a copy of the GNU General Public License |
| 17 | # along with this program; if not, write to the Free Software |
Patrick Georgi | b890a12 | 2015-03-26 15:17:45 +0100 | [diff] [blame] | 18 | # Foundation, Inc. |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 19 | # |
| 20 | |
| 21 | ############################################################################### |
| 22 | # MIPS specific options |
| 23 | ############################################################################### |
| 24 | |
| 25 | ifeq ($(CONFIG_ARCH_ROMSTAGE_MIPS),y) |
Julius Werner | efcee76 | 2014-11-10 13:14:24 -0800 | [diff] [blame] | 26 | CBFSTOOL_PRE1_OPTS = -m mips -s $(CONFIG_CBFS_SIZE) |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 27 | endif |
| 28 | |
| 29 | ############################################################################### |
| 30 | # bootblock |
| 31 | ############################################################################### |
| 32 | |
| 33 | ifeq ($(CONFIG_ARCH_BOOTBLOCK_MIPS),y) |
| 34 | |
| 35 | bootblock-y += boot.c |
Patrick Georgi | 6b65f0d | 2015-03-30 13:40:29 +0200 | [diff] [blame] | 36 | bootblock-y += bootblock.S |
| 37 | bootblock-y += bootblock_simple.c |
Ionela Voinescu | 8fa8f4b | 2014-12-01 18:31:48 +0000 | [diff] [blame] | 38 | bootblock-y += cache.c |
Andrew Bresticker | 3537e95 | 2015-02-05 13:31:41 -0800 | [diff] [blame] | 39 | bootblock-y += mmu.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 40 | bootblock-y += stages.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 41 | bootblock-y += ../../lib/memcpy.c |
| 42 | bootblock-y += ../../lib/memmove.c |
| 43 | bootblock-y += ../../lib/memset.c |
| 44 | |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 45 | # Much of the assembly code is generated by the compiler, and may contain |
| 46 | # terms which the preprocessor will happily go on to replace. For example |
| 47 | # "mips" would be replaced with "1". Clear all the built in definitions to |
| 48 | # prevent that. |
| 49 | bootblock-S-ccopts += -undef |
| 50 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 51 | $(objcbfs)/bootblock.debug: $$(bootblock-objs) $(obj)/config.h |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 52 | @printf " LINK $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | eec8dfb | 2015-05-07 22:24:41 +0200 | [diff] [blame] | 53 | $(LD_bootblock) --gc-sections -static -o $@ -L$(obj) -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.bootblock.ld --whole-archive --start-group $(filter-out %.ld,$(bootblock-objs)) --end-group |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 54 | |
| 55 | endif # CONFIG_ARCH_BOOTBLOCK_MIPS |
| 56 | |
| 57 | ############################################################################### |
| 58 | # romstage |
| 59 | ############################################################################### |
| 60 | |
| 61 | ifeq ($(CONFIG_ARCH_ROMSTAGE_MIPS),y) |
| 62 | |
| 63 | romstage-y += boot.c |
Ionela Voinescu | 8fa8f4b | 2014-12-01 18:31:48 +0000 | [diff] [blame] | 64 | romstage-y += cache.c |
Andrew Bresticker | 3537e95 | 2015-02-05 13:31:41 -0800 | [diff] [blame] | 65 | romstage-y += mmu.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 66 | romstage-y += stages.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 67 | romstage-y += ../../lib/memcpy.c |
| 68 | romstage-y += ../../lib/memmove.c |
| 69 | romstage-y += ../../lib/memset.c |
| 70 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 71 | $(objcbfs)/romstage.debug: $$(romstage-objs) |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 72 | @printf " LINK $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | eec8dfb | 2015-05-07 22:24:41 +0200 | [diff] [blame] | 73 | $(LD_romstage) --gc-sections -static -o $@ -L$(obj) -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.romstage.ld --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 74 | |
| 75 | endif # CONFIG_ARCH_ROMSTAGE_MIPS |
| 76 | |
| 77 | ############################################################################### |
| 78 | # ramstage |
| 79 | ############################################################################### |
| 80 | |
| 81 | ifeq ($(CONFIG_ARCH_RAMSTAGE_MIPS),y) |
| 82 | |
| 83 | ramstage-y += ashldi3.c |
| 84 | ramstage-y += boot.c |
Ionela Voinescu | 8fa8f4b | 2014-12-01 18:31:48 +0000 | [diff] [blame] | 85 | ramstage-y += cache.c |
Andrew Bresticker | 3537e95 | 2015-02-05 13:31:41 -0800 | [diff] [blame] | 86 | ramstage-y += mmu.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 87 | ramstage-y += stages.c |
| 88 | ramstage-y += tables.c |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 89 | ramstage-y += ../../lib/memcpy.c |
| 90 | ramstage-y += ../../lib/memmove.c |
| 91 | ramstage-y += ../../lib/memset.c |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 92 | |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 93 | ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c) |
| 94 | |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 95 | $(objcbfs)/ramstage.debug: $$(ramstage-objs) |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 96 | @printf " CC $(subst $(obj)/,,$(@))\n" |
Patrick Georgi | eec8dfb | 2015-05-07 22:24:41 +0200 | [diff] [blame] | 97 | $(LD_ramstage) --gc-sections -static -o $@ -L$(obj) -T $(obj)/mainboard/$(MAINBOARDDIR)/memlayout.ramstage.ld --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group |
Paul Burton | e853003 | 2014-06-14 00:00:10 +0100 | [diff] [blame] | 98 | |
| 99 | endif # CONFIG_ARCH_RAMSTAGE_MIPS |