diff mbox series

[U-Boot,PATCHv2,01/14] powerpc: mpc85xx: Add device tree support option for PBL boot image

Message ID 20190820093536.39407-2-Zhiqiang.Hou@nxp.com
State Accepted
Commit bcda5b0df329568ca35dfbdb536605729df4cc67
Delegated to: Prabhakar Kushwaha
Headers show
Series powerpc: Enable device tree support | expand

Commit Message

Z.Q. Hou Aug. 20, 2019, 9:35 a.m. UTC
The current Makefile always use u-boot.bin to generate
PBL boot image (u-boot.pbl), this patch changes it to
use u-boot-with-dtb.bin to support device tree when
CONFIG_OF_SEPARATE is enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - New patch.

 Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 059978b..a70a0d0 100644
--- a/Makefile
+++ b/Makefile
@@ -1247,8 +1247,14 @@  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
 
+ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
+UBOOT_BIN := u-boot-with-dtb.bin
+else
+UBOOT_BIN := u-boot.bin
+endif
+
 u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
-		$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
+		$(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,$(UBOOT_BIN)) FORCE
 	$(call if_changed,mkimage)
 	$(BOARD_SIZE_CHECK)