[PATCH v7 0/8] migrate u-boot-rockchip.bin to binman and generate an image for SPI

Kever Yang kever.yang at rock-chips.com
Sat Sep 3 05:59:26 CEST 2022


Hi Quentin,

I got below error for SoCs other than rk3399, eg. rk3308, rk3568, rk3328 
and etc.

+binman: Device tree 'u-boot.dtb' does not have a 'binman' node
+make[1]: *** [Makefile:1113: all] Error 1
+make: *** [Makefile:177: sub-make] Error 2

Thanks,

- Kever

On 2022/9/2 21:10, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz at theobroma-systems.com>
>
> This migrates the generation of u-boot-rockchip.bin from Makefile to binman
> completely.
>
> This also adds support for generating the same kind of image than
> u-boot-rockchip.bin but for SPI flashes (specifically, a different image
> type generated by mkimage is necessary, in addition to a different
> offset in the storage medium).
>
> This has been tested on Puma RK3399 with patch series from https://lore.kernel.org/u-boot/20220722160655.3904213-1-foss+uboot@0leil.net/#b (plus https://lore.kernel.org/u-boot/20220722113505.3875669-4-foss+uboot@0leil.net/).
>
> Cheers,
> Quentin
>
> v7:
>   - added missing rockchip-u-boot.dtsi for binman images to fix builds,
> All Rockchip boards build tested with:
>   #!/bin/sh
>   
>   for conf in $(ag -Rl ARCH_ROCKCHIP configs); do
> 	git clean -ffdx > /dev/null
>   	cp ../bl31.elf .
>   	echo -n $conf=
>   	make $(basename "$conf") > /dev/null
>   	if grep -q -E "^CONFIG_ARM64=y" .config; then
>   		CROSS_COMPILE="aarch64-linux-gnu-"
>   	else
>   		CROSS_COMPILE="arm-linux-gnu-"
>   	fi
>   	make CROSS_COMPILE="ccache $CROSS_COMPILE" -j$(nproc) > /dev/null 2>&1
>   	echo $?
>   done
>
> v6:
>   - rebased on u-boot-dm/master,
>   - added test for mkimage multiple data files with one data file having
>   no content,
>   - added SPDX license for unit tests,
>   - re-ordered tests and renamed test files accordingly,
>   - added Rb,
>
> v5:
>   - rebased on latest master,
>   - added binman test for mkimage multiple data files,
>   - fixed mkimage data files to pass full paths to input files to
>   mkimage,
>
> v4:
>   - added binman test for mkimage filename,
>   - fixed >80 chars line in patch 2/8 binman: allow user-defined filenames for
>   mkimage entry,
>   - fixed wrong location for endif in patch 6/8 simplify binman image
>   dependencies addition to INPUTS,
>
>
> v3:
>   - removed
>   https://lore.kernel.org/u-boot/20220722113505.3875669-4-foss+uboot@0leil.net/,
>   it'll be added later on in a separate patch series,
>   - added "binman: allow user-defined filenames for mkimage entry,"
>   - kept idbloader.img binary creation even with binman as requested by
>   community,
>   - generate idbloader-spi.img binary with binman,
>   - added "rockchip: remove binman temporary files when cleaning"
>
> v2:
>   - removed patch 4/8 rockchip: pad u-boot-rockchip.bin correctly because
>   it would break partitions table,
>   - rebased on top of master, changes to patch 3/7 rockchip: remove
>   unneeded CONFIG_SPL_PAD_TO compared to the RFC 3/8 rockchip: remove
>   unneeded CONFIG_SPL_PAD_TO,
>
> Quentin Schulz (8):
>    binman: add support for skipping file concatenation for mkimage
>    binman: allow user-defined filenames for mkimage entry
>    rockchip: remove binman temporary files when cleaning
>    rockchip: generate idbloader.img content for u-boot-rockchip.bin with
>      binman for ARM
>    rockchip: generate u-boot-rockchip.bin with binman for ARM64 boards
>    rockchip: simplify binman image dependencies addition to INPUTS
>    rockchip: allow to build SPI images even without HAS_ROM option
>    rockchip: add u-boot-rockchip-spi.bin image for booting from SPI-NOR
>      flash
>
>   Makefile                                      | 41 +++------------
>   arch/arm/Kconfig                              |  2 +-
>   arch/arm/dts/px30-u-boot.dtsi                 |  2 +
>   arch/arm/dts/rk3288-u-boot.dtsi               |  2 +-
>   arch/arm/dts/rk3308-u-boot.dtsi               |  2 +
>   arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi    |  2 +
>   arch/arm/dts/rk3328-u-boot.dtsi               |  2 +
>   arch/arm/dts/rk3368-u-boot.dtsi               |  1 +
>   arch/arm/dts/rk3399-u-boot.dtsi               |  2 +-
>   arch/arm/dts/rk3568-u-boot.dtsi               |  2 +
>   arch/arm/dts/rockchip-u-boot.dtsi             | 46 +++++++++++++++-
>   arch/arm/mach-rockchip/Kconfig                |  6 +--
>   tools/binman/entries.rst                      | 22 ++++++++
>   tools/binman/etype/mkimage.py                 | 52 ++++++++++++++++---
>   tools/binman/ftest.py                         | 30 +++++++++++
>   tools/binman/test/252_mkimage_mult_data.dts   | 21 ++++++++
>   .../test/253_mkimage_mult_no_content.dts      | 22 ++++++++
>   tools/binman/test/254_mkimage_filename.dts    | 18 +++++++
>   18 files changed, 226 insertions(+), 49 deletions(-)
>   create mode 100644 tools/binman/test/252_mkimage_mult_data.dts
>   create mode 100644 tools/binman/test/253_mkimage_mult_no_content.dts
>   create mode 100644 tools/binman/test/254_mkimage_filename.dts
>


More information about the U-Boot mailing list