[PATCH v3 00/26] binman: rockchip: Migrate from rockchip SPL_FIT_GENERATOR script

Simon Glass sjg at chromium.org
Sun Mar 6 04:18:51 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 v3:
- Fix 'whic' typo
- Drop unnecessary variable
- Add tests for an empty string/stringlist too
- Rename some more things to 'extend'
- Fix 'He' typo
- Drop the base_node argument and use self._node instead
- Rename function to _raise_subnode() so it is clear it is not like Raise()
- Fix 'segmnet' typo
- Use seq == 0 instead of 'not seq'
- Add an offset to the FIT description

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 implementation 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 (26):
  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 implementation 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: Update fit to move node reading into the ReadNode() method
  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             |  85 ++-
 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                       |  32 +-
 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                         |  51 +-
 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                     | 508 ++++++++++++++----
 tools/binman/etype/gbb.py                     |   4 +-
 tools/binman/etype/intel_ifwi.py              |   4 +-
 tools/binman/etype/mkimage.py                 |  19 +-
 tools/binman/etype/section.py                 |  24 +-
 tools/binman/etype/vblock.py                  |   4 +-
 tools/binman/ftest.py                         | 208 ++++++-
 ...88_expand_size.dts => 088_extend_size.dts} |   8 +-
 ...d_size_bad.dts => 089_extend_size_bad.dts} |   2 +-
 ..._entry_expand.dts => 121_entry_extend.dts} |   0
 ...d_twice.dts => 122_entry_extend_twice.dts} |   0
 ...ction.dts => 123_entry_extend_section.dts} |   0
 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                        |  14 +-
 tools/moveconfig.py                           |  16 +-
 48 files changed, 1080 insertions(+), 532 deletions(-)
 delete mode 100755 arch/arm/mach-rockchip/make_fit_atf.py
 rename tools/binman/test/{088_expand_size.dts => 088_extend_size.dts} (88%)
 rename tools/binman/test/{089_expand_size_bad.dts => 089_extend_size_bad.dts} (90%)
 rename tools/binman/test/{121_entry_expand.dts => 121_entry_extend.dts} (100%)
 rename tools/binman/test/{122_entry_expand_twice.dts => 122_entry_extend_twice.dts} (100%)
 rename tools/binman/test/{123_entry_expand_section.dts => 123_entry_extend_section.dts} (100%)
 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.616.g0bdcbb4464-goog



More information about the U-Boot mailing list