Login
cleave-optee
Login

The Python scripts that OP-TEE 4.6.0's core build runs, in Crystal, so OP-TEE builds in the BQ2 seed without Python. Each subcommand is one script, and takes the same arguments:

Subcommand Replaces Makes
arm32_sysreg scripts/arm32_sysreg.py ARMv7 system-register accessors (C or assembler)
pem_to_pub_c scripts/pem_to_pub_c.py the TA signing key's modulus and exponent as C
gen_ldelf_hex scripts/gen_ldelf_hex.py ldelf's load segments as a C array
gen_ld_sects scripts/gen_ld_sects.py linker-script input sections from readelf -S -W
gen_tee_bin scripts/gen_tee_bin.py tee.bin, tee-raw.bin, and the v2 tee-header, tee-pager and tee-pageable images

bsp/beagley-ai/patches/optee_os/0001-build-run-the-core-build-helpers-with-cleave-optee.patch makes OP-TEE call $(CLEAVE_OPTEE) <name> where it called $(PYTHON3) scripts/<name>.py. The default is CLEAVE_OPTEE ?= cleave-optee. The scripts for early TAs, secure partitions, embedded DTBs and mem_usage are untouched, because the BeagleY-AI build uses none of them.

ELF files are read by src/cleave/elf.cr, little-endian ELF32 and ELF64.

Checked