Skip to contentSkip to conversation

Kconfig: Add u-boot.itb BUILD_TARGET for RK3368/3399

PATCH Superseded Jagan Teki 2 participants 2 messages Jan 17, 2019 – Jan 18, 2019 Arm Rockchip

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 2/2 Kconfig: Add u-boot.itb BUILD_TARGET for RK3368/3399

Add u-boot.itb BUILD_TARGET for Rockchip RK3368 and RK3399 SoC, this can get rid of building itb explicitly with 'make u-boot.itb' all required images will now build just by make.

---
 Kconfig                                    | 1 +
 board/rockchip/evb_rk3399/README           | 1 -
 board/theobroma-systems/lion_rk3368/README | 9 ++-------
 board/theobroma-systems/puma_rk3399/README | 1 -
 board/vamrs/rock960_rk3399/README          | 1 -
 5 files changed, 3 insertions(+), 10 deletions(-)
Kconfig +1 -0
index 3a3a8d4d5b..247ace3ce0 100644
@@ -230,6 +230,7 @@ config BUILD_TARGET
 	default "u-boot-spl.kwb" if ARCH_MVEBU && SPL_BUILD
 	default "u-boot-elf.srec" if RCAR_GEN3
 	default "u-boot.itb" if ARCH_SUNXI && ARM64
+	default "u-boot.itb" if ROCKCHIP_RK3368 || ROCKCHIP_RK3399
 	help
 	  Some SoCs need special image types (e.g. U-Boot binary
 	  with a special header) as build targets. By defining
board/rockchip/evb_rk3399/README +0 -1
index 8321467046..c388f269c1 100644
@@ -58,7 +58,6 @@ Compile the U-Boot
   for firefly-rk3399, use below instead:
   > make firefly-rk3399_defconfig
   > make
-  > make u-boot.itb
 
   Get spl/u-boot-spl.bin and u-boot.itb in this step.
 
board/theobroma-systems/lion_rk3368/README +2 -7
index 83e4332984..241d4d9ec8 100644
@@ -14,18 +14,13 @@ Configure U-Boot
   > cd ../u-boot
   > make lion-rk3368_defconfig
 
-Build the TPL/SPL stage
-=======================
+Build the TPL/SPL, U-Boot proper and a FIT image including the ATF
+==================================================================
 
   > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm
   > tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img
   > cat spl/u-boot-spl-dtb.bin >> spl-3368.img
 
-Build the full U-Boot and a FIT image including the ATF
-=======================================================
-
-  > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm u-boot.itb
-
 Flash the image
 ===============
 
board/theobroma-systems/puma_rk3399/README +0 -1
index f67dfb451f..c06c9650b8 100644
@@ -60,7 +60,6 @@ Creating a SPL image for SD-Card/eMMC
 Creating a SPL image for SPI-NOR
   > tools/mkimage -n rk3399 -T rkspi -d spl/u-boot-spl.bin spl_nor.img
 Create the FIT image containing U-Boot proper, ATF, M0 Firmware, devicetree
-  > make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
 
 Flash the image
 ===============
board/vamrs/rock960_rk3399/README +0 -1
index d14399090e..c5c675c4ea 100644
@@ -61,7 +61,6 @@ Compile the U-Boot
   > export CROSS_COMPILE=aarch64-linux-gnu-
   > make rock960-rk3399_defconfig
   > make
-  > make u-boot.itb
 
 Compile the rkdeveloptool
 =========================
Signature · 1 line
2.18.0.321.gffc6fa0e3
#1 lore raw

PATCH 2/2 Kconfig: Add u-boot.itb BUILD_TARGET for RK3368/3399

Hi Jagan,

This is the patch I'm looking for, I try to enable u-boot.itb build but I failed with modify the legacy Makefile, thanks.

Quoted 19 lines · Jagan Teki

Add u-boot.itb BUILD_TARGET for Rockchip RK3368 and RK3399 SoC, this can get rid of building itb explicitly with 'make u-boot.itb' all required images will now build just by make.

---
 Kconfig                                    | 1 +
 board/rockchip/evb_rk3399/README           | 1 -
 board/theobroma-systems/lion_rk3368/README | 9 ++-------
 board/theobroma-systems/puma_rk3399/README | 1 -
 board/vamrs/rock960_rk3399/README          | 1 -
 5 files changed, 3 insertions(+), 10 deletions(-)
Kconfig +0 -0
index 3a3a8d4d5b..247ace3ce0 100644

Kconfig config BUILD_TARGET · line 233

Quoted 4 lines
Kconfig +1 -0
@@ -230,6 +230,7 @@ config BUILD_TARGET
 	default "u-boot-spl.kwb" if ARCH_MVEBU && SPL_BUILD
 	default "u-boot-elf.srec" if RCAR_GEN3
 	default "u-boot.itb" if ARCH_SUNXI && ARM64
+	default "u-boot.itb" if ROCKCHIP_RK3368 || ROCKCHIP_RK3399

Can we use ARCH_ROCKCHIP && CONFIG_SPL_LOAD_FIT instead,
so that we don't limit to these two SoCs, eg. rk3229 also need u-boot.itb while it's loads OP-TEE instead of ATF.

Thanks,
- Kever

Quoted 64 lines
Kconfig +0 -0
 	help
 	  Some SoCs need special image types (e.g. U-Boot binary
 	  with a special header) as build targets. By defining
board/rockchip/evb_rk3399/README +0 -1
index 8321467046..c388f269c1 100644
@@ -58,7 +58,6 @@ Compile the U-Boot
   for firefly-rk3399, use below instead:
   > make firefly-rk3399_defconfig
   > make
-  > make u-boot.itb
 
   Get spl/u-boot-spl.bin and u-boot.itb in this step.
 
board/theobroma-systems/lion_rk3368/README +2 -7
index 83e4332984..241d4d9ec8 100644
@@ -14,18 +14,13 @@ Configure U-Boot
   > cd ../u-boot
   > make lion-rk3368_defconfig
 
-Build the TPL/SPL stage
-=======================
+Build the TPL/SPL, U-Boot proper and a FIT image including the ATF
+==================================================================
 
   > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm
   > tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img
   > cat spl/u-boot-spl-dtb.bin >> spl-3368.img
 
-Build the full U-Boot and a FIT image including the ATF
-=======================================================
-
-  > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm u-boot.itb
-
 Flash the image
 ===============
 
board/theobroma-systems/puma_rk3399/README +0 -1
index f67dfb451f..c06c9650b8 100644
@@ -60,7 +60,6 @@ Creating a SPL image for SD-Card/eMMC
 Creating a SPL image for SPI-NOR
   > tools/mkimage -n rk3399 -T rkspi -d spl/u-boot-spl.bin spl_nor.img
 Create the FIT image containing U-Boot proper, ATF, M0 Firmware, devicetree
-  > make CROSS_COMPILE=aarch64-linux-gnu- u-boot.itb
 
 Flash the image
 ===============
board/vamrs/rock960_rk3399/README +0 -1
index d14399090e..c5c675c4ea 100644
@@ -61,7 +61,6 @@ Compile the U-Boot
   > export CROSS_COMPILE=aarch64-linux-gnu-
   > make rock960-rk3399_defconfig
   > make
-  > make u-boot.itb
 
 Compile the rkdeveloptool
 =========================