Il giorno mar 5 set 2023 alle ore 20:16 Simon Glass <s...@chromium.org> ha scritto: > > Hi Jonas, > > On Mon, 4 Sept 2023 at 10:52, Jonas Karlman <jo...@kwiboo.se> wrote: > > > > Hi Massimo, > > > > On 2023-09-04 17:05, Massimo Pegorer wrote: > > > Hi, > > > > > > Is there any way for binman to package FIT with U-Boot TF-A and > > > OP-TEE, using bl32 binary provided by Rockchip as TEE? > > > > > > I've tried with TEE=/path/to/rkbin/bin/rk33/xxx_bl32_vX.YZ.bin, but > > > binman failed. > > > > > > In my poor understanding of Python code, it seems binman accepts only > > > ELF format or a binary format starting with optee_v1_header, but > > > binaries provided by Rockchip in rkbin repository do not have this > > > header. > > > > One way that I have used/tested before was to create a tee.elf version > > using something like: > > > > $ aarch64-linux-gnu-objcopy -B aarch64 -I binary -O elf64-littleaarch64 > > xxx_bl32_vX.YZ.bin bl32.o > > $ aarch64-linux-gnu-ld bl32.o -T tee.ld -o tee.elf > > > > tee.ld: > > ---- > > ENTRY(_binary_bl32_bin_start); > > > > SECTIONS > > { > > . = 0x08400000; > > .data : { > > *(.data) > > } > > } > > ---- > > > > And then make with TEE=tee.elf, however keep in mind that U-Boot may not > > treat the memory region used by OP-TEE properly for aarch64. > > > > Regards, > > Jonas > > > > > > > > Thanks in advance for any hints! > > Should we do something to support a 'flat' binary in the tee-os entry type? > For example, we could allow it if so long as a fixed load address is > provided? It might be a bit of a hack though.
I do not know how much fixed is the load address and how much it depends on SoC and OP-TEE build, instead. I think it would be preferable if Rokchip will provide also the tee-header_v2.bin, so that binman could extract load address info as it does when parsing tee.bin. Regards, Massimo > Regards, > Simon