| 1 |
|
| 2 |
|
| 3 |
armv7_flags = -mthumb -I$(src)/arch/arm/include/armv7/ -D__COREBOOT_ARM_ARCH__=7 |
| 4 |
armv7-a_flags = -march=armv7-a $(armv7_flags) -D__COREBOOT_ARM_V7_A__ |
| 5 |
armv7-m_flags = -march=armv7-m $(armv7_flags) -D__COREBOOT_ARM_V7_M__ |
| 6 |
armv7-r_flags = -march=armv7-r $(armv7_flags) -D__COREBOOT_ARM_V7_R__ |
| 7 |
|
| 8 |
armv7_asm_flags = -Wa,-mthumb -Wa,-mimplicit-it=always |
| 9 |
ifeq ($(CONFIG_COMPILER_GCC),y) |
| 10 |
armv7_asm_flags += -Wa,-mno-warn-deprecated |
| 11 |
else |
| 12 |
armv7_flags += -mfpu=none |
| 13 |
endif |
| 14 |
armv7-r_asm_flags = $(armv7-r_flags) $(armv7_asm_flags) |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7),y) |
| 21 |
decompressor-generic-ccopts += $(armv7-a_flags) |
| 22 |
decompressor-S-ccopts += $(armv7_asm_flags) |
| 23 |
bootblock-generic-ccopts += $(armv7-a_flags) |
| 24 |
bootblock-S-ccopts += $(armv7_asm_flags) |
| 25 |
|
| 26 |
ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y) |
| 27 |
decompressor-y += bootblock.S |
| 28 |
ifneq ($(CONFIG_COMPRESS_BOOTBLOCK),y) |
| 29 |
bootblock-y += bootblock.S |
| 30 |
endif |
| 31 |
endif |
| 32 |
|
| 33 |
decompressor-y += cache.c |
| 34 |
bootblock-y += cache.c |
| 35 |
decompressor-y += cpu.S |
| 36 |
bootblock-y += cpu.S |
| 37 |
decompressor-y += mmu.c |
| 38 |
bootblock-y += mmu.c |
| 39 |
|
| 40 |
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c |
| 41 |
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception_asm.S |
| 42 |
|
| 43 |
else ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7_M),y) |
| 44 |
bootblock-generic-ccopts += $(armv7-m_flags) |
| 45 |
bootblock-S-ccopts += $(armv7_asm_flags) |
| 46 |
|
| 47 |
ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y) |
| 48 |
bootblock-y += bootblock_m.S |
| 49 |
endif |
| 50 |
bootblock-y += exception_mr.c |
| 51 |
bootblock-y += cache_m.c |
| 52 |
|
| 53 |
else ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV7_R),y) |
| 54 |
bootblock-generic-ccopts += $(armv7-r_flags) |
| 55 |
bootblock-S-ccopts += $(armv7-r_asm_flags) |
| 56 |
|
| 57 |
ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y) |
| 58 |
bootblock-y += bootblock.S |
| 59 |
endif |
| 60 |
|
| 61 |
bootblock-y += cache.c |
| 62 |
bootblock-y += cpu.S |
| 63 |
bootblock-y += exception_mr.c |
| 64 |
bootblock-y += mmu.c |
| 65 |
|
| 66 |
endif |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7),y) |
| 73 |
verstage-generic-ccopts += $(armv7-a_flags) |
| 74 |
verstage-S-ccopts += $(armv7_asm_flags) |
| 75 |
|
| 76 |
verstage-y += cache.c |
| 77 |
verstage-y += cpu.S |
| 78 |
verstage-y += exception.c |
| 79 |
verstage-y += exception_asm.S |
| 80 |
verstage-y += mmu.c |
| 81 |
|
| 82 |
else ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7_M),y) |
| 83 |
verstage-generic-ccopts += $(armv7-m_flags) |
| 84 |
verstage-S-ccopts += $(armv7_asm_flags) |
| 85 |
|
| 86 |
else ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7_R),y) |
| 87 |
verstage-generic-ccopts += $(armv7-r_flags) |
| 88 |
verstage-S-ccopts += $(armv7-r_asm_flags) |
| 89 |
|
| 90 |
verstage-y += cache.c |
| 91 |
verstage-y += cpu.S |
| 92 |
verstage-y += exception_mr.c |
| 93 |
verstage-y += mmu.c |
| 94 |
|
| 95 |
endif |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7),y) |
| 101 |
romstage-y += cache.c |
| 102 |
romstage-y += cpu.S |
| 103 |
romstage-y += exception.c |
| 104 |
romstage-y += exception_asm.S |
| 105 |
romstage-y += mmu.c |
| 106 |
|
| 107 |
romstage-generic-ccopts += $(armv7-a_flags) |
| 108 |
romstage-S-ccopts += $(armv7_asm_flags) |
| 109 |
|
| 110 |
rmodules_arm-generic-ccopts += $(armv7-a_flags) |
| 111 |
rmodules_arm-S-ccopts += $(armv7_asm_flags) |
| 112 |
|
| 113 |
else ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7_R),y) |
| 114 |
romstage-y += cache.c |
| 115 |
romstage-y += cpu.S |
| 116 |
romstage-y += exception_mr.c |
| 117 |
romstage-y += mmu.c |
| 118 |
|
| 119 |
romstage-generic-ccopts += $(armv7-r_flags) |
| 120 |
romstage-S-ccopts += $(armv7-r_asm_flags) |
| 121 |
|
| 122 |
rmodules_arm-generic-ccopts += $(armv7-r_flags) |
| 123 |
rmodules_arm-S-ccopts += $(armv7-r_asm_flags) |
| 124 |
|
| 125 |
endif |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV7),y) |
| 132 |
|
| 133 |
ramstage-y += cache.c |
| 134 |
ramstage-y += cpu.S |
| 135 |
ramstage-y += exception.c |
| 136 |
ramstage-y += exception_asm.S |
| 137 |
ramstage-y += mmu.c |
| 138 |
|
| 139 |
ramstage-generic-ccopts += $(armv7-a_flags) |
| 140 |
ramstage-S-ccopts += $(armv7_asm_flags) |
| 141 |
|
| 142 |
|
| 143 |
rmodules_arm-generic-ccopts += $(armv7-a_flags) |
| 144 |
rmodules_arm-S-ccopts += $(armv7_asm_flags) |
| 145 |
|
| 146 |
else ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV7_R),y) |
| 147 |
|
| 148 |
ramstage-y += cache.c |
| 149 |
ramstage-y += cpu.S |
| 150 |
ramstage-y += exception_mr.c |
| 151 |
ramstage-y += mmu.c |
| 152 |
|
| 153 |
ramstage-generic-ccopts += $(armv7-r_flags) |
| 154 |
ramstage-S-ccopts += $(armv7-r_asm_flags) |
| 155 |
|
| 156 |
|
| 157 |
rmodules_arm-generic-ccopts += $(armv7-r_flags) |
| 158 |
rmodules_arm-S-ccopts += $(armv7-r_asm_flags) |
| 159 |
|
| 160 |
endif |