Stefan Reinauer | 179206a | 2012-11-30 12:19:59 -0800 | [diff] [blame] | 1 | # |
| 2 | # This file is part of the coreboot project. |
| 3 | # |
| 4 | # Copyright (C) 2009 coresystems GmbH |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; version 2 of the License. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
Aaron Durbin | 0f33307 | 2014-01-30 17:19:46 -0600 | [diff] [blame] | 15 | subdirs-y += loaders |
Nico Huber | be5492a | 2015-09-29 16:41:19 +0200 | [diff] [blame] | 16 | subdirs-y += gnat |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 17 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 18 | |
| 19 | ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y) |
| 20 | bootblock-y += bootblock.c |
| 21 | endif |
| 22 | |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 23 | bootblock-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 24 | bootblock-y += prog_ops.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 25 | bootblock-y += cbfs.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 26 | bootblock-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 27 | bootblock-y += libgcc.c |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 28 | bootblock-$(CONFIG_GENERIC_UDELAY) += timer.c |
| 29 | |
Paul Menzel | 2ea2555 | 2015-10-13 17:30:57 +0200 | [diff] [blame] | 30 | ifeq ($(CONFIG_EARLY_CBMEM_INIT),y) |
Patrick Georgi | 8b17404 | 2015-04-27 18:03:50 +0200 | [diff] [blame] | 31 | bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Paul Menzel | 2ea2555 | 2015-10-13 17:30:57 +0200 | [diff] [blame] | 32 | endif |
| 33 | |
Kyösti Mälkki | 8659e40 | 2014-12-21 08:55:47 +0200 | [diff] [blame] | 34 | bootblock-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Patrick Georgi | b0a2d3c2 | 2016-01-19 18:10:55 +0100 | [diff] [blame] | 35 | bootblock-y += delay.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 36 | bootblock-y += memchr.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 37 | bootblock-y += memcmp.c |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 38 | bootblock-y += boot_device.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 39 | bootblock-y += fmap.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 40 | |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 41 | verstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 42 | verstage-y += prog_ops.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 43 | verstage-y += delay.c |
| 44 | verstage-y += cbfs.c |
Aaron Durbin | 17200ad | 2015-05-01 16:48:54 -0500 | [diff] [blame] | 45 | verstage-y += halt.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 46 | verstage-y += fmap.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 47 | verstage-y += libgcc.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 48 | verstage-y += memcmp.c |
Patrick Georgi | 8b17404 | 2015-04-27 18:03:50 +0200 | [diff] [blame] | 49 | verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 50 | verstage-y += boot_device.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 51 | verstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Yen Lin | 5bdbd00 | 2015-04-08 16:55:17 -0700 | [diff] [blame] | 52 | |
Vadim Bendebury | 245d457 | 2016-04-05 16:01:57 -0700 | [diff] [blame] | 53 | libverstage-$(CONFIG_TPM) += tlcl.c |
Vadim Bendebury | 627afc2 | 2016-06-19 12:13:18 -0700 | [diff] [blame] | 54 | libverstage-$(CONFIG_TPM2) += tpm2_marshaling.c |
Vadim Bendebury | 245d457 | 2016-04-05 16:01:57 -0700 | [diff] [blame] | 55 | libverstage-$(CONFIG_TPM2) += tpm2_tlcl.c |
Furquan Shaikh | fb81474 | 2016-11-07 23:33:46 -0800 | [diff] [blame] | 56 | |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame^] | 57 | ifeq ($(CONFIG_VBOOT_SEPARATE_VERSTAGE),y) |
Furquan Shaikh | fb81474 | 2016-11-07 23:33:46 -0800 | [diff] [blame] | 58 | romstage-$(CONFIG_TPM) += tlcl.c |
| 59 | romstage-$(CONFIG_TPM2) += tpm2_marshaling.c |
| 60 | romstage-$(CONFIG_TPM2) += tpm2_tlcl.c |
Julius Werner | 58c3938 | 2017-02-13 17:53:29 -0800 | [diff] [blame^] | 61 | endif # CONFIG_VBOOT_SEPARATE_VERSTAGE |
Furquan Shaikh | fb81474 | 2016-11-07 23:33:46 -0800 | [diff] [blame] | 62 | |
Vadim Bendebury | 3486d1f | 2014-10-16 11:24:12 -0700 | [diff] [blame] | 63 | verstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 64 | verstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 65 | |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 66 | romstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 67 | romstage-y += prog_ops.c |
Gabe Black | 1025f3a | 2011-09-16 02:18:56 -0700 | [diff] [blame] | 68 | romstage-y += memchr.c |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 69 | romstage-y += memcmp.c |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 70 | $(foreach arch,$(ARCH_SUPPORTED),\ |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 71 | $(eval rmodules_$(arch)-y += memcmp.c) \ |
| 72 | $(eval rmodules_$(arch)-y += rmodule.ld)) |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 73 | |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 74 | romstage-y += fmap.c |
Patrick Georgi | 82d9a31 | 2016-01-21 12:46:10 +0100 | [diff] [blame] | 75 | romstage-y += delay.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 76 | romstage-y += cbfs.c |
Edward O'Callaghan | cd31afd | 2014-11-11 12:27:06 +1100 | [diff] [blame] | 77 | romstage-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c lzmadecode.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 78 | romstage-y += libgcc.c |
Aaron Durbin | 5fbe12d | 2016-07-17 22:59:47 -0500 | [diff] [blame] | 79 | romstage-y += memrange.c |
David Hendricks | 560c643 | 2014-02-13 13:07:50 -0800 | [diff] [blame] | 80 | romstage-$(CONFIG_PRIMITIVE_MEMTEST) += primitive_memtest.c |
| 81 | ramstage-$(CONFIG_PRIMITIVE_MEMTEST) += primitive_memtest.c |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 82 | romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 83 | romstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Aaron Durbin | cd0bc98 | 2016-11-19 12:36:09 -0600 | [diff] [blame] | 84 | ramstage-y += region_file.c |
| 85 | romstage-y += region_file.c |
Aaron Durbin | afe8aee | 2016-11-29 21:37:42 -0600 | [diff] [blame] | 86 | ramstage-y += romstage_handoff.c |
| 87 | romstage-y += romstage_handoff.c |
Kyösti Mälkki | e5c00a5 | 2016-06-27 14:50:27 +0300 | [diff] [blame] | 88 | romstage-y += romstage_stack.c |
Kyösti Mälkki | bce9bbd | 2016-06-27 16:15:02 +0300 | [diff] [blame] | 89 | ramstage-y += romstage_stack.c |
Julius Werner | 7dcf9d5 | 2015-10-16 13:10:02 -0700 | [diff] [blame] | 90 | romstage-y += stack.c |
Simon Glass | 2cf99e1 | 2016-06-10 20:58:24 -0600 | [diff] [blame] | 91 | ramstage-y += rtc.c |
Vladimir Serbinenko | 45988da | 2013-03-30 02:02:13 +0100 | [diff] [blame] | 92 | |
Kyösti Mälkki | f8bf5a1 | 2013-10-11 22:08:02 +0300 | [diff] [blame] | 93 | ifeq ($(CONFIG_EARLY_CBMEM_INIT),y) |
Aaron Durbin | c15551a | 2013-03-23 00:00:54 -0500 | [diff] [blame] | 94 | romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Kyösti Mälkki | a2f6af3 | 2013-09-10 13:50:32 +0300 | [diff] [blame] | 95 | romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Kyösti Mälkki | a2f6af3 | 2013-09-10 13:50:32 +0300 | [diff] [blame] | 96 | endif |
Denis 'GNUtoo' Carikli | 8a0a848 | 2013-06-20 16:24:14 +0200 | [diff] [blame] | 97 | |
Stefan Reinauer | fb89dd0 | 2012-03-30 16:28:20 -0700 | [diff] [blame] | 98 | romstage-y += compute_ip_checksum.c |
Patrick Georgi | 6d0cba7 | 2014-11-29 11:32:12 +0100 | [diff] [blame] | 99 | ifeq ($(CONFIG_COMPILER_GCC),y) |
Alexandru Gagniuc | 66bbb31 | 2015-10-06 16:35:07 -0700 | [diff] [blame] | 100 | bootblock-$(CONFIG_ARCH_BOOTBLOCK_X86_32) += gcc.c |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 101 | verstage-$(CONFIG_ARCH_VERSTAGE_X86_32) += gcc.c |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 102 | romstage-$(CONFIG_ARCH_ROMSTAGE_X86_32) += gcc.c |
Edward O'Callaghan | 4ba8ba4 | 2014-05-23 01:29:00 +1000 | [diff] [blame] | 103 | ramstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += gcc.c |
Stefan Reinauer | 1fa5274 | 2015-07-31 17:56:03 -0700 | [diff] [blame] | 104 | smm-$(CONFIG_ARCH_RAMSTAGE_X86_32) += gcc.c |
Edward O'Callaghan | 4ba8ba4 | 2014-05-23 01:29:00 +1000 | [diff] [blame] | 105 | endif |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 106 | |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 107 | romstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
| 108 | |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 109 | ramstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 110 | ramstage-y += prog_ops.c |
Stefan Reinauer | 1e75329 | 2012-11-30 12:23:45 -0800 | [diff] [blame] | 111 | ramstage-y += hardwaremain.c |
| 112 | ramstage-y += selfboot.c |
Stefan Reinauer | 3e4e303 | 2013-03-20 14:08:04 -0700 | [diff] [blame] | 113 | ramstage-y += coreboot_table.c |
Aaron Durbin | 4904802 | 2014-02-18 21:55:02 -0600 | [diff] [blame] | 114 | ramstage-y += bootmem.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 115 | ramstage-y += fmap.c |
Gabe Black | 1025f3a | 2011-09-16 02:18:56 -0700 | [diff] [blame] | 116 | ramstage-y += memchr.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 117 | ramstage-y += memcmp.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 118 | ramstage-y += malloc.c |
Duncan Laurie | f5e9ac4 | 2012-06-23 13:33:32 -0700 | [diff] [blame] | 119 | smm-$(CONFIG_SMM_TSEG) += malloc.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 120 | ramstage-y += delay.c |
| 121 | ramstage-y += fallback_boot.c |
| 122 | ramstage-y += compute_ip_checksum.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 123 | ramstage-y += cbfs.c |
Edward O'Callaghan | cd31afd | 2014-11-11 12:27:06 +1100 | [diff] [blame] | 124 | ramstage-y += lzma.c lzmadecode.c |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 125 | ramstage-y += stack.c |
Duncan Laurie | b955284 | 2016-05-09 10:58:03 -0700 | [diff] [blame] | 126 | ramstage-y += hexstrtobin.c |
Felix Durairaj | 7f76165 | 2015-11-20 15:51:35 -0800 | [diff] [blame] | 127 | ramstage-y += wrdd.c |
Vadim Bendebury | 3e31600 | 2011-09-30 12:02:18 -0700 | [diff] [blame] | 128 | ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 129 | ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c |
Rudolf Marek | 7f0e930 | 2011-09-02 23:23:41 +0200 | [diff] [blame] | 130 | ramstage-$(CONFIG_TRACE) += trace.c |
Vadim Bendebury | 6f72d69 | 2011-09-21 16:12:39 -0700 | [diff] [blame] | 131 | ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Stefan Reinauer | d37ab45 | 2012-12-18 16:23:28 -0800 | [diff] [blame] | 132 | ramstage-$(CONFIG_COVERAGE) += libgcov.c |
Ronald G. Minnich | b3b72f3 | 2013-03-13 14:35:01 -0700 | [diff] [blame] | 133 | ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += edid.c |
Aaron Durbin | a05a852 | 2013-03-22 20:44:46 -0500 | [diff] [blame] | 134 | ramstage-y += memrange.c |
Aaron Durbin | 4409a5e | 2013-05-06 12:20:52 -0500 | [diff] [blame] | 135 | ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c |
Aaron Durbin | 340ca91 | 2013-04-30 09:58:12 -0500 | [diff] [blame] | 136 | ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c |
David Hendricks | 3b11de8 | 2014-11-05 14:05:56 -0800 | [diff] [blame] | 137 | ramstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 138 | ramstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
Vadim Bendebury | 243c614 | 2015-03-27 16:08:04 -0700 | [diff] [blame] | 139 | ramstage-y += b64_decode.c |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 140 | ramstage-$(CONFIG_ACPI_NHLT) += nhlt.c |
Aaron Durbin | f56c778 | 2017-01-10 17:44:42 -0600 | [diff] [blame] | 141 | ramstage-$(CONFIG_TPM2) += tpm2_marshaling.c |
| 142 | ramstage-$(CONFIG_TPM2) += tpm2_tlcl.c |
Stefan Reinauer | 16ce01b | 2011-01-28 08:05:54 +0000 | [diff] [blame] | 143 | |
Aaron Durbin | 0dff57d | 2015-03-05 21:18:33 -0600 | [diff] [blame] | 144 | romstage-y += cbmem_common.c |
| 145 | romstage-y += imd_cbmem.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 146 | romstage-y += imd.c |
Aaron Durbin | 0dff57d | 2015-03-05 21:18:33 -0600 | [diff] [blame] | 147 | |
| 148 | ramstage-y += cbmem_common.c |
| 149 | ramstage-y += imd_cbmem.c |
Aaron Durbin | 20686d8 | 2015-03-05 14:11:27 -0600 | [diff] [blame] | 150 | ramstage-y += imd.c |
| 151 | |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 152 | postcar-y += cbmem_common.c |
Aaron Durbin | 1e9a914 | 2016-09-16 16:23:21 -0500 | [diff] [blame] | 153 | postcar-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 154 | postcar-y += imd_cbmem.c |
| 155 | postcar-y += imd.c |
Aaron Durbin | afe8aee | 2016-11-29 21:37:42 -0600 | [diff] [blame] | 156 | postcar-y += romstage_handoff.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 157 | |
Alexandru Gagniuc | e223e89 | 2015-10-14 09:58:36 -0700 | [diff] [blame] | 158 | bootblock-y += hexdump.c |
Stefan Reinauer | 2f38b07 | 2013-07-18 16:24:08 -0700 | [diff] [blame] | 159 | ramstage-y += hexdump.c |
| 160 | romstage-y += hexdump.c |
Duncan Laurie | 7fbdad8 | 2016-09-07 10:56:25 -0700 | [diff] [blame] | 161 | verstage-y += hexdump.c |
Stefan Reinauer | 2f38b07 | 2013-07-18 16:24:08 -0700 | [diff] [blame] | 162 | |
Lee Leahy | 7a29cdc | 2016-06-05 18:49:55 -0700 | [diff] [blame] | 163 | bootblock-$(CONFIG_REG_SCRIPT) += reg_script.c |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 164 | verstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
Isaac Christensen | 0b4e8df | 2014-10-01 11:50:20 -0600 | [diff] [blame] | 165 | romstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
Duncan Laurie | 7274800 | 2013-10-31 08:26:23 -0700 | [diff] [blame] | 166 | ramstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
| 167 | |
Aaron Durbin | bd74a4b | 2015-03-06 23:17:33 -0600 | [diff] [blame] | 168 | ifeq ($(CONFIG_CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM),y) |
| 169 | ramstage-y += ext_stage_cache.c |
| 170 | romstage-y += ext_stage_cache.c |
Brandon Breitenstein | 135eae9 | 2016-09-30 13:57:12 -0700 | [diff] [blame] | 171 | postcar-y += ext_stage_cache.c |
Aaron Durbin | bd74a4b | 2015-03-06 23:17:33 -0600 | [diff] [blame] | 172 | else |
| 173 | ramstage-$(CONFIG_RELOCATABLE_RAMSTAGE) += cbmem_stage_cache.c |
| 174 | romstage-$(CONFIG_RELOCATABLE_RAMSTAGE) += cbmem_stage_cache.c |
| 175 | endif |
| 176 | |
Aaron Durbin | 127525c | 2015-03-26 12:29:12 -0500 | [diff] [blame] | 177 | |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 178 | romstage-y += boot_device.c |
| 179 | ramstage-y += boot_device.c |
Aaron Durbin | 75e2974 | 2013-10-10 20:37:04 -0500 | [diff] [blame] | 180 | |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 181 | smm-y += boot_device.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 182 | smm-y += fmap.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 183 | smm-y += cbfs.c memcmp.c |
Stefan Reinauer | e9f3258 | 2010-03-29 13:04:13 +0000 | [diff] [blame] | 184 | |
Kyösti Mälkki | c36af7b | 2014-11-18 12:41:16 +0200 | [diff] [blame] | 185 | bootblock-y += version.c |
| 186 | romstage-y += version.c |
| 187 | ramstage-y += version.c |
| 188 | smm-y += version.c |
Aaron Durbin | fd6fb26 | 2015-05-13 13:37:43 -0500 | [diff] [blame] | 189 | verstage-y += version.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 190 | postcar-y += version.c |
Kyösti Mälkki | c36af7b | 2014-11-18 12:41:16 +0200 | [diff] [blame] | 191 | |
Nico Huber | 81b09f4 | 2016-01-23 00:50:00 +0100 | [diff] [blame] | 192 | $(call src-to-obj,bootblock,$(dir)/version.c) : $(obj)/build.h |
| 193 | $(call src-to-obj,romstage,$(dir)/version.c) : $(obj)/build.h |
| 194 | $(call src-to-obj,ramstage,$(dir)/version.c) : $(obj)/build.h |
| 195 | $(call src-to-obj,smm,$(dir)/version.c) : $(obj)/build.h |
| 196 | $(call src-to-obj,verstage,$(dir)/version.c) : $(obj)/build.h |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 197 | $(call src-to-obj,postcar,$(dir)/version.c) : $(obj)/build.h |
Stefan Reinauer | ba9dae2 | 2011-07-29 15:34:14 -0700 | [diff] [blame] | 198 | |
Patrick Georgi | 58a150a | 2016-05-02 17:22:29 +0800 | [diff] [blame] | 199 | $(call src-to-obj,bootblock,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 200 | $(call src-to-obj,romstage,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 201 | $(call src-to-obj,ramstage,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 202 | $(call src-to-obj,smm,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 203 | $(call src-to-obj,verstage,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 204 | $(call src-to-obj,postcar,$(dir)/cbfs.c) : $(obj)/fmap_config.h |
| 205 | |
Aaron Durbin | bf1e481 | 2016-05-10 15:12:08 -0500 | [diff] [blame] | 206 | $(call src-to-obj,bootblock,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 207 | $(call src-to-obj,romstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 208 | $(call src-to-obj,ramstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 209 | $(call src-to-obj,smm,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 210 | $(call src-to-obj,verstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 211 | $(call src-to-obj,postcar,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 212 | |
Subrata Banik | 50b9258 | 2016-07-21 23:47:38 +0530 | [diff] [blame] | 213 | bootblock-y += bootmode.c |
Kyösti Mälkki | 5687fc9 | 2013-11-28 18:11:49 +0200 | [diff] [blame] | 214 | romstage-y += bootmode.c |
| 215 | ramstage-y += bootmode.c |
Aaron Durbin | 7bc39a0 | 2016-01-25 16:58:43 -0600 | [diff] [blame] | 216 | verstage-y += bootmode.c |
Kyösti Mälkki | 5687fc9 | 2013-11-28 18:11:49 +0200 | [diff] [blame] | 217 | |
Patrick Georgi | 1b2f2a0 | 2014-11-28 22:00:22 +0100 | [diff] [blame] | 218 | bootblock-y += halt.c |
| 219 | romstage-y += halt.c |
| 220 | ramstage-y += halt.c |
| 221 | smm-y += halt.c |
| 222 | |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 223 | postcar-y += bootmode.c |
| 224 | postcar-y += boot_device.c |
| 225 | postcar-y += cbfs.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 226 | postcar-y += delay.c |
| 227 | postcar-y += fmap.c |
| 228 | postcar-y += gcc.c |
| 229 | postcar-y += halt.c |
| 230 | postcar-y += libgcc.c |
| 231 | postcar-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c lzmadecode.c |
| 232 | postcar-y += memchr.c |
| 233 | postcar-y += memcmp.c |
| 234 | postcar-y += prog_loaders.c |
| 235 | postcar-y += prog_ops.c |
| 236 | postcar-y += rmodule.c |
| 237 | postcar-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 238 | |
Aaron Durbin | eb907b3 | 2016-01-21 00:08:17 -0600 | [diff] [blame] | 239 | # Use program.ld for all the platforms which use C fo the bootblock. |
| 240 | bootblock-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += program.ld |
Aaron Durbin | 4de29d4 | 2015-09-03 22:49:36 -0500 | [diff] [blame] | 241 | |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 242 | postcar-y += program.ld |
Aaron Durbin | 14714e1 | 2015-09-04 12:06:05 -0500 | [diff] [blame] | 243 | romstage-y += program.ld |
Aaron Durbin | 4de29d4 | 2015-09-03 22:49:36 -0500 | [diff] [blame] | 244 | ramstage-y += program.ld |
Aaron Durbin | e5bad5c | 2015-09-05 10:27:12 -0500 | [diff] [blame] | 245 | verstage-y += program.ld |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 246 | |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 247 | ifeq ($(CONFIG_RELOCATABLE_MODULES),y) |
| 248 | ramstage-y += rmodule.c |
Aaron Durbin | 8e4a355 | 2013-02-08 17:28:04 -0600 | [diff] [blame] | 249 | romstage-$(CONFIG_RELOCATABLE_RAMSTAGE) += rmodule.c |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 250 | |
Aaron Durbin | d4dd44c | 2015-09-06 10:15:17 -0500 | [diff] [blame] | 251 | RMODULE_LDFLAGS := -z defs -Bsymbolic |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 252 | |
| 253 | # rmodule_link_rules is a function that should be called with: |
| 254 | # (1) the object name to link |
| 255 | # (2) the dependencies |
| 256 | # (3) heap size of the relocatable module |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 257 | # (4) arch for which the rmodules are to be linked |
Aaron Durbin | 3eb8eb7 | 2014-03-10 16:13:58 -0500 | [diff] [blame] | 258 | # It will create the necessary Make rules to create a rmodule. The resulting |
| 259 | # rmdoule is named $(1).rmod |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 260 | define rmodule_link |
Nico Huber | 81b09f4 | 2016-01-23 00:50:00 +0100 | [diff] [blame] | 261 | $(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) | $$(RMODTOOL) |
| 262 | $$(LD_rmodules_$(4)) $$(LDFLAGS_rmodules_$(4)) $(RMODULE_LDFLAGS) -T $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) --defsym=__heap_size=$(strip $(3)) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 263 | $$(NM_rmodules_$(4)) -n $$@ > $$(basename $$@).map |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 264 | endef |
| 265 | |
| 266 | endif |
Aaron Durbin | 83bc0db | 2015-09-06 10:45:18 -0500 | [diff] [blame] | 267 | |
| 268 | $(objcbfs)/%.debug.rmod: $(objcbfs)/%.debug | $(RMODTOOL) |
| 269 | $(RMODTOOL) -i $< -o $@ |
| 270 | |
| 271 | $(obj)/%.elf.rmod: $(obj)/%.elf | $(RMODTOOL) |
| 272 | $(RMODTOOL) -i $< -o $@ |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 273 | |
| 274 | ifeq ($(CONFIG_RAMSTAGE_LIBHWBASE),y) |
| 275 | |
| 276 | $(call add-special-class,hw) |
| 277 | hw-handler = $(eval ramstage-srcs += $$(addprefix $(1),$(2))) |
| 278 | subdirs-y += ../../3rdparty/libhwbase |
| 279 | |
| 280 | ramstage-$(CONFIG_HAVE_MONOTONIC_TIMER) += hw-time-timer.adb |
| 281 | |
| 282 | endif # CONFIG_RAMSTAGE_LIBHWBASE |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 283 | |
Patrick Georgi | 0e3c59e | 2017-01-28 15:59:25 +0100 | [diff] [blame] | 284 | romstage-y += spd_bin.c |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 285 | |
Patrick Georgi | 0e3c59e | 2017-01-28 15:59:25 +0100 | [diff] [blame] | 286 | ifeq ($(CONFIG_GENERIC_SPD_BIN),y) |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 287 | LIB_SPD_BIN = $(obj)/spd.bin |
| 288 | |
| 289 | LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex) |
| 290 | |
| 291 | # Include spd ROM data |
| 292 | $(LIB_SPD_BIN): $(LIB_SPD_DEPS) |
| 293 | for f in $(LIB_SPD_DEPS); \ |
| 294 | do for c in $$(cat $$f | grep -v ^#); \ |
| 295 | do printf $$(printf '\%o' 0x$$c); \ |
| 296 | done; \ |
| 297 | done > $@ |
| 298 | |
| 299 | cbfs-files-$(CONFIG_GENERIC_SPD_BIN) += spd.bin |
| 300 | spd.bin-file := $(LIB_SPD_BIN) |
| 301 | spd.bin-type := spd |
Martin Roth | 8e4bb31 | 2017-01-29 18:11:36 -0700 | [diff] [blame] | 302 | endif |