This is the fixed vector for deriving EKB root key from fuse.
It is expected user to replace the FV below with a user specific
FV, and code the exact same user specific FV into OP-TEE
It is the last part here I can’t seem to find any information on. I’m guessing I have to supply the FV to the hwkey-agent during build of OP-TEE somehow, but I have never build OP-TEE before and I don’t know where to start looking for changing out the FV.
Could someone please point me in the right direction?
I was able to build optee and flash it to my devkit (I think). Because it won’t boot. I’m getting a kernel panic because it can’t decrypt the drive, which is (I’m guessing) because optee didn’t encode the correct FV when it was built.
Bootlog captured from minicom: bootlog.txt (87.9 KB)
Since I didn’t know any better I just generated the ekb with a random FV, and hoped the hwkey-agent would pick up the fv_ekb_t234 file and incorporate it somehow when I built the system. I replaced the tos-optee_t234.img file in the BSP with the generated tos.img file as per the instructions in the readme. I then flashed the devkit, (btw, I had to re-install python3-cryptography after having uninstalled it to be able to compile optee) and the result is the boot-log above.
I haven’t really looked through the flash-log because I don’t know what to look for there (if anything) flash_1-5_0_20230823-153030.log (39.5 KB)
For reference, the flash commands I’m using are below, and work if I only use the standard FV:
Edit:
So, my question remains- how do I properly supply the FV to optee when building it?
Or do I also have to “preemptively” copy the files from .../optee/install/t234/... to the system by copying them into the Linux_for_Tegra/rootfs/...?
please access to jetson-linux-r3541 to download the [Driver Package (BSP) Sources].
as you can see… there’s t234 example to generate EKS image, it’s using a test key as FV key by default.
for example, $public_sources/r35.4.1/Linux_for_Tegra/source/public/atf_and_optee/optee/samples/hwkey-agent/host/tool/gen_ekb/example.sh.
you may refer to KDF of Fuse Keys section to replace that key with generated fixed vector (FV), or the user-defined key by running the openssl tool from the command line.
then,
you may running gen_ekb.py to create a new EKS image, and flashing to the target.
besides,
as you mentioned, please update the keys within fv_for_ekb to match the ‘fv’ vector used for EKB binary.