Gabe Black | 8b68539 | 2013-09-29 03:02:55 -0700 | [diff] [blame] | 1 | bootblock-y += bootblock.c |
Gabe Black | 7f07475 | 2013-09-29 06:32:27 -0700 | [diff] [blame] | 2 | bootblock-y += bootblock_asm.S |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 3 | bootblock-y += cbfs.c |
Ronald G. Minnich | 3eab7ed | 2013-10-03 17:05:55 -0700 | [diff] [blame] | 4 | bootblock-y += clock.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 5 | bootblock-y += dma.c |
Gabe Black | 14eb43b | 2013-10-07 01:57:42 -0700 | [diff] [blame] | 6 | bootblock-y += i2c.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 7 | bootblock-y += dma.c |
Julius Werner | edf6b57 | 2013-10-25 17:49:26 -0700 | [diff] [blame] | 8 | bootblock-y += maincpu.S |
Ronald G. Minnich | 3eab7ed | 2013-10-03 17:05:55 -0700 | [diff] [blame] | 9 | bootblock-y += monotonic_timer.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 10 | bootblock-y += power.c |
| 11 | bootblock-y += spi.c |
Gabe Black | 08d5a89 | 2013-10-03 04:35:01 -0700 | [diff] [blame] | 12 | bootblock-y += ../tegra/gpio.c |
Gabe Black | 14eb43b | 2013-10-07 01:57:42 -0700 | [diff] [blame] | 13 | bootblock-y += ../tegra/i2c.c |
Julius Werner | 37d7ac8 | 2014-05-05 18:03:46 -0700 | [diff] [blame] | 14 | bootblock-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c |
Gabe Black | 08d5a89 | 2013-10-03 04:35:01 -0700 | [diff] [blame] | 15 | bootblock-y += ../tegra/pingroup.c |
| 16 | bootblock-y += ../tegra/pinmux.c |
Jimmy Zhang | bf04eda | 2014-02-11 17:21:20 -0800 | [diff] [blame] | 17 | bootblock-y += ../tegra/apbmisc.c |
Gabe Black | 8932f11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 18 | ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y) |
Marc Jones | 595a40c | 2015-02-22 23:07:48 -0700 | [diff] [blame] | 19 | bootblock-$(CONFIG_DRIVERS_UART) += uart.c |
Gabe Black | 8932f11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 20 | endif |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 21 | |
Stefan Reinauer | 77b1655 | 2015-01-14 19:51:47 +0100 | [diff] [blame] | 22 | verstage-y += verstage.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 23 | verstage-y += cbfs.c |
| 24 | verstage-y += dma.c |
| 25 | verstage-y += monotonic_timer.c |
| 26 | verstage-y += spi.c |
Marc Jones | 595a40c | 2015-02-22 23:07:48 -0700 | [diff] [blame] | 27 | verstage-$(CONFIG_DRIVERS_UART) += uart.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 28 | verstage-y += ../tegra/gpio.c |
Daisuke Nojiri | 5799097 | 2014-07-15 19:47:32 -0700 | [diff] [blame] | 29 | verstage-y += ../tegra/i2c.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 30 | verstage-y += ../tegra/pinmux.c |
Daisuke Nojiri | 5799097 | 2014-07-15 19:47:32 -0700 | [diff] [blame] | 31 | verstage-y += clock.c |
| 32 | verstage-y += i2c.c |
Daisuke Nojiri | 1b05d88 | 2014-08-27 11:48:03 -0700 | [diff] [blame] | 33 | verstage-y += cache.c |
Stefan Reinauer | 77b1655 | 2015-01-14 19:51:47 +0100 | [diff] [blame] | 34 | |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 35 | romstage-y += cbfs.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 36 | romstage-y += cbmem.c |
Andrew Bresticker | 24d4f7f | 2013-12-18 22:41:34 -0800 | [diff] [blame] | 37 | romstage-y += clock.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 38 | romstage-y += dma.c |
| 39 | romstage-y += i2c.c |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 40 | romstage-y += monotonic_timer.c |
Gabe Black | 4dc3e28 | 2014-05-06 15:33:37 -0700 | [diff] [blame] | 41 | romstage-y += power.c |
Andrew Bresticker | 24d4f7f | 2013-12-18 22:41:34 -0800 | [diff] [blame] | 42 | romstage-y += sdram.c |
Tom Warren | 64982c50 | 2014-01-23 13:37:50 -0700 | [diff] [blame] | 43 | romstage-y += sdram_lp0.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 44 | romstage-y += spi.c |
| 45 | romstage-y += ../tegra/gpio.c |
| 46 | romstage-y += ../tegra/i2c.c |
Julius Werner | 37d7ac8 | 2014-05-05 18:03:46 -0700 | [diff] [blame] | 47 | romstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 48 | romstage-y += ../tegra/pinmux.c |
Daisuke Nojiri | 1b05d88 | 2014-08-27 11:48:03 -0700 | [diff] [blame] | 49 | romstage-y += cache.c |
Marc Jones | 595a40c | 2015-02-22 23:07:48 -0700 | [diff] [blame] | 50 | romstage-$(CONFIG_DRIVERS_UART) += uart.c |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 51 | |
| 52 | ramstage-y += cbfs.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 53 | ramstage-y += cbmem.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 54 | ramstage-y += clock.c |
Jimmy Zhang | bd5925a | 2014-03-10 12:42:05 -0700 | [diff] [blame] | 55 | ramstage-y += display.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 56 | ramstage-y += dma.c |
| 57 | ramstage-y += i2c.c |
Julius Werner | edf6b57 | 2013-10-25 17:49:26 -0700 | [diff] [blame] | 58 | ramstage-y += maincpu.S |
Gabe Black | 396b072 | 2013-09-26 16:22:09 -0700 | [diff] [blame] | 59 | ramstage-y += monotonic_timer.c |
Tom Warren | 64982c50 | 2014-01-23 13:37:50 -0700 | [diff] [blame] | 60 | ramstage-y += sdram.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 61 | ramstage-y += soc.c |
Hung-Te Lin | 2fc3b62 | 2013-10-21 21:43:03 +0800 | [diff] [blame] | 62 | ramstage-y += sor.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 63 | ramstage-y += spi.c |
Julius Werner | edf6b57 | 2013-10-25 17:49:26 -0700 | [diff] [blame] | 64 | ramstage-y += dp.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 65 | ramstage-y += ../tegra/gpio.c |
| 66 | ramstage-y += ../tegra/i2c.c |
Julius Werner | 37d7ac8 | 2014-05-05 18:03:46 -0700 | [diff] [blame] | 67 | ramstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c |
Gabe Black | d40be11 | 2013-10-09 23:45:07 -0700 | [diff] [blame] | 68 | ramstage-y += ../tegra/pinmux.c |
Hung-Te Lin | 2fc3b62 | 2013-10-21 21:43:03 +0800 | [diff] [blame] | 69 | ramstage-y += ../tegra/usb.c |
Marc Jones | 595a40c | 2015-02-22 23:07:48 -0700 | [diff] [blame] | 70 | ramstage-$(CONFIG_DRIVERS_UART) += uart.c |
Gabe Black | 7980b08 | 2013-09-27 03:06:34 -0700 | [diff] [blame] | 71 | |
Furquan Shaikh | fbff908 | 2014-07-22 15:59:16 -0700 | [diff] [blame] | 72 | rmodules_$(ARCH-romstage-y)-y += monotonic_timer.c |
| 73 | VBOOT_STUB_DEPS += $(obj)/soc/nvidia/tegra124/monotonic_timer.rmodules_$(ARCH-romstage-y).o |
Aaron Durbin | b9597b0 | 2014-03-20 14:59:31 -0500 | [diff] [blame] | 74 | |
Gabe Black | e97b683 | 2013-10-06 06:13:24 -0700 | [diff] [blame] | 75 | CPPFLAGS_common += -Isrc/soc/nvidia/tegra124/include/ |
Ronald G. Minnich | 3eab7ed | 2013-10-03 17:05:55 -0700 | [diff] [blame] | 76 | |
Gabe Black | 7980b08 | 2013-09-27 03:06:34 -0700 | [diff] [blame] | 77 | # We want to grab the bootblock right before it goes into the image and wrap |
| 78 | # it inside a BCT, but ideally we would do that without making special, one |
| 79 | # use modifications to the main ARM Makefile. We do this in two ways. First, |
| 80 | # we copy bootblock.elf to bootblock.raw.elf and allow the %.bin: %.elf |
| 81 | # template rule to turn it into bootblock.raw.bin. This makes sure whatever |
| 82 | # processing is supposed to happen to turn an .elf into a .bin happens. |
| 83 | # |
| 84 | # Second, we add our own rule for creating bootblock.bin from |
| 85 | # bootblock.raw.bin which displaces the template rule. When other rules that |
| 86 | # package up the image pull in bootblock.bin, it will be this wrapped version |
| 87 | # instead of the raw bootblock. |
| 88 | |
| 89 | $(objcbfs)/bootblock.raw.elf: $(objcbfs)/bootblock.elf |
| 90 | cp $< $@ |
| 91 | |
Isaac Christensen | 3a92be7 | 2014-09-08 15:28:17 -0600 | [diff] [blame] | 92 | $(obj)/generated/bct.bin: $(obj)/generated/bct.cfg $(CBOOTIMAGE) |
Gabe Black | 7980b08 | 2013-09-27 03:06:34 -0700 | [diff] [blame] | 93 | @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n" |
| 94 | $(CBOOTIMAGE) -gbct --soc tegra124 $< $@ |
| 95 | |
| 96 | BCT_BIN = $(obj)/generated/bct.bin |
| 97 | BCT_WRAPPER = $(obj)/generated/bct.wrapper |
Isaac Christensen | 3a92be7 | 2014-09-08 15:28:17 -0600 | [diff] [blame] | 98 | $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN) $(CBOOTIMAGE) |
Gabe Black | 7980b08 | 2013-09-27 03:06:34 -0700 | [diff] [blame] | 99 | echo "Version = 1;" > $(BCT_WRAPPER) |
| 100 | echo "Redundancy = 1;" >> $(BCT_WRAPPER) |
| 101 | echo "Bctfile = $(BCT_BIN);" >> $(BCT_WRAPPER) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 102 | echo "BootLoader = $<,$(call loadaddr,bootblock),$(call loadaddr,bootblock),Complete;" >> $(BCT_WRAPPER) |
Gabe Black | 7980b08 | 2013-09-27 03:06:34 -0700 | [diff] [blame] | 103 | @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n" |
| 104 | $(CBOOTIMAGE) $(BCT_WRAPPER) $@ |