From f8e3b083777844196ecd7b422ff3cfd2df904144 Mon Sep 17 00:00:00 2001
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Date: Fri, 5 May 2017 19:22:54 +0200
Subject: [PATCH] rockchip: board: puma_rk3399: build FIT image via u-boot.itb

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
---
 board/theobroma-systems/puma_rk3399/README | 5 ++---
 configs/puma-rk3399_defconfig              | 1 +
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/theobroma-systems/puma_rk3399/README b/board/theobroma-systems/puma_rk3399/README
index 1a8d02b480..250e3459a3 100644
--- a/board/theobroma-systems/puma_rk3399/README
+++ b/board/theobroma-systems/puma_rk3399/README
@@ -56,8 +56,7 @@ Package the image
 =================
 
 	> tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin spl.img
-	> tools/mkimage -f board/theobroma/puma_rk3399/fit_spl_atf.its \
-		-E rk3399_bl3x.itb
+	> make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
 
 Flash the image
 ===============
@@ -67,7 +66,7 @@ Copy the SPL to offset 32k and the FIT image containing the payloads
 card.
 
   > dd if=spl.img of=/dev/sdb seek=64
-  > dd if=rk3399_bl3x.itb of=/dev/sdb seek=512
+  > dd if=u-boot.itb of=/dev/sdb seek=512
 
 After powering up the board (with the inserted SD card), you should see
 a U-Boot console on UART0 (115200n8).
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
index 08c80efd8b..2dca1682b2 100644
--- a/configs/puma-rk3399_defconfig
+++ b/configs/puma-rk3399_defconfig
@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma"
 CONFIG_FIT=y
 CONFIG_SPL_FIT=y
 CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its"
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 # CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
-- 
2.39.5