[PATCH v2 00/25] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script

Simon Glass sjg at chromium.org
Thu Feb 24 00:00:15 CET 2022


At present rockchip 64-bit boards make use of a FIT-generator script
written in Python. The script supports splitting an ELF file into several
'loadable' nodes in the FIT. Binman does not current support this feature.

This series adds binman support for ELF splitting. This works by adding a
new 'fit,operation' property to the FIT subnodes, allowing this new way of
generating nodes.

Some other fixes and improvements are needed along the way.

A new, common binman description is added for 64-bit boards which includes
the required u-boot.itb file.

The existing script is removed, so that only a few zynq boards are now
using a SPL_FIT_GENERATOR script:

   avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0
   xilinx_zynqmp_virt

Migration of those is hopefully in progress.

Note however that tools/k3_fit_atf.sh remains, used by a few boards that
enable CONFIG_TI_SECURE_DEVICE so this series is copied there too:

    am335x_hs_evm
    am335x_hs_evm_uart
    am43xx_hs_evm
    am57xx_hs_evm
    am57xx_hs_evm_usb
    am65x_hs_evm_a53
    am65x_hs_evm_r5
    dra7xx_hs_evm
    dra7xx_hs_evm_usb
    j721e_hs_evm_a72
    j721e_hs_evm_r5
    k2e_hs_evm
    k2g_hs_evm
    k2hk_hs_evm
    k2l_hs_evm

Ivan Mikhaylov has sent a patch to help with these, but I need to take a
look at the testing side. In any case they should really be using binman
for the image generation.

Changes in v2:
- Add new patch to make GetArgs() more flexible
- Add new patch to remove remove_defconfig()
- Add new patch to use re.fullmatch() to avoid extra check
- Add new patch to correct Kconfig help for TPL_BINMAN_SYMBOLS
- Add new patch to tidy up implementaiton of AddStringList()
- Add new patch to rename load_segments() and module failure
- Add new patch to tweak collect_contents_to_file() and docs
- Add patch to rename ExpandToLimit to extend_to_limit
- Add patch to rename ExpandEntries to gen_entries
- Add new patch to refactor fit to generate output at the end
- Add a patch to change how faked blobs are created
- Add a patch to make fake blobs zero-sized by default
- Add a patch to allow mkimage to use a non-zero fake-blob size
- Rewrite this to use the new FIT entry-type implementation
- Rename op-tee to tee-os
- Rename op-tee to tee-os
- Drop use of .itb2
- Drop patches previously applied
- Add various suggestions from Alper Nebi Yasak
- Add patches to refactor binman's FIT support

Simon Glass (25):
  dtoc: Make GetArgs() more flexible
  moveconfig: Remove remove_defconfig()
  moveconfig: Use re.fullmatch() to avoid extra check
  spl: Correct Kconfig help for TPL_BINMAN_SYMBOLS
  dtoc: Tidy up implementaiton of AddStringList()
  elf: Rename load_segments() and module failure
  binman: Tweak collect_contents_to_file() and docs
  binman: Rename ExpandToLimit to extend_to_limit
  binman: Rename ExpandEntries to gen_entries
  binman: Refactor fit to generate output at the end
  binman: Rename tools parameter to btools
  binman: Change how faked blobs are created
  binman: Make fake blobs zero-sized by default
  binman: Allow mkimage to use a non-zero fake-blob size
  binman: Read the fit entries only once
  binman: Fix some pylint warnings in fit
  binman: Add a consistent way to report errors with fit
  binman: Update fit to use node instead of subnode
  binman: Keep a separate list of entries for fit
  binman: Support splitting an ELF file into multiple nodes
  rockchip: evb-rk3288: Drop raw-image support
  rockchip: Include binman script in 64-bit boards
  rockchip: Support building the all output files in binman
  rockchip: Convert all boards to use binman
  rockchip: Drop the FIT generator script

 Makefile                                     |  42 +-
 arch/arm/dts/px30-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              |   5 +-
 arch/arm/dts/rk3568-u-boot.dtsi              |   2 +
 arch/arm/dts/rockchip-u-boot.dtsi            |  84 +++-
 arch/arm/mach-rockchip/Kconfig               |   6 +
 arch/arm/mach-rockchip/make_fit_atf.py       | 240 ---------
 boot/Kconfig                                 |   3 +-
 common/spl/Kconfig                           |   6 +-
 configs/evb-rk3288_defconfig                 |   1 +
 tools/binman/binman.rst                      |  30 +-
 tools/binman/control.py                      |   2 +-
 tools/binman/elf.py                          |   6 +-
 tools/binman/elf_test.py                     |  18 +-
 tools/binman/entries.rst                     | 146 ++++++
 tools/binman/entry.py                        |  49 +-
 tools/binman/etype/_testing.py               |   2 +-
 tools/binman/etype/blob.py                   |  10 +-
 tools/binman/etype/blob_ext_list.py          |   2 +-
 tools/binman/etype/blob_phase.py             |   2 +-
 tools/binman/etype/files.py                  |   2 +-
 tools/binman/etype/fit.py                    | 501 ++++++++++++++-----
 tools/binman/etype/gbb.py                    |   4 +-
 tools/binman/etype/intel_ifwi.py             |   4 +-
 tools/binman/etype/mkimage.py                |  19 +-
 tools/binman/etype/section.py                |  22 +-
 tools/binman/etype/vblock.py                 |   4 +-
 tools/binman/ftest.py                        | 180 ++++++-
 tools/binman/test/088_expand_size.dts        |   8 +-
 tools/binman/test/089_expand_size_bad.dts    |   2 +-
 tools/binman/test/224_fit_bad_oper.dts       |   2 -
 tools/binman/test/225_expand_size_bad.dts    |  10 +
 tools/binman/test/226_fit_split_elf.dts      |  67 +++
 tools/binman/test/227_fit_bad_dir.dts        |   9 +
 tools/binman/test/228_fit_bad_dir_config.dts |   9 +
 tools/binman/test/229_mkimage_missing.dts    |  18 +
 tools/dtoc/fdt.py                            |   4 +-
 tools/dtoc/fdt_util.py                       |   8 +-
 tools/dtoc/test/dtoc_test_simple.dts         |   2 +
 tools/dtoc/test_fdt.py                       |  12 +-
 tools/moveconfig.py                          |  17 +-
 45 files changed, 1060 insertions(+), 509 deletions(-)
 delete mode 100755 arch/arm/mach-rockchip/make_fit_atf.py
 create mode 100644 tools/binman/test/225_expand_size_bad.dts
 create mode 100644 tools/binman/test/226_fit_split_elf.dts
 create mode 100644 tools/binman/test/227_fit_bad_dir.dts
 create mode 100644 tools/binman/test/228_fit_bad_dir_config.dts
 create mode 100644 tools/binman/test/229_mkimage_missing.dts

-- 
2.35.1.574.g5d30c73bfb-goog



More information about the U-Boot mailing list