blob: 9f0019d4dd12bc3e49e8656503280b3a9dd63d54 [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##
Daisuke Nojiria6712f32015-01-23 10:06:19 -080015
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070016ifeq ($(CONFIG_SOC_BROADCOM_CYGNUS),y)
17
Daisuke Nojiria6712f32015-01-23 10:06:19 -080018bootblock-y += bootblock.c
19bootblock-y += cbmem.c
20bootblock-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080021bootblock-y += timer.c
Corneliu Doban189bec52015-04-10 15:51:55 -070022bootblock-y += tz.c
Corneliu Dobanbcdbdc62015-04-02 16:19:18 -070023bootblock-y += hw_init.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080024bootblock-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080025ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
26bootblock-$(CONFIG_DRIVERS_UART) += ns16550.c
27endif
Daisuke Nojiria6712f32015-01-23 10:06:19 -080028
29verstage-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080030verstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080031verstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080032verstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080033
34romstage-y += cbmem.c
35romstage-y += i2c.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080036romstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080037romstage-y += romstage.c
38romstage-y += sdram.c
39romstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080040romstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Icarus Chaud5f551a2015-02-13 15:16:37 -080041romstage-y += ddr_init.c
42romstage-y += ddr_init_table.c
43romstage-y += shmoo_and28.c
44romstage-y += phy_reg_access.c
45romstage-y += ydc_ddr_bist.c
46romstage-y += timer.c
Icarus Chau98558952015-03-03 19:36:03 -080047romstage-y += gpio.c
48romstage-y += iomux.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080049
50ramstage-y += cbmem.c
51ramstage-y += i2c.c
Daisuke Nojiri99d39562015-03-02 14:38:37 -080052ramstage-y += sdram.c
53ramstage-y += soc.c
Daisuke Nojirifcfd9892015-02-04 17:23:53 -080054ramstage-y += timer.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080055ramstage-$(CONFIG_SPI_FLASH) += spi.c
Daisuke Nojiric047b102015-01-23 10:02:24 -080056ramstage-$(CONFIG_DRIVERS_UART) += ns16550.c
Daisuke Nojiri4e2e8ee2015-02-25 17:39:42 -080057ramstage-y += usb.c
Daisuke Nojiria6712f32015-01-23 10:06:19 -080058
59CPPFLAGS_common += -Isrc/soc/broadcom/cygnus/include/
60
Daisuke Nojirie1741c52015-02-09 18:15:17 -080061ifneq ($(V),1)
62redirect := > /dev/null
63endif
64
65# Options used in the command line:
66# -out: path of the output file
67# -config: path to the file containing unauth header
68# -hmac: path to the file containing hmac for sha256
69# -bl: boot image file, ie. input file
70#
71# Authenticated header parameters:
72#
73# SBIConfiguration /* Indicates SBI config */
74# SYMMETRIC 0x0040
75#
76# CustomerID; /* Customer ID */
77# TYPE bits [31-28]
78# PRODUCTION 0x6
79# DEVELOPMENT 0x9
80# CUSTOMER_ID bits [27-0]
81#
82# ProductID; /* Product ID */
83#
84# CustomerRevisionID; /* Customer Revision ID */
85#
86# SBIUsage /* Boot Image Usage */
87# NONE 0 /* All purposes */
88# SLEEP 1
89# DEEP_SLEEP 2
90# EXCEPTION 4
Aaron Durbind972f782015-09-17 17:02:53 -050091$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin \
Daisuke Nojirie1741c52015-02-09 18:15:17 -080092 $(objutil)/broadcom/secimage/secimage \
93 util/broadcom/unauth.cfg \
94 util/broadcom/khmacsha256
95 @printf " SIGN $(subst $(obj)/,,$(@))\n"
96 $(objutil)/broadcom/secimage/secimage -out $@ \
97 -config util/broadcom/unauth.cfg \
98 -hmac util/broadcom/khmacsha256 -bl $<
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070099
100endif