
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

From: i.zafievsky@gmail.com Date: Mon, 3 Apr 2023 12:27:36 +0300
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?
What do you need OP_TEE for? Many of us consider less blobs a good thing and simply live without OP-TEE.
Cheers,
Mark

On Mon, Apr 3, 2023 at 2:30 PM Mark Kettenis mark.kettenis@xs4all.nl wrote:
From: i.zafievsky@gmail.com Date: Mon, 3 Apr 2023 12:27:36 +0300
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?
What do you need OP_TEE for? Many of us consider less blobs a good thing and simply live without OP-TEE.
I think it's a moot point, OP_TEE is useful for a number of things, and it should be an option for those that wish to use it.

On 2023-04-03 15:33, Peter Robinson wrote:
On Mon, Apr 3, 2023 at 2:30 PM Mark Kettenis mark.kettenis@xs4all.nl wrote:
From: i.zafievsky@gmail.com Date: Mon, 3 Apr 2023 12:27:36 +0300
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?
What do you need OP_TEE for? Many of us consider less blobs a good thing and simply live without OP-TEE.
I think it's a moot point, OP_TEE is useful for a number of things, and it should be an option for those that wish to use it.
Your issue seem to be that your optee node is placed after the dynamic @atf-SEQ node, try place the optee node before the @atf-SEQ node.
Trying to use the common rockchip-u-boot.dtsi and TEE env var result in the following:
binman: Node '/binman/simple-bin/fit': subnode 'images/@tee-SEQ': Failed to read ELF file: Magic number does not match
And I assume you are using a custom binman node because of such error?
Adding support for the rockchip bl31.bin blob format to binman and use the common rockchip-u-boot.dtsi would be the proper way to fix this.
Regards, Jonas

Hello!
First of all: I have no idea who wrote the original rockchip-u-boot.dtsi, but all the time I've worked with Rockchips SoCs, it;s always been like this : BL31 is provided by Rockchips in form of .elf file, that binman successfully process, and BL32 (AKA OP-TEE) is provided as a pre-compiled blob that just need to be loaded at fixed address and nothing more, ATF (BL31) knows what to do.
Jonas, I've done what you recommend. Edited .dtsi and binman output attached. Produced .itb looks unusable because of the following: 1. No load address for optee entry 2. FDT entry in configuration looks wrong 3. No "firmware" entry in configuration 4/ No "loadables" entry in configuration
Any suggestions?
Regards, Igor
пн, 3 апр. 2023 г. в 17:03, Jonas Karlman jonas@kwiboo.se:
On 2023-04-03 15:33, Peter Robinson wrote:
On Mon, Apr 3, 2023 at 2:30 PM Mark Kettenis mark.kettenis@xs4all.nl
wrote:
From: i.zafievsky@gmail.com Date: Mon, 3 Apr 2023 12:27:36 +0300
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?
What do you need OP_TEE for? Many of us consider less blobs a good thing and simply live without OP-TEE.
I think it's a moot point, OP_TEE is useful for a number of things, and it should be an option for those that wish to use it.
Your issue seem to be that your optee node is placed after the dynamic @atf-SEQ node, try place the optee node before the @atf-SEQ node.
Trying to use the common rockchip-u-boot.dtsi and TEE env var result in the following:
binman: Node '/binman/simple-bin/fit': subnode 'images/@tee-SEQ': Failed to read ELF file: Magic number does not match
And I assume you are using a custom binman node because of such error?
Adding support for the rockchip bl31.bin blob format to binman and use the common rockchip-u-boot.dtsi would be the proper way to fix this.
Regards, Jonas
participants (4)
-
Jonas Karlman
-
Mark Kettenis
-
Peter Robinson
-
Игорь Зафиевский