blob: e80125e9537bed3e404878ad0960e90526ee7cf5 [file] [log] [blame]
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07001ifeq ($(CONFIG_SOC_NVIDIA_TEGRA124),y)
2
Gabe Black8b685392013-09-29 03:02:55 -07003bootblock-y += bootblock.c
Gabe Black7f074752013-09-29 06:32:27 -07004bootblock-y += bootblock_asm.S
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -07005bootblock-y += clock.c
Gabe Blackd40be112013-10-09 23:45:07 -07006bootblock-y += dma.c
Gabe Black14eb43b2013-10-07 01:57:42 -07007bootblock-y += i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -07008bootblock-y += dma.c
Julius Werneredf6b572013-10-25 17:49:26 -07009bootblock-y += maincpu.S
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -070010bootblock-y += monotonic_timer.c
Gabe Blackd40be112013-10-09 23:45:07 -070011bootblock-y += power.c
12bootblock-y += spi.c
Gabe Black08d5a892013-10-03 04:35:01 -070013bootblock-y += ../tegra/gpio.c
Gabe Black14eb43b2013-10-07 01:57:42 -070014bootblock-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070015bootblock-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Black08d5a892013-10-03 04:35:01 -070016bootblock-y += ../tegra/pingroup.c
17bootblock-y += ../tegra/pinmux.c
Jimmy Zhangbf04eda2014-02-11 17:21:20 -080018bootblock-y += ../tegra/apbmisc.c
Nico Huber755db952018-11-11 01:42:17 +010019bootblock-y += uart.c
Gabe Black396b0722013-09-26 16:22:09 -070020
Stefan Reinauer77b16552015-01-14 19:51:47 +010021verstage-y += verstage.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070022verstage-y += dma.c
23verstage-y += monotonic_timer.c
24verstage-y += spi.c
Nico Huber755db952018-11-11 01:42:17 +010025verstage-y += uart.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070026verstage-y += ../tegra/gpio.c
Daisuke Nojiri57990972014-07-15 19:47:32 -070027verstage-y += ../tegra/i2c.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070028verstage-y += ../tegra/pinmux.c
Daisuke Nojiri57990972014-07-15 19:47:32 -070029verstage-y += clock.c
30verstage-y += i2c.c
Daisuke Nojiri1b05d882014-08-27 11:48:03 -070031verstage-y += cache.c
Stefan Reinauer77b16552015-01-14 19:51:47 +010032
Gabe Blackd40be112013-10-09 23:45:07 -070033romstage-y += cbmem.c
Andrew Bresticker24d4f7f2013-12-18 22:41:34 -080034romstage-y += clock.c
Gabe Blackd40be112013-10-09 23:45:07 -070035romstage-y += dma.c
36romstage-y += i2c.c
Gabe Black396b0722013-09-26 16:22:09 -070037romstage-y += monotonic_timer.c
Gabe Black4dc3e282014-05-06 15:33:37 -070038romstage-y += power.c
Andrew Bresticker24d4f7f2013-12-18 22:41:34 -080039romstage-y += sdram.c
Tom Warren64982c502014-01-23 13:37:50 -070040romstage-y += sdram_lp0.c
Gabe Blackd40be112013-10-09 23:45:07 -070041romstage-y += spi.c
42romstage-y += ../tegra/gpio.c
43romstage-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070044romstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -070045romstage-y += ../tegra/pinmux.c
Daisuke Nojiri1b05d882014-08-27 11:48:03 -070046romstage-y += cache.c
Nico Huber755db952018-11-11 01:42:17 +010047romstage-y += uart.c
Gabe Black396b0722013-09-26 16:22:09 -070048
Gabe Blackd40be112013-10-09 23:45:07 -070049ramstage-y += clock.c
Jimmy Zhangbd5925a2014-03-10 12:42:05 -070050ramstage-y += display.c
Gabe Blackd40be112013-10-09 23:45:07 -070051ramstage-y += dma.c
52ramstage-y += i2c.c
Julius Werneredf6b572013-10-25 17:49:26 -070053ramstage-y += maincpu.S
Gabe Black396b0722013-09-26 16:22:09 -070054ramstage-y += monotonic_timer.c
Tom Warren64982c502014-01-23 13:37:50 -070055ramstage-y += sdram.c
Gabe Blackd40be112013-10-09 23:45:07 -070056ramstage-y += soc.c
Hung-Te Lin2fc3b622013-10-21 21:43:03 +080057ramstage-y += sor.c
Gabe Blackd40be112013-10-09 23:45:07 -070058ramstage-y += spi.c
Julius Werneredf6b572013-10-25 17:49:26 -070059ramstage-y += dp.c
Gabe Blackd40be112013-10-09 23:45:07 -070060ramstage-y += ../tegra/gpio.c
61ramstage-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070062ramstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -070063ramstage-y += ../tegra/pinmux.c
Hung-Te Lin2fc3b622013-10-21 21:43:03 +080064ramstage-y += ../tegra/usb.c
Nico Huber755db952018-11-11 01:42:17 +010065ramstage-y += uart.c
Gabe Black7980b082013-09-27 03:06:34 -070066
Furquan Shaikhfbff9082014-07-22 15:59:16 -070067rmodules_$(ARCH-romstage-y)-y += monotonic_timer.c
Aaron Durbinb9597b02014-03-20 14:59:31 -050068
Gabe Blacke97b6832013-10-06 06:13:24 -070069CPPFLAGS_common += -Isrc/soc/nvidia/tegra124/include/
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -070070
Gabe Black7980b082013-09-27 03:06:34 -070071# 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 Christensen3a92be72014-09-08 15:28:17 -060083$(obj)/generated/bct.bin: $(obj)/generated/bct.cfg $(CBOOTIMAGE)
Gabe Black7980b082013-09-27 03:06:34 -070084 @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
85 $(CBOOTIMAGE) -gbct --soc tegra124 $< $@
86
87BCT_BIN = $(obj)/generated/bct.bin
88BCT_WRAPPER = $(obj)/generated/bct.wrapper
Isaac Christensen3a92be72014-09-08 15:28:17 -060089$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN) $(CBOOTIMAGE)
Gabe Black7980b082013-09-27 03:06:34 -070090 echo "Version = 1;" > $(BCT_WRAPPER)
91 echo "Redundancy = 1;" >> $(BCT_WRAPPER)
92 echo "Bctfile = $(BCT_BIN);" >> $(BCT_WRAPPER)
Julius Wernerec5e5e02014-08-20 15:29:56 -070093 echo "BootLoader = $<,$(call loadaddr,bootblock),$(call loadaddr,bootblock),Complete;" >> $(BCT_WRAPPER)
Gabe Black7980b082013-09-27 03:06:34 -070094 @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
95 $(CBOOTIMAGE) $(BCT_WRAPPER) $@
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070096
97endif