Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 1 | ## |
| 2 | ## This file is part of the coreboot project. |
| 3 | ## |
Daisuke Nojiri | c047b10 | 2015-01-23 10:02:24 -0800 | [diff] [blame] | 4 | ## Copyright 2015 Google Inc. |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 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 | ## |
| 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 | |
| 20 | bootblock-y += bootblock.c |
| 21 | bootblock-y += cbmem.c |
| 22 | bootblock-y += i2c.c |
Daisuke Nojiri | fcfd989 | 2015-02-04 17:23:53 -0800 | [diff] [blame] | 23 | bootblock-y += timer.c |
Corneliu Doban | 189bec5 | 2015-04-10 15:51:55 -0700 | [diff] [blame] | 24 | bootblock-y += tz.c |
Corneliu Doban | bcdbdc6 | 2015-04-02 16:19:18 -0700 | [diff] [blame] | 25 | bootblock-y += hw_init.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 26 | bootblock-$(CONFIG_SPI_FLASH) += spi.c |
Daisuke Nojiri | c047b10 | 2015-01-23 10:02:24 -0800 | [diff] [blame] | 27 | ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y) |
| 28 | bootblock-$(CONFIG_DRIVERS_UART) += ns16550.c |
| 29 | endif |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 30 | |
| 31 | verstage-y += i2c.c |
Daisuke Nojiri | fcfd989 | 2015-02-04 17:23:53 -0800 | [diff] [blame] | 32 | verstage-y += timer.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 33 | verstage-$(CONFIG_SPI_FLASH) += spi.c |
Daisuke Nojiri | c047b10 | 2015-01-23 10:02:24 -0800 | [diff] [blame] | 34 | verstage-$(CONFIG_DRIVERS_UART) += ns16550.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 35 | |
| 36 | romstage-y += cbmem.c |
| 37 | romstage-y += i2c.c |
Daisuke Nojiri | fcfd989 | 2015-02-04 17:23:53 -0800 | [diff] [blame] | 38 | romstage-y += timer.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 39 | romstage-y += romstage.c |
| 40 | romstage-y += sdram.c |
| 41 | romstage-$(CONFIG_SPI_FLASH) += spi.c |
Daisuke Nojiri | c047b10 | 2015-01-23 10:02:24 -0800 | [diff] [blame] | 42 | romstage-$(CONFIG_DRIVERS_UART) += ns16550.c |
Icarus Chau | d5f551a | 2015-02-13 15:16:37 -0800 | [diff] [blame] | 43 | romstage-y += ddr_init.c |
| 44 | romstage-y += ddr_init_table.c |
| 45 | romstage-y += shmoo_and28.c |
| 46 | romstage-y += phy_reg_access.c |
| 47 | romstage-y += ydc_ddr_bist.c |
| 48 | romstage-y += timer.c |
Icarus Chau | 9855895 | 2015-03-03 19:36:03 -0800 | [diff] [blame] | 49 | romstage-y += gpio.c |
| 50 | romstage-y += iomux.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 51 | |
| 52 | ramstage-y += cbmem.c |
| 53 | ramstage-y += i2c.c |
Daisuke Nojiri | 99d3956 | 2015-03-02 14:38:37 -0800 | [diff] [blame] | 54 | ramstage-y += sdram.c |
| 55 | ramstage-y += soc.c |
Daisuke Nojiri | fcfd989 | 2015-02-04 17:23:53 -0800 | [diff] [blame] | 56 | ramstage-y += timer.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 57 | ramstage-$(CONFIG_SPI_FLASH) += spi.c |
Daisuke Nojiri | c047b10 | 2015-01-23 10:02:24 -0800 | [diff] [blame] | 58 | ramstage-$(CONFIG_DRIVERS_UART) += ns16550.c |
Daisuke Nojiri | 4e2e8ee | 2015-02-25 17:39:42 -0800 | [diff] [blame] | 59 | ramstage-y += usb.c |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 60 | |
| 61 | CPPFLAGS_common += -Isrc/soc/broadcom/cygnus/include/ |
| 62 | |
Daisuke Nojiri | e1741c5 | 2015-02-09 18:15:17 -0800 | [diff] [blame] | 63 | $(objcbfs)/bootblock.tmp: $(objcbfs)/bootblock.elf |
Daisuke Nojiri | a6712f3 | 2015-01-23 10:06:19 -0800 | [diff] [blame] | 64 | @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" |
| 65 | $(OBJCOPY_bootblock) -O binary $< $@ |
Daisuke Nojiri | e1741c5 | 2015-02-09 18:15:17 -0800 | [diff] [blame] | 66 | |
| 67 | ifneq ($(V),1) |
| 68 | redirect := > /dev/null |
| 69 | endif |
| 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 $< |