blob: 0a3d456de3f0ec28904df522d85a7f324e249224 [file] [log] [blame]
Paul Burtonc1081a42014-06-14 00:08:02 +01001#
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
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19# MA 02110-1301 USA
20#
21
Vadim Bendebury2d510d02014-09-29 12:43:40 -070022# We enable CBFS_SPI_WRAPPER for Pistachio targets.
Ionela Voinescub3f666b2015-01-18 22:37:11 +000023bootblock-y += clocks.c
Vadim Bendeburyb2e465d2014-08-29 16:34:46 -070024bootblock-y += spi.c
25romstage-y += spi.c
26ramstage-y += spi.c
27
Patrick Georgi146d05d2015-03-30 13:08:18 +020028ifeq ($(CONFIG_DRIVERS_UART),y)
Paul Burtonc1081a42014-06-14 00:08:02 +010029bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += uart.c
30romstage-y += uart.c
31ramstage-y += uart.c
32endif
33
Vadim Bendeburyf16b0822014-09-29 13:08:24 -070034bootblock-y += monotonic_timer.c
Vadim Bendeburyb2e465d2014-08-29 16:34:46 -070035
Paul Burtonc1081a42014-06-14 00:08:02 +010036ramstage-y += cbmem.c
Vadim Bendeburyf16b0822014-09-29 13:08:24 -070037ramstage-y += monotonic_timer.c
Vadim Bendeburyf3bc0262014-12-01 18:34:37 -080038ramstage-y += soc.c
Vadim Bendeburyb2e465d2014-08-29 16:34:46 -070039
40romstage-y += cbmem.c
Ionela Voinescud6aaca92015-01-19 01:03:44 +000041romstage-y += ddr2_init.c
Vadim Bendeburyc7b3f722014-09-02 13:20:47 -070042romstage-y += romstage.c
Ionela Voinescu49aad6b2014-09-09 20:18:55 +010043romstage-y += monotonic_timer.c
Paul Burtonc1081a42014-06-14 00:08:02 +010044
Julius Werner08125682014-10-20 13:22:00 -070045CPPFLAGS_common += -Isrc/soc/imgtec/pistachio/include/
46
Paul Burtonc1081a42014-06-14 00:08:02 +010047# Generate the actual coreboot bootblock code
48$(objcbfs)/bootblock.raw: $(objcbfs)/bootblock.elf
49 @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
50 $(OBJCOPY_bootblock) -O binary $< $@.tmp
51 @mv $@.tmp $@
52
53# Create a complete bootblock which will start up the system
54$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw $(BIMGTOOL)
55 @printf " BIMGTOOL $(subst $(obj)/,,$(@))\n"
Julius Wernerec5e5e02014-08-20 15:29:56 -070056 $(BIMGTOOL) $< $@ $(call loadaddr,bootblock)
Vadim Bendeburyb2e465d2014-08-29 16:34:46 -070057