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