blob: 49669ebd838b77326daad2df42a2d5d768520e76 [file] [log] [blame]
Gabe Black8b685392013-09-29 03:02:55 -07001bootblock-y += bootblock.c
Gabe Black7f074752013-09-29 06:32:27 -07002bootblock-y += bootblock_asm.S
Gabe Black396b0722013-09-26 16:22:09 -07003bootblock-y += cbfs.c
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -07004bootblock-y += clock.c
Gabe Blackd40be112013-10-09 23:45:07 -07005bootblock-y += dma.c
Gabe Black14eb43b2013-10-07 01:57:42 -07006bootblock-y += i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -07007bootblock-y += dma.c
Julius Werneredf6b572013-10-25 17:49:26 -07008bootblock-y += maincpu.S
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -07009bootblock-y += monotonic_timer.c
Gabe Blackd40be112013-10-09 23:45:07 -070010bootblock-y += power.c
11bootblock-y += spi.c
Gabe Black08d5a892013-10-03 04:35:01 -070012bootblock-y += ../tegra/gpio.c
Gabe Black14eb43b2013-10-07 01:57:42 -070013bootblock-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070014bootblock-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Black08d5a892013-10-03 04:35:01 -070015bootblock-y += ../tegra/pingroup.c
16bootblock-y += ../tegra/pinmux.c
Jimmy Zhangbf04eda2014-02-11 17:21:20 -080017bootblock-y += ../tegra/apbmisc.c
Gabe Black8932f112013-10-09 23:45:07 -070018ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
Marc Jones595a40c2015-02-22 23:07:48 -070019bootblock-$(CONFIG_DRIVERS_UART) += uart.c
Gabe Black8932f112013-10-09 23:45:07 -070020endif
Gabe Black396b0722013-09-26 16:22:09 -070021
Stefan Reinauer77b16552015-01-14 19:51:47 +010022verstage-y += verstage.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070023verstage-y += cbfs.c
24verstage-y += dma.c
25verstage-y += monotonic_timer.c
26verstage-y += spi.c
Marc Jones595a40c2015-02-22 23:07:48 -070027verstage-$(CONFIG_DRIVERS_UART) += uart.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070028verstage-y += ../tegra/gpio.c
Daisuke Nojiri57990972014-07-15 19:47:32 -070029verstage-y += ../tegra/i2c.c
Daisuke Nojiribcc1d422014-06-19 19:16:24 -070030verstage-y += ../tegra/pinmux.c
Daisuke Nojiri57990972014-07-15 19:47:32 -070031verstage-y += clock.c
32verstage-y += i2c.c
Daisuke Nojiri1b05d882014-08-27 11:48:03 -070033verstage-y += cache.c
Stefan Reinauer77b16552015-01-14 19:51:47 +010034
Gabe Black396b0722013-09-26 16:22:09 -070035romstage-y += cbfs.c
Gabe Blackd40be112013-10-09 23:45:07 -070036romstage-y += cbmem.c
Andrew Bresticker24d4f7f2013-12-18 22:41:34 -080037romstage-y += clock.c
Gabe Blackd40be112013-10-09 23:45:07 -070038romstage-y += dma.c
39romstage-y += i2c.c
Gabe Black396b0722013-09-26 16:22:09 -070040romstage-y += monotonic_timer.c
Gabe Black4dc3e282014-05-06 15:33:37 -070041romstage-y += power.c
Andrew Bresticker24d4f7f2013-12-18 22:41:34 -080042romstage-y += sdram.c
Tom Warren64982c502014-01-23 13:37:50 -070043romstage-y += sdram_lp0.c
Gabe Blackd40be112013-10-09 23:45:07 -070044romstage-y += spi.c
45romstage-y += ../tegra/gpio.c
46romstage-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070047romstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -070048romstage-y += ../tegra/pinmux.c
Daisuke Nojiri1b05d882014-08-27 11:48:03 -070049romstage-y += cache.c
Marc Jones595a40c2015-02-22 23:07:48 -070050romstage-$(CONFIG_DRIVERS_UART) += uart.c
Gabe Black396b0722013-09-26 16:22:09 -070051
52ramstage-y += cbfs.c
Gabe Blackd40be112013-10-09 23:45:07 -070053ramstage-y += cbmem.c
Gabe Blackd40be112013-10-09 23:45:07 -070054ramstage-y += clock.c
Jimmy Zhangbd5925a2014-03-10 12:42:05 -070055ramstage-y += display.c
Gabe Blackd40be112013-10-09 23:45:07 -070056ramstage-y += dma.c
57ramstage-y += i2c.c
Julius Werneredf6b572013-10-25 17:49:26 -070058ramstage-y += maincpu.S
Gabe Black396b0722013-09-26 16:22:09 -070059ramstage-y += monotonic_timer.c
Tom Warren64982c502014-01-23 13:37:50 -070060ramstage-y += sdram.c
Gabe Blackd40be112013-10-09 23:45:07 -070061ramstage-y += soc.c
Hung-Te Lin2fc3b622013-10-21 21:43:03 +080062ramstage-y += sor.c
Gabe Blackd40be112013-10-09 23:45:07 -070063ramstage-y += spi.c
Julius Werneredf6b572013-10-25 17:49:26 -070064ramstage-y += dp.c
Gabe Blackd40be112013-10-09 23:45:07 -070065ramstage-y += ../tegra/gpio.c
66ramstage-y += ../tegra/i2c.c
Julius Werner37d7ac82014-05-05 18:03:46 -070067ramstage-$(CONFIG_SOFTWARE_I2C) += ../tegra/software_i2c.c
Gabe Blackd40be112013-10-09 23:45:07 -070068ramstage-y += ../tegra/pinmux.c
Hung-Te Lin2fc3b622013-10-21 21:43:03 +080069ramstage-y += ../tegra/usb.c
Marc Jones595a40c2015-02-22 23:07:48 -070070ramstage-$(CONFIG_DRIVERS_UART) += uart.c
Gabe Black7980b082013-09-27 03:06:34 -070071
Furquan Shaikhfbff9082014-07-22 15:59:16 -070072rmodules_$(ARCH-romstage-y)-y += monotonic_timer.c
73VBOOT_STUB_DEPS += $(obj)/soc/nvidia/tegra124/monotonic_timer.rmodules_$(ARCH-romstage-y).o
Aaron Durbinb9597b02014-03-20 14:59:31 -050074
Gabe Blacke97b6832013-10-06 06:13:24 -070075CPPFLAGS_common += -Isrc/soc/nvidia/tegra124/include/
Ronald G. Minnich3eab7ed2013-10-03 17:05:55 -070076
Gabe Black7980b082013-09-27 03:06:34 -070077# 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 Christensen3a92be72014-09-08 15:28:17 -060092$(obj)/generated/bct.bin: $(obj)/generated/bct.cfg $(CBOOTIMAGE)
Gabe Black7980b082013-09-27 03:06:34 -070093 @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
94 $(CBOOTIMAGE) -gbct --soc tegra124 $< $@
95
96BCT_BIN = $(obj)/generated/bct.bin
97BCT_WRAPPER = $(obj)/generated/bct.wrapper
Isaac Christensen3a92be72014-09-08 15:28:17 -060098$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN) $(CBOOTIMAGE)
Gabe Black7980b082013-09-27 03:06:34 -070099 echo "Version = 1;" > $(BCT_WRAPPER)
100 echo "Redundancy = 1;" >> $(BCT_WRAPPER)
101 echo "Bctfile = $(BCT_BIN);" >> $(BCT_WRAPPER)
Julius Wernerec5e5e02014-08-20 15:29:56 -0700102 echo "BootLoader = $<,$(call loadaddr,bootblock),$(call loadaddr,bootblock),Complete;" >> $(BCT_WRAPPER)
Gabe Black7980b082013-09-27 03:06:34 -0700103 @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
104 $(CBOOTIMAGE) $(BCT_WRAPPER) $@