blob: 4e09bed86fb4c8553ea01049916978580cd11bed [file] [log] [blame]
Daisuke Nojiria6712f32015-01-23 10:06:19 -08001##
2## This file is part of the coreboot project.
3##
Daisuke Nojiric047b102015-01-23 10:02:24 -08004## Copyright 2015 Google Inc.
Daisuke Nojiria6712f32015-01-23 10:06:19 -08005##
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##
15## You should have received a copy of the GNU General Public License
16## along with this program; if not, write to the Free Software
17## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18##
19
20bootblock-y += bootblock.c
21bootblock-y += cbmem.c
22bootblock-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080023bootblock-y += timer.c
Corneliu Doban189bec52015-04-10 15:51:55 -070024bootblock-y += tz.c
Corneliu Dobanbcdbdc62015-04-02 16:19:18 -070025bootblock-y += hw_init.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080026bootblock-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080027ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
28bootblock-$(CONFIG_DRIVERS_UART) += ns16550.c
29endif
Daisuke Nojiria6712f32015-01-23 10:06:19 -080030
31verstage-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080032verstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080033verstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080034verstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080035
36romstage-y += cbmem.c
37romstage-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080038romstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080039romstage-y += romstage.c
40romstage-y += sdram.c
41romstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080042romstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Icarus Chaud5f551a2015-02-13 15:16:37 -080043romstage-y += ddr_init.c
44romstage-y += ddr_init_table.c
45romstage-y += shmoo_and28.c
46romstage-y += phy_reg_access.c
47romstage-y += ydc_ddr_bist.c
48romstage-y += timer.c
Icarus Chau98558952015-03-03 19:36:03 -080049romstage-y += gpio.c
50romstage-y += iomux.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080051
52ramstage-y += cbmem.c
53ramstage-y += i2c.c
Daisuke Nojiri99d39562015-03-02 14:38:37 -080054ramstage-y += sdram.c
55ramstage-y += soc.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080056ramstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080057ramstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080058ramstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Daisuke Nojiri4e2e8ee2015-02-25 17:39:42 -080059ramstage-y += usb.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080060
61CPPFLAGS_common += -Isrc/soc/broadcom/cygnus/include/
62
Daisuke Nojirie1741c52015-02-09 18:15:17 -080063$(objcbfs)/bootblock.tmp: $(objcbfs)/bootblock.elf
Daisuke Nojiria6712f32015-01-23 10:06:19 -080064 @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
65 $(OBJCOPY_bootblock) -O binary $< $@
Daisuke Nojirie1741c52015-02-09 18:15:17 -080066
67ifneq ($(V),1)
68redirect := > /dev/null
69endif
70
71# Options used in the command line:
72# -out: path of the output file
73# -config: path to the file containing unauth header
74# -hmac: path to the file containing hmac for sha256
75# -bl: boot image file, ie. input file
76#
77# Authenticated header parameters:
78#
79# SBIConfiguration /* Indicates SBI config */
80# SYMMETRIC 0x0040
81#
82# CustomerID; /* Customer ID */
83# TYPE bits [31-28]
84# PRODUCTION 0x6
85# DEVELOPMENT 0x9
86# CUSTOMER_ID bits [27-0]
87#
88# ProductID; /* Product ID */
89#
90# CustomerRevisionID; /* Customer Revision ID */
91#
92# SBIUsage /* Boot Image Usage */
93# NONE 0 /* All purposes */
94# SLEEP 1
95# DEEP_SLEEP 2
96# EXCEPTION 4
97$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.tmp \
98 $(objutil)/broadcom/secimage/secimage \
99 util/broadcom/unauth.cfg \
100 util/broadcom/khmacsha256
101 @printf " SIGN $(subst $(obj)/,,$(@))\n"
102 $(objutil)/broadcom/secimage/secimage -out $@ \
103 -config util/broadcom/unauth.cfg \
104 -hmac util/broadcom/khmacsha256 -bl $<