Hi! Trying to build mainline U-Boot for Rockchip RK3568-based board (Forlinx RK3568), but I think it;s can be reproduced on all RK35 chips. The main problem is that BL32 (AKA OP-TEE) is provided by Roch-Chips as a pre-compiled blob and binman fails to implement that scenario. Used .dtsi file and binman verbose output provided in attachments. Do am I done something wrong or it can be considered as bug? Can someone assist?
Thanks in advance Igor
/home/gosha/u-boot/tools/binman/binman -D --toolpath ./tools -v5 build -u -d u-boot.dtb -O . -m -I . -I /home/gosha/u-boot -I /home/gosha/u-boot/board/forlinx/ok3568-c -I arch/arm/dts -a of-list="rk3568-ok3568-c" -a atf-bl31-path=/home/gosha/ff3588/rk3588/rkbin/bin/rk35/rk3568_bl31_v1.36.elf -a tee-os-path= -a opensbi-path= -a default-dt="rk3568-ok3568-c" -a scp-path= -a rockchip-tpl-path=/home/gosha/ff3588/rk3588/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.15.bin -a spl-bss-pad= -a tpl-bss-pad=1 -a spl-dtb=y -a tpl-dtb= -a pre-load-key-path= Using input directories ['.', '/home/gosha/u-boot', '/home/gosha/u-boot/board/forlinx/ok3568-c', 'arch/arm/dts'] Using output directory '.' Processing entry args: of-list = rk3568-ok3568-c atf-bl31-path = /home/gosha/ff3588/rk3588/rkbin/bin/rk35/rk3568_bl31_v1.36.elf tee-os-path = opensbi-path = default-dt = rk3568-ok3568-c scp-path = rockchip-tpl-path = /home/gosha/ff3588/rk3588/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.15.bin spl-bss-pad = tpl-bss-pad = 1 spl-dtb = y tpl-dtb = pre-load-key-path = Processing entry args done bintool: mkimage -d /home/gosha/ff3588/rk3588/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.15.bin:./spl/u-boot-spl.bin -n rk3568 -T rksd ./idbloader.img Image Type: Rockchip RK35 boot image Init Data Size: 59392 bytes Boot Data Size: 104448 bytes Node '/binman/simple-bin/mkimage': Packing: offset=None, size=None, content_size=28800 Node '/binman/simple-bin/mkimage': - packed: offset=0x0, size=0x28800, content_size=0x28800, next_offset=28800 Node '/binman/simple-bin/fit/images/u-boot/u-boot-nodtb': Packing: offset=None, size=None, content_size=a1e00 Node '/binman/simple-bin/fit/images/u-boot/u-boot-nodtb': - packed: offset=0x0, size=0xa1e00, content_size=0xa1e00, next_offset=a1e00 Node '/binman/simple-bin/fit/images/u-boot/u-boot-nodtb': GetData: size 0xa1e00 Node '/binman/simple-bin/fit/images/u-boot': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/u-boot': GetData: 1 entries, total size 0xa1e00 Node '/binman/simple-bin/fit': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/u-boot': Packing: offset=None, size=0xa1e00, content_size=a1e00 Node '/binman/simple-bin/fit/images/u-boot': - packed: offset=0x0, size=0xa1e00, content_size=0xa1e00, next_offset=a1e00 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': Packing: offset=None, size=None, content_size=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': - packed: offset=0x0, size=0x623c8, content_size=0x623c8, next_offset=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': GetData: size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/@atf-SEQ': GetData: 1 entries, total size 0x623c8 Node '/binman/simple-bin/fit': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/@atf-SEQ': Packing: offset=None, size=0x623c8, content_size=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': - packed: offset=0xa1e00, size=0x623c8, content_size=0x623c8, next_offset=1041c8 Node '/binman/simple-bin/fit/images/optee/blob-ext': Packing: offset=None, size=None, content_size=6f998 Node '/binman/simple-bin/fit/images/optee/blob-ext': - packed: offset=0x0, size=0x6f998, content_size=0x6f998, next_offset=6f998 Node '/binman/simple-bin/fit/images/optee/blob-ext': GetData: size 0x6f998 Node '/binman/simple-bin/fit/images/optee': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/optee': GetData: 1 entries, total size 0x6f998 Node '/binman/simple-bin/fit': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/optee': Packing: offset=None, size=0x6f998, content_size=6f998 Node '/binman/simple-bin/fit/images/optee': - packed: offset=0x1041c8, size=0x6f998, content_size=0x6f998, next_offset=173b60 Node '/binman/simple-bin/fit/images/@fdt-SEQ': GetData: 0 entries, total size 0x0 Node '/binman/simple-bin/fit': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit/images/@fdt-SEQ': Packing: offset=None, size=0x0, content_size=0 Node '/binman/simple-bin/fit/images/@fdt-SEQ': - packed: offset=0x173b60, size=0x0, content_size=0x0, next_offset=173b60 Node '/binman/simple-bin/fit/images/u-boot/u-boot-nodtb': GetData: size 0xa1e00 Node '/binman/simple-bin/fit/images/u-boot': GetPaddedDataForEntry: size 0xa1e00 Node '/binman/simple-bin/fit/images/u-boot': GetData: 1 entries, total size 0xa1e00 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': Packing: offset=0x0, size=0x623c8, content_size=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': - packed: offset=0x0, size=0x623c8, content_size=0x623c8, next_offset=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': GetData: size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': GetPaddedDataForEntry: size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': GetData: 1 entries, total size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': Packing: offset=0xa1e00, size=0x623c8, content_size=623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': - packed: offset=0xa1e00, size=0x623c8, content_size=0x623c8, next_offset=1041c8 Node '/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31': GetData: size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': GetPaddedDataForEntry: size 0x623c8 Node '/binman/simple-bin/fit/images/@atf-SEQ': GetData: 1 entries, total size 0x623c8 Node '/binman/simple-bin/fit/images/optee/blob-ext': GetData: size 0x6f998 Node '/binman/simple-bin/fit/images/optee': GetPaddedDataForEntry: size 0x6f998 Node '/binman/simple-bin/fit/images/optee': GetData: 1 entries, total size 0x6f998 bintool: mkimage -E -B 200 -t -F ./simple-bin.fit.fit FIT description: FIT image for U-Boot with bl31 (TF-A) Created: Sun Apr 2 23:36:40 2023 Image 0 (u-boot) Description: U-Boot (64-bit) Created: Sun Apr 2 23:36:40 2023 Type: Standalone Program Compression: uncompressed Data Size: 663040 Bytes = 647.50 KiB = 0.63 MiB Architecture: AArch64 Load Address: 0x00a00000 Entry Point: 0x00a00000 Hash algo: sha256 Hash value: 3715e6c11d12ce23f0b4cf1b45ae84c45e7b7f22555a817c3dbe59236a8c9a1e Image 1 (atf-1) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 163840 Bytes = 160.00 KiB = 0.16 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0x00040000 Hash algo: sha256 Hash value: df3dd620f7412cc7233d775405bead9f3323bb12a1c902dafd71752357211505 Image 2 (atf-2) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 7732 Bytes = 7.55 KiB = 0.01 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0x00068000 Hash algo: sha256 Hash value: 6e9d32ba2391ea86ec585080eebb4c76fae7b5363dca1a69e6035ba3e4491bc8 Image 3 (atf-3) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 20259 Bytes = 19.78 KiB = 0.02 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0x0006a000 Hash algo: sha256 Hash value: 919db4e965c19bf879da8a058ac6008a892a17904e6437cdd72f8f485aa61e0c Image 4 (atf-4) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 40960 Bytes = 40.00 KiB = 0.04 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0xfdcc1000 Hash algo: sha256 Hash value: 455304ad25a671f34193e732b2c3c679f4ef43d6254f642c29d1643c937cf2d9 Image 5 (atf-5) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 8192 Bytes = 8.00 KiB = 0.01 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0xfdcce000 Hash algo: sha256 Hash value: cb025e3a5b768cdea2ba62e092042d5194098016e43c323db954278ad7d75a84 Image 6 (atf-6) Description: ARM Trusted Firmware Created: Sun Apr 2 23:36:40 2023 Type: Firmware Compression: uncompressed Data Size: 8192 Bytes = 8.00 KiB = 0.01 MiB Architecture: AArch64 OS: ARM Trusted Firmware Load Address: 0xfdcd0000 Hash algo: sha256 Hash value: d4e8257343b8be878acde6ba7274e2e60640e5c20bffe754984761a31276b3de Image 7 (optee) Description: TEE Created: Sun Apr 2 23:36:40 2023 Type: Trusted Execution Environment Image Compression: uncompressed Data Size: 457112 Bytes = 446.40 KiB = 0.44 MiB Hash algo: sha256 Hash value: af414b9c9f1a05b058de55de4ad0fa6ec1f40e6b42769454196ee63279570cc7 Image 8 (fdt-1) Description: fdt-rk3568-ok3568-c Created: Sun Apr 2 23:36:40 2023 Type: Flat Device Tree Compression: uncompressed Data Size: 61456 Bytes = 60.02 KiB = 0.06 MiB Architecture: Unknown Architecture Hash algo: sha256 Hash value: c927dc18648e052f172da457a9df7aea903184180135e62448835e28e2d694fc Default Configuration: 'config-1' Configuration 0 (config-1) Description: NAME.dtb Kernel: unavailable FDT: fdt-SEQ Node '/binman/simple-bin': GetPaddedDataForEntry: size None Node '/binman/simple-bin/fit': Packing: offset=0x7f8000, size=0x15e800, content_size=15e800 Node '/binman/simple-bin/fit': - packed: offset=0x7f8000, size=0x15e800, content_size=0x15e800, next_offset=956800 Wrote map file './simple-bin.map' to show errors binman: Node '/binman/simple-bin/fit/images/optee': Offset 0x1041c8 (1065416) size 0x6f998 (457112) is outside the section '/binman/simple-bin/fit' starting at 0x0 (0) of size 0x15e800 (1435648) Traceback (most recent call last): File "/home/gosha/u-boot/tools/binman/binman", line 133, in RunBinman ret_code = control.Binman(args) File "/home/gosha/u-boot/tools/binman/control.py", line 744, in Binman invalid |= ProcessImage(image, args.update_fdt, args.map, File "/home/gosha/u-boot/tools/binman/control.py", line 572, in ProcessImage image.PackEntries() File "/home/gosha/u-boot/tools/binman/image.py", line 154, in PackEntries super().Pack(0) File "/home/gosha/u-boot/tools/binman/etype/section.py", line 425, in Pack self._PackEntries() File "/home/gosha/u-boot/tools/binman/etype/section.py", line 443, in _PackEntries offset = entry.Pack(offset) File "/home/gosha/u-boot/tools/binman/etype/section.py", line 436, in Pack self.CheckEntries() File "/home/gosha/u-boot/tools/binman/etype/section.py", line 476, in CheckEntries entry.Raise('Offset %#x (%d) size %#x (%d) is outside the ' File "/home/gosha/u-boot/tools/binman/entry.py", line 546, in Raise raise ValueError("Node '%s': %s" % (self._node.path, msg)) ValueError: Node '/binman/simple-bin/fit/images/optee': Offset 0x1041c8 (1065416) size 0x6f998 (457112) is outside the section '/binman/simple-bin/fit' starting at 0x0 (0) of size 0x15e800 (1435648) make[1]: *** [/home/gosha/u-boot/Makefile:1108: .binman_stamp] Error 1
rk3568-ok3568-c-u-boot.dtsi
Description: Binary data