summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-22 22:55:57 -0700
committerTom Rini <trini@konsulko.com>2016-03-14 19:18:31 -0400
commitcdf172461caa1a2b29be54438628e4c227956565 (patch)
tree970eff488c533017d3c27ea6161c15ef69308ce2 /Makefile
parentf1dcee59a2afc4cf39699eef7631edbff8693933 (diff)
downloadblackbird-obmc-uboot-cdf172461caa1a2b29be54438628e4c227956565.tar.gz
blackbird-obmc-uboot-cdf172461caa1a2b29be54438628e4c227956565.zip
spl: Add a way to specify a list of device trees to include
When building a FIT, more than one device tree can be included. The board can select (at run-time) the one that it wants. Add a Kconfig option to allow the list of devices trees (supported by the board) to be specified. When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the legacy image format. Include all the listed device tree files in this FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ad9d566dab..8505bccfa1 100644
--- a/Makefile
+++ b/Makefile
@@ -893,9 +893,16 @@ quiet_cmd_cpp_cfg = CFG $@
cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
+ifdef CONFIG_SPL_LOAD_FIT
+MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
+ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
+ -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
+ -b $(patsubst %,arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST)))
+else
MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
+endif
MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img)
@@ -908,7 +915,8 @@ MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \
MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
-u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE
+u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl: \
+ $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
$(call if_changed,mkimage)
u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
OpenPOWER on IntegriCloud