Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 1 | ################################################################################ |
| 2 | ## |
| 3 | ## This file is part of the coreboot project. |
| 4 | ## |
| 5 | ## Copyright (C) 2013 The ChromiumOS Authors |
| 6 | ## |
| 7 | ## This program is free software; you can redistribute it and/or modify |
| 8 | ## it under the terms of the GNU General Public License as published by |
| 9 | ## the Free Software Foundation; version 2 of 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 |
| 18 | ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | ## |
| 20 | ############################################################################### |
| 21 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 22 | armv7_flags = -mthumb -I$(src)/arch/arm/include/armv7/ -D__COREBOOT_ARM_ARCH__=7 |
| 23 | armv7-a_flags = -march=armv7-a $(armv7_flags) |
| 24 | armv7-m_flags = -march=armv7-m $(armv7_flags) |
| 25 | |
| 26 | armv7_asm_flags = -Wa,-mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated |
| 27 | armv7-a_asm_flags = $(armv7-a_flags) $(armv7_asm_flags) |
| 28 | armv7-m_asm_flags = $(armv7-m_flags) $(armv7_asm_flags) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 29 | |
| 30 | ############################################################################### |
| 31 | # bootblock |
| 32 | ############################################################################### |
| 33 | |
| 34 | ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7),y) |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 35 | bootblock-c-ccopts += $(armv7-a_flags) |
| 36 | bootblock-S-ccopts += $(armv7-a_asm_flags) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 37 | |
| 38 | ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y) |
| 39 | bootblock-y += bootblock.S |
| 40 | bootblock-$(CONFIG_BOOTBLOCK_SIMPLE) += bootblock_simple.c |
| 41 | endif |
| 42 | |
| 43 | bootblock-y += cache.c |
Julius Werner | 1f8d246 | 2014-01-15 14:13:25 -0800 | [diff] [blame] | 44 | bootblock-y += cpu.S |
Julius Werner | 85620db | 2013-11-13 18:22:15 -0800 | [diff] [blame] | 45 | bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c |
| 46 | bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception_asm.S |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 47 | bootblock-y += mmu.c |
| 48 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 49 | else ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7_M),y) |
| 50 | bootblock-c-ccopts += $(armv7-m_flags) |
| 51 | bootblock-S-ccopts += $(armv7-m_asm_flags) |
| 52 | |
| 53 | ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y) |
Daisuke Nojiri | c5a4c12 | 2014-10-23 11:51:18 -0700 | [diff] [blame] | 54 | bootblock-y += bootblock_m.S |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 55 | bootblock-y += bootblock_simple.c |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 56 | endif |
Daisuke Nojiri | af3b2a1 | 2014-10-23 12:39:11 -0700 | [diff] [blame] | 57 | bootblock-y += exception_m.c |
| 58 | bootblock-y += cache_m.c |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 59 | |
| 60 | endif # CONFIG_ARCH_BOOTBLOCK_ARMV7 |
| 61 | |
Patrick Georgi | ddcd9bd | 2015-04-27 18:02:11 +0200 | [diff] [blame^] | 62 | bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 63 | |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 64 | ################################################################################ |
| 65 | ## verification stage |
| 66 | ################################################################################ |
| 67 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 68 | ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7),y) |
| 69 | verstage-c-ccopts += $(armv7-a_flags) |
| 70 | verstage-S-ccopts += $(armv7-a_asm_flags) |
Furquan Shaikh | dfb8eb1 | 2014-10-02 16:27:52 -0700 | [diff] [blame] | 71 | |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 72 | verstage-y += cache.c |
| 73 | verstage-y += cpu.S |
| 74 | verstage-y += exception.c |
| 75 | verstage-y += exception_asm.S |
| 76 | verstage-y += mmu.c |
| 77 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 78 | else ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7_M),y) |
| 79 | verstage-c-ccopts += $(armv7-m_flags) |
| 80 | verstage-S-ccopts += $(armv7-m_asm_flags) |
Furquan Shaikh | dfb8eb1 | 2014-10-02 16:27:52 -0700 | [diff] [blame] | 81 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 82 | endif # CONFIG_ARCH_VERSTAGE_ARMV7_M |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 83 | |
Patrick Georgi | ddcd9bd | 2015-04-27 18:02:11 +0200 | [diff] [blame^] | 84 | verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 85 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 86 | ################################################################################ |
| 87 | ## ROM stage |
| 88 | ################################################################################ |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 89 | ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y) |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 90 | >>>>>>> 34b838e... armv7-m: add armv7-m configuration |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 91 | |
| 92 | romstage-y += cache.c |
Julius Werner | 1f8d246 | 2014-01-15 14:13:25 -0800 | [diff] [blame] | 93 | romstage-y += cpu.S |
Hung-Te Lin | 2fc3b62 | 2013-10-21 21:43:03 +0800 | [diff] [blame] | 94 | romstage-y += exception.c |
| 95 | romstage-y += exception_asm.S |
| 96 | romstage-y += mmu.c |
Stefan Reinauer | 3a6550d | 2013-08-01 13:31:44 -0700 | [diff] [blame] | 97 | romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 98 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 99 | romstage-c-ccopts += $(armv7-a_flags) |
| 100 | romstage-S-ccopts += $(armv7-a_asm_flags) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 101 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 102 | rmodules_arm-c-ccopts += $(armv7-a_flags) |
| 103 | rmodules_arm-S-ccopts += $(armv7-a_asm_flags) |
Furquan Shaikh | a742ef1 | 2014-07-23 11:41:59 -0700 | [diff] [blame] | 104 | |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 105 | endif # CONFIG_ARCH_ROMSTAGE_ARMV7 |
| 106 | |
| 107 | ############################################################################### |
| 108 | # ramstage |
| 109 | ############################################################################### |
| 110 | |
| 111 | ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV7),y) |
| 112 | |
| 113 | ramstage-y += cache.c |
Julius Werner | 1f8d246 | 2014-01-15 14:13:25 -0800 | [diff] [blame] | 114 | ramstage-y += cpu.S |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 115 | ramstage-y += exception.c |
| 116 | ramstage-y += exception_asm.S |
| 117 | ramstage-y += mmu.c |
Stefan Reinauer | 3a6550d | 2013-08-01 13:31:44 -0700 | [diff] [blame] | 118 | ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 119 | |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 120 | ramstage-c-ccopts += $(armv7-a_flags) |
| 121 | ramstage-S-ccopts += $(armv7-a_asm_flags) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 122 | |
Aaron Durbin | 703e507 | 2014-03-20 15:02:17 -0500 | [diff] [blame] | 123 | # All rmodule code is armv7 if ramstage is armv7. |
Daisuke Nojiri | 93d8e3c | 2014-10-21 11:18:20 -0700 | [diff] [blame] | 124 | rmodules_arm-c-ccopts += $(armv7-a_flags) |
| 125 | rmodules_arm-S-ccopts += $(armv7-a_asm_flags) |
Gabe Black | 51edd54 | 2013-09-30 23:00:33 -0700 | [diff] [blame] | 126 | endif # CONFIG_ARCH_RAMSTAGE_ARMV7 |