[U-Boot] [PATCH v3 0/6] rockchip: rk3399: Make u-boot.itb as BUILD_TARGET

RK3399 TPL changes are merged recently which I was thinking of waiting for next MW. so this series skip binman changes from previous version[1] and have only BUILD_TARGET changes.
BINMAN changes would need another rework, where we need to consider the TPL image as well and that would send separately.
CHanges for v3: - skip binman changes - rebase on u-boot-rockchip/master
[1] https://patchwork.ozlabs.org/cover/1092198/
Jagan Teki (6): Makefile: clean image.map Makefile: clean bl31_*.bin travis.yml: Add pyelftools install entry rockchip: rk3399: Get bl31.elf via BL31 board: puma: Get bl31.bin via BL31 and rk3399m0.bin via PMUM0 Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip
.travis.yml | 1 + Kconfig | 2 +- Makefile | 3 +- arch/arm/mach-rockchip/make_fit_atf.py | 11 ++- .../puma_rk3399/fit_spl_atf.its | 58 ------------ .../puma_rk3399/fit_spl_atf.sh | 94 +++++++++++++++++++ configs/puma-rk3399_defconfig | 2 +- doc/README.rockchip | 14 ++- 8 files changed, 115 insertions(+), 70 deletions(-) delete mode 100644 board/theobroma-systems/puma_rk3399/fit_spl_atf.its create mode 100755 board/theobroma-systems/puma_rk3399/fit_spl_atf.sh

binman tools for creating single image build will create image.map at the end, which has information about binman image node details.
current u-boot, is unable to clean this image.map so add a command entry in clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index d6a6ef19ab..de11446ed3 100644 --- a/Makefile +++ b/Makefile @@ -1813,7 +1813,8 @@ clean: $(clean-dirs) -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \ - -type f -print | xargs rm -f + -type f -print | xargs rm -f \ + image.map
# mrproper - Delete all generated files, including .config #

On 05/08/2019 02:52 AM, Jagan Teki wrote:
binman tools for creating single image build will create image.map at the end, which has information about binman image node details.
current u-boot, is unable to clean this image.map so add a command entry in clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index d6a6ef19ab..de11446ed3 100644 --- a/Makefile +++ b/Makefile @@ -1813,7 +1813,8 @@ clean: $(clean-dirs) -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \
-type f -print | xargs rm -f
-type f -print | xargs rm -f \
image.map
# mrproper - Delete all generated files, including .config #

Rockchip platform has its python script that would generate various bl31_*bin for creating u-boot.itb file by taking bl31.elf as input.
These bl31_*.bin files are generated in u-boot root directory and have no rule to clean it up. so add support for it by adding in command entry of clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index de11446ed3..64c7976f7e 100644 --- a/Makefile +++ b/Makefile @@ -1814,7 +1814,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \ -type f -print | xargs rm -f \ - image.map + bl31_*.bin image.map
# mrproper - Delete all generated files, including .config #

On 05/08/2019 02:52 AM, Jagan Teki wrote:
Rockchip platform has its python script that would generate various bl31_*bin for creating u-boot.itb file by taking bl31.elf as input.
These bl31_*.bin files are generated in u-boot root directory and have no rule to clean it up. so add support for it by adding in command entry of clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index de11446ed3..64c7976f7e 100644 --- a/Makefile +++ b/Makefile @@ -1814,7 +1814,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \ -type f -print | xargs rm -f \
image.map
bl31_*.bin image.map
# mrproper - Delete all generated files, including .config #

Currently rockchip platform is using explicit 'make u-boot.itb' for building u-boot.itb but if we enable CONFIG_BUILD_TARGET as 'u-boot.itb' then the resulting u-boot.itb directly will create by make.
But, that indeed make travis build fail since it require python-pyelftools host package.
So add pyelftools install entry as 'pip install pyelftools', this would create pyelftools on travis host which are required to build rk3399 itb.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- .travis.yml | 1 + 1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml index 8bd49ef1a5..94b795ef21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,7 @@ install: - . /tmp/venv/bin/activate - pip install pytest==2.8.7 - pip install python-subunit + - pip install pyelftools - grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd - grub-mkimage -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd - mkdir ~/grub2-arm

On 05/08/2019 02:52 AM, Jagan Teki wrote:
Currently rockchip platform is using explicit 'make u-boot.itb' for building u-boot.itb but if we enable CONFIG_BUILD_TARGET as 'u-boot.itb' then the resulting u-boot.itb directly will create by make.
But, that indeed make travis build fail since it require python-pyelftools host package.
So add pyelftools install entry as 'pip install pyelftools', this would create pyelftools on travis host which are required to build rk3399 itb.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
.travis.yml | 1 + 1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml index 8bd49ef1a5..94b795ef21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,7 @@ install:
- . /tmp/venv/bin/activate
- pip install pytest==2.8.7
- pip install python-subunit
- pip install pyelftools
- grub-mkimage -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- grub-mkimage -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
- mkdir ~/grub2-arm

Right now rockchip platform need to copy bl31.elf into u-boot source directory to make use of building u-boot.itb.
So, add environment variable BL31 like Allwinner SoC so-that the bl31.elf would available via BL31.
If the builds are not exporting BL31 env, the make_fit_atf.py explicitly create dummy bl31.elf in u-boot root directory to satisfy travis builds and it will show the warning on console as
WARNING: BL31 file bl31.elf NOT found, resulting binary is non-functional WARNING: Please read Building section in doc/README.rockchip
Note, that the dummy bl31 files were created during not exporting BL31 case would be removed via clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Makefile | 2 +- arch/arm/mach-rockchip/make_fit_atf.py | 11 ++++++++++- doc/README.rockchip | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 64c7976f7e..c5078b95b7 100644 --- a/Makefile +++ b/Makefile @@ -1814,7 +1814,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \ -type f -print | xargs rm -f \ - bl31_*.bin image.map + bl31.c bl31.elf bl31_*.bin image.map
# mrproper - Delete all generated files, including .config # diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d1faff1957..327875d87b 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -10,6 +10,7 @@ usage: $0 <dt_name> [<dt_name> [<dt_name] ...] import os import sys import getopt +import logging
# pip install pyelftools from elftools.elf.elffile import ELFFile @@ -194,8 +195,16 @@ def get_bl31_segments_info(bl31_file_name):
def main(): uboot_elf="./u-boot" - bl31_elf="./bl31.elf" FIT_ITS=sys.stdout + if "BL31" in os.environ: + bl31_elf=os.getenv("BL31"); + else: + os.system("echo 'int main(){}' > bl31.c") + os.system("${CROSS_COMPILE}gcc -c bl31.c -o bl31.elf") + bl31_elf="./bl31.elf" + logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) + logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional') + logging.warning(' Please read Building section in doc/README.rockchip')
opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h") for opt, val in opts: diff --git a/doc/README.rockchip b/doc/README.rockchip index ca4d6473b0..98a3824e2c 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -149,8 +149,8 @@ For example: => make realclean => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
- (copy bl31.elf into U-Boot root dir) - => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot + (export bl31.elf) + => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
- Compile PMU M0 firmware

On 05/08/2019 02:52 AM, Jagan Teki wrote:
Right now rockchip platform need to copy bl31.elf into u-boot source directory to make use of building u-boot.itb.
So, add environment variable BL31 like Allwinner SoC so-that the bl31.elf would available via BL31.
If the builds are not exporting BL31 env, the make_fit_atf.py explicitly create dummy bl31.elf in u-boot root directory to satisfy travis builds and it will show the warning on console as
WARNING: BL31 file bl31.elf NOT found, resulting binary is non-functional WARNING: Please read Building section in doc/README.rockchip
Note, that the dummy bl31 files were created during not exporting BL31 case would be removed via clean target in Makefile.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Makefile | 2 +- arch/arm/mach-rockchip/make_fit_atf.py | 11 ++++++++++- doc/README.rockchip | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 64c7976f7e..c5078b95b7 100644 --- a/Makefile +++ b/Makefile @@ -1814,7 +1814,7 @@ clean: $(clean-dirs) -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' ) \ -type f -print | xargs rm -f \
bl31_*.bin image.map
bl31.c bl31.elf bl31_*.bin image.map
# mrproper - Delete all generated files, including .config # diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py index d1faff1957..327875d87b 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.py +++ b/arch/arm/mach-rockchip/make_fit_atf.py @@ -10,6 +10,7 @@ usage: $0 <dt_name> [<dt_name> [<dt_name] ...] import os import sys import getopt +import logging
# pip install pyelftools from elftools.elf.elffile import ELFFile @@ -194,8 +195,16 @@ def get_bl31_segments_info(bl31_file_name):
def main(): uboot_elf="./u-boot"
- bl31_elf="./bl31.elf" FIT_ITS=sys.stdout
if "BL31" in os.environ:
bl31_elf=os.getenv("BL31");
else:
os.system("echo 'int main(){}' > bl31.c")
os.system("${CROSS_COMPILE}gcc -c bl31.c -o bl31.elf")
bl31_elf="./bl31.elf"
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
logging.warning(' BL31 file bl31.elf NOT found, resulting binary is non-functional')
logging.warning(' Please read Building section in doc/README.rockchip')
opts, args = getopt.getopt(sys.argv[1:], "o:u:b:h") for opt, val in opts:
diff --git a/doc/README.rockchip b/doc/README.rockchip index ca4d6473b0..98a3824e2c 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -149,8 +149,8 @@ For example: => make realclean => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399
- (copy bl31.elf into U-Boot root dir)
- => cp build/rk3399/release/bl31/bl31.elf /path/to/u-boot
(export bl31.elf)
=> export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
- Compile PMU M0 firmware

Right now puma rk3399 board need to copy bl31-rk3399.bin and rk3399m0.bin into u-boot source directory to make use of building u-boot.itb.
So, add environment variable - BL31 for bl31.bin (instead of bl31-rk3399.bin to compatible with other platform BL31 env) - PMUM0 for rk3399m0.bin
If the builds are not exporting BL31, PMUM0 env, the fit_spl_atf.sh will notify with warning about which document to refer for more information like this:
WARNING: BL31 file bl31.bin NOT found, resulting binary is non-functional Please read Building section in doc/README.rockchip WARNING: PMUM0 file rk3399m0.bin NOT found, resulting binary is non-functional Please read Building section in doc/README.rockchip
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- .../puma_rk3399/fit_spl_atf.its | 58 ------------ .../puma_rk3399/fit_spl_atf.sh | 94 +++++++++++++++++++ configs/puma-rk3399_defconfig | 2 +- doc/README.rockchip | 8 +- 4 files changed, 99 insertions(+), 63 deletions(-) delete mode 100644 board/theobroma-systems/puma_rk3399/fit_spl_atf.its create mode 100755 board/theobroma-systems/puma_rk3399/fit_spl_atf.sh
diff --git a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its b/board/theobroma-systems/puma_rk3399/fit_spl_atf.its deleted file mode 100644 index 530f059f3d..0000000000 --- a/board/theobroma-systems/puma_rk3399/fit_spl_atf.its +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ OR X11 */ -/* - * Copyright (C) 2017 Theobroma Systems Design und Consulting GmbH - * - * Minimal dts for a SPL FIT image payload. - */ - -/dts-v1/; - -/ { - description = "FIT image with U-Boot proper, ATF bl31, M0 Firmware, DTB"; - #address-cells = <1>; - - images { - uboot { - description = "U-Boot (64-bit)"; - data = /incbin/("../../../u-boot-nodtb.bin"); - type = "standalone"; - os = "U-Boot"; - arch = "arm64"; - compression = "none"; - load = <0x00200000>; - }; - atf { - description = "ARM Trusted Firmware"; - data = /incbin/("../../../bl31-rk3399.bin"); - type = "firmware"; - arch = "arm64"; - os = "arm-trusted-firmware"; - compression = "none"; - load = <0x1000>; - entry = <0x1000>; - }; - pmu { - description = "Cortex-M0 firmware"; - data = /incbin/("../../../rk3399m0.bin"); - type = "pmu-firmware"; - compression = "none"; - load = <0x180000>; - }; - fdt { - description = "RK3399-Q7 (Puma) flat device-tree"; - data = /incbin/("../../../u-boot.dtb"); - type = "flat_dt"; - compression = "none"; - }; - }; - - configurations { - default = "conf"; - conf { - description = "Theobroma Systems RK3399-Q7 (Puma) SoM"; - firmware = "atf"; - loadables = "uboot", "pmu"; - fdt = "fdt"; - }; - }; -}; diff --git a/board/theobroma-systems/puma_rk3399/fit_spl_atf.sh b/board/theobroma-systems/puma_rk3399/fit_spl_atf.sh new file mode 100755 index 0000000000..420e7daf4c --- /dev/null +++ b/board/theobroma-systems/puma_rk3399/fit_spl_atf.sh @@ -0,0 +1,94 @@ +#!/bin/sh +# +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2019 Jagan Teki jagan@amarulasolutions.com +# +# Based on the board/sunxi/mksunxi_fit_atf.sh +# +# Script to generate FIT image source for 64-bit puma boards with +# U-Boot proper, ATF, PMU firmware and devicetree. +# +# usage: $0 <dt_name> [<dt_name> [<dt_name] ...] + +[ -z "$BL31" ] && BL31="bl31.bin" + +if [ ! -f $BL31 ]; then + echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2 + echo "Please read Building section in doc/README.rockchip" >&2 + BL31=/dev/null +fi + +[ -z "$PMUM0" ] && PMUM0="rk3399m0.bin" + +if [ ! -f $PMUM0 ]; then + echo "WARNING: PMUM0 file $PMUM0 NOT found, resulting binary is non-functional" >&2 + echo "Please read Building section in doc/README.rockchip" >&2 + PMUM0=/dev/null +fi + +cat << __HEADER_EOF +/* SPDX-License-Identifier: GPL-2.0+ OR X11 */ +/* + * Copyright (C) 2017 Theobroma Systems Design und Consulting GmbH + * + * Minimal dts for a SPL FIT image payload. + */ + +/dts-v1/; + +/ { + description = "FIT image with U-Boot proper, ATF bl31, M0 Firmware, DTB"; + #address-cells = <1>; + + images { + uboot { + description = "U-Boot (64-bit)"; + data = /incbin/("u-boot-nodtb.bin"); + type = "standalone"; + arch = "arm64"; + compression = "none"; + load = <0x4a000000>; + }; + atf { + description = "ARM Trusted Firmware"; + data = /incbin/("$BL31"); + type = "firmware"; + arch = "arm64"; + os = "arm-trusted-firmware"; + compression = "none"; + load = <0x1000>; + entry = <0x1000>; + }; + pmu { + description = "Cortex-M0 firmware"; + data = /incbin/("$PMUM0"); + type = "pmu-firmware"; + compression = "none"; + load = <0x180000>; + }; + fdt { + description = "RK3399-Q7 (Puma) flat device-tree"; + data = /incbin/("u-boot.dtb"); + type = "flat_dt"; + compression = "none"; + }; +__HEADER_EOF + +cat << __CONF_HEADER_EOF + }; + + configurations { + default = "conf"; + conf { + description = "Theobroma Systems RK3399-Q7 (Puma) SoM"; + firmware = "atf"; + loadables = "uboot", "pmu"; + fdt = "fdt"; + }; +__CONF_HEADER_EOF + +cat << __ITS_EOF + }; +}; +__ITS_EOF diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index 03f0bfdb59..ebc78fb216 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -15,7 +15,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEBUG_UART=y -CONFIG_SPL_FIT_SOURCE="board/theobroma-systems/puma_rk3399/fit_spl_atf.its" +CONFIG_SPL_FIT_GENERATOR="board/theobroma-systems/puma_rk3399/fit_spl_atf.sh" CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-puma-haikou.dtb" CONFIG_MISC_INIT_R=y # CONFIG_DISPLAY_CPUINFO is not set diff --git a/doc/README.rockchip b/doc/README.rockchip index 98a3824e2c..88a4593392 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -137,8 +137,8 @@ For example: => cd arm-trusted-firmware => make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
- (copy bl31.bin into U-Boot root dir) - => cp build/rk3399/release/bl31/bl31.bin /path/to/u-boot/bl31-rk3399.bin + (export bl31.bin) + => export BL31=/path/to/arm-trusted-firmware/build/rk3399/release/bl31/bl31.bin
For rest of rk3399 boards.
@@ -162,8 +162,8 @@ For example: (export cross compiler path for Cortex-M0 PMU) => make CROSS_COMPILE=arm-cortex_m0-eabi-
- (copy rk3399m0.bin into U-Boot root dir) - => cp rk3399m0.bin /path/to/u-boot + (export rk3399m0.bin) + => export PMUM0=/path/to/rk3399-cortex-m0/rk3399m0.bin
- Compile U-Boot

Add u-boot.itb BUILD_TARGET for Rockchip platform when SPL_LOAD_FIT is being used.
This can get rid of building itb explicitly with 'make u-boot.itb' so, from now all required images will build just by make.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com --- Kconfig | 2 +- doc/README.rockchip | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/Kconfig b/Kconfig index 91c1082ace..6bcff29659 100644 --- a/Kconfig +++ b/Kconfig @@ -240,7 +240,7 @@ config BUILD_TARGET default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5 default "u-boot-spl.kwb" if ARCH_MVEBU && SPL default "u-boot-elf.srec" if RCAR_GEN3 - default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI + default "u-boot.itb" if SPL_LOAD_FIT && (ROCKCHIP_RK3399 || ARCH_SUNXI) default "u-boot.kwb" if KIRKWOOD default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT help diff --git a/doc/README.rockchip b/doc/README.rockchip index 88a4593392..c4e5f83da7 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -103,7 +103,6 @@ For example: => cd /path/to/u-boot => make nanopi-neo4-rk3399_defconfig => make - => make u-boot.itb
- Get the rkbin
@@ -170,7 +169,6 @@ For example: => cd /path/to/u-boot => make orangepi-rk3399_defconfig => make - => make u-boot.itb
(Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL)

On 05/08/2019 02:52 AM, Jagan Teki wrote:
Add u-boot.itb BUILD_TARGET for Rockchip platform when SPL_LOAD_FIT is being used.
This can get rid of building itb explicitly with 'make u-boot.itb' so, from now all required images will build just by make.
Signed-off-by: Jagan Teki jagan@amarulasolutions.com
Reviewed-by: Kever Yang kever.yang@rock-chips.com
Thanks, - Kever
Kconfig | 2 +- doc/README.rockchip | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/Kconfig b/Kconfig index 91c1082ace..6bcff29659 100644 --- a/Kconfig +++ b/Kconfig @@ -240,7 +240,7 @@ config BUILD_TARGET default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_GEN5 default "u-boot-spl.kwb" if ARCH_MVEBU && SPL default "u-boot-elf.srec" if RCAR_GEN3
- default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI
- default "u-boot.itb" if SPL_LOAD_FIT && (ROCKCHIP_RK3399 || ARCH_SUNXI) default "u-boot.kwb" if KIRKWOOD default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT help
diff --git a/doc/README.rockchip b/doc/README.rockchip index 88a4593392..c4e5f83da7 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -103,7 +103,6 @@ For example: => cd /path/to/u-boot => make nanopi-neo4-rk3399_defconfig => make
=> make u-boot.itb
- Get the rkbin
@@ -170,7 +169,6 @@ For example: => cd /path/to/u-boot => make orangepi-rk3399_defconfig => make
=> make u-boot.itb (Get spl/u-boot-spl-dtb.bin, u-boot.itb images and some boards would get spl/u-boot-spl.bin since it doesn't enable CONFIG_SPL_OF_CONTROL)

Hi Kever,
On Wed, May 8, 2019 at 12:23 AM Jagan Teki jagan@amarulasolutions.com wrote:
RK3399 TPL changes are merged recently which I was thinking of waiting for next MW. so this series skip binman changes from previous version[1] and have only BUILD_TARGET changes.
BINMAN changes would need another rework, where we need to consider the TPL image as well and that would send separately.
CHanges for v3:
- skip binman changes
- rebase on u-boot-rockchip/master
[1] https://patchwork.ozlabs.org/cover/1092198/
Jagan Teki (6): Makefile: clean image.map Makefile: clean bl31_*.bin travis.yml: Add pyelftools install entry rockchip: rk3399: Get bl31.elf via BL31 board: puma: Get bl31.bin via BL31 and rk3399m0.bin via PMUM0 Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip
I think you hold for this with puma changes? any further comments please let me know.

Hi Jagan,
On 06/13/2019 02:53 PM, Jagan Teki wrote:
Hi Kever,
On Wed, May 8, 2019 at 12:23 AM Jagan Teki jagan@amarulasolutions.com wrote:
RK3399 TPL changes are merged recently which I was thinking of waiting for next MW. so this series skip binman changes from previous version[1] and have only BUILD_TARGET changes.
BINMAN changes would need another rework, where we need to consider the TPL image as well and that would send separately.
CHanges for v3:
- skip binman changes
- rebase on u-boot-rockchip/master
[1] https://patchwork.ozlabs.org/cover/1092198/
Jagan Teki (6): Makefile: clean image.map Makefile: clean bl31_*.bin travis.yml: Add pyelftools install entry rockchip: rk3399: Get bl31.elf via BL31 board: puma: Get bl31.bin via BL31 and rk3399m0.bin via PMUM0 Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip
I think you hold for this with puma changes? any further comments please let me know.
Yes, one reason is not get response from puma board. And I think this does not break the board support but maybe break the build process if not all the environment has export as expected?
Thanks, - Kever

On Tue, Jun 18, 2019 at 12:40 PM Kever Yang kever.yang@rock-chips.com wrote:
Hi Jagan,
On 06/13/2019 02:53 PM, Jagan Teki wrote:
Hi Kever,
On Wed, May 8, 2019 at 12:23 AM Jagan Teki jagan@amarulasolutions.com wrote:
RK3399 TPL changes are merged recently which I was thinking of waiting for next MW. so this series skip binman changes from previous version[1] and have only BUILD_TARGET changes.
BINMAN changes would need another rework, where we need to consider the TPL image as well and that would send separately.
CHanges for v3:
- skip binman changes
- rebase on u-boot-rockchip/master
[1] https://patchwork.ozlabs.org/cover/1092198/
Jagan Teki (6): Makefile: clean image.map Makefile: clean bl31_*.bin travis.yml: Add pyelftools install entry rockchip: rk3399: Get bl31.elf via BL31 board: puma: Get bl31.bin via BL31 and rk3399m0.bin via PMUM0 Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip
I think you hold for this with puma changes? any further comments please let me know.
Yes, one reason is not get response from puma board. And I think this does not break the board support but maybe break the build process if not all the environment has export as expected?
It can't break the build, for not exporting cases the script will create dummy bl31 elf and the bl31 variable assign it and finally trigger warning. fyi, the else statement on this patch [1] does what I mentioned.

On 06/18/2019 03:16 PM, Jagan Teki wrote:
On Tue, Jun 18, 2019 at 12:40 PM Kever Yang kever.yang@rock-chips.com wrote:
Hi Jagan,
On 06/13/2019 02:53 PM, Jagan Teki wrote:
Hi Kever,
On Wed, May 8, 2019 at 12:23 AM Jagan Teki jagan@amarulasolutions.com wrote:
RK3399 TPL changes are merged recently which I was thinking of waiting for next MW. so this series skip binman changes from previous version[1] and have only BUILD_TARGET changes.
BINMAN changes would need another rework, where we need to consider the TPL image as well and that would send separately.
CHanges for v3:
- skip binman changes
- rebase on u-boot-rockchip/master
[1] https://patchwork.ozlabs.org/cover/1092198/
Jagan Teki (6): Makefile: clean image.map Makefile: clean bl31_*.bin travis.yml: Add pyelftools install entry rockchip: rk3399: Get bl31.elf via BL31 board: puma: Get bl31.bin via BL31 and rk3399m0.bin via PMUM0 Kconfig: Add u-boot.itb BUILD_TARGET for Rockchip
I think you hold for this with puma changes? any further comments please let me know.
Yes, one reason is not get response from puma board. And I think this does not break the board support but maybe break the build process if not all the environment has export as expected?
It can't break the build, for not exporting cases the script will create dummy bl31 elf
Could you create dummy bl31.elf after check if there is one already there, which is what we used to do instead of use BL31 env, and then this won't break anything and we can migrate to use BL31 smoothly.
Thanks, - Kever
and the bl31 variable assign it and finally trigger warning. fyi, the else statement on this patch [1] does what I mentioned.
[1] https://patchwork.ozlabs.org/patch/1096505/
Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
participants (2)
-
Jagan Teki
-
Kever Yang