The ARM Makefile was copied from x86 and then modified, and as a result it was carrying a lot of baggage. On top of that, the extra complication made it inflexible, and we need a lot of flexiblity in order to support the fact that the Tegra124 starts on an ARMv4 coprocessor instead of one of the ARMv7 main CPUs. Change-Id: Ia6ddc27619bdb51e152ad0c628ad6f3037c103ce Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://chromium-review.googlesource.com/171017 Reviewed-by: Ronald Minnich <rminnich@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 512d942788336c8d52470135b43ee4e6a1c95f6c) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6709 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: David Hendricks <dhendrix@chromium.org>
52 lines
1.8 KiB
Makefile
52 lines
1.8 KiB
Makefile
CBOOTIMAGE = cbootimage
|
|
|
|
bootblock-y += bootblock.c
|
|
bootblock-y += cbfs.c
|
|
bootblock-y += clock.c
|
|
bootblock-y += i2c.c
|
|
bootblock-y += monotonic_timer.c
|
|
bootblock-y += ../tegra/gpio.c
|
|
bootblock-y += ../tegra/i2c.c
|
|
bootblock-y += ../tegra/pingroup.c
|
|
bootblock-y += ../tegra/pinmux.c
|
|
bootblock-y += timer.c
|
|
|
|
romstage-y += cbfs.c
|
|
romstage-y += monotonic_timer.c
|
|
romstage-y += timer.c
|
|
|
|
ramstage-y += cbfs.c
|
|
ramstage-y += monotonic_timer.c
|
|
ramstage-y += timer.c
|
|
|
|
CPPFLAGS_common += -Isrc/soc/nvidia/tegra124/include/
|
|
|
|
# We want to grab the bootblock right before it goes into the image and wrap
|
|
# it inside a BCT, but ideally we would do that without making special, one
|
|
# use modifications to the main ARM Makefile. We do this in two ways. First,
|
|
# we copy bootblock.elf to bootblock.raw.elf and allow the %.bin: %.elf
|
|
# template rule to turn it into bootblock.raw.bin. This makes sure whatever
|
|
# processing is supposed to happen to turn an .elf into a .bin happens.
|
|
#
|
|
# Second, we add our own rule for creating bootblock.bin from
|
|
# bootblock.raw.bin which displaces the template rule. When other rules that
|
|
# package up the image pull in bootblock.bin, it will be this wrapped version
|
|
# instead of the raw bootblock.
|
|
|
|
$(objcbfs)/bootblock.raw.elf: $(objcbfs)/bootblock.elf
|
|
cp $< $@
|
|
|
|
$(obj)/generated/bct.bin: $(obj)/generated/bct.cfg
|
|
@printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
|
|
$(CBOOTIMAGE) -gbct --soc tegra124 $< $@
|
|
|
|
BCT_BIN = $(obj)/generated/bct.bin
|
|
BCT_WRAPPER = $(obj)/generated/bct.wrapper
|
|
$(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN)
|
|
echo "Version = 1;" > $(BCT_WRAPPER)
|
|
echo "Redundancy = 1;" >> $(BCT_WRAPPER)
|
|
echo "Bctfile = $(BCT_BIN);" >> $(BCT_WRAPPER)
|
|
echo "BootLoader = $<,$(CONFIG_BOOTBLOCK_BASE),$(CONFIG_BOOTBLOCK_BASE),Complete;" >> $(BCT_WRAPPER)
|
|
@printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n"
|
|
$(CBOOTIMAGE) $(BCT_WRAPPER) $@
|