Encrypted Mass flash : End sector for APP_ENC, expected at: 119537630, actual: 0

Hello,

I am trying to generate a mass flash Creating Encrypted Images with a Generic Key. We use the orin nx with 8gb of RAM with a custom board.

We are using a custom board with an external ssd of 256GB that consists of 500118192 sectors with 521 bytes per sector. I have to overwritten the APP_ENC_SIZE symbols in the default flash_l4t_nvme_rootfs_enc.xml file. I thought that the symbol would be overwritten during the flash processus. Should I indicate the partition size myself ?
I am following this procedure:

# I am using the default, eks_t234.img, sym2_t234.key, sym_t234.key obtained from  the  source/optee/samples/hwkey-agent/host/tool/gen_ekb/example.sh script. I have not yet burned fuses.

# I create the image to flash the qspi-nor
sudo BOARDID=3767 BOARDSKU=0003 ./tools/kernel_flash/l4t_initrd_flash.sh   -c tools/kernel_flash/flash_l4t_nvme_rootfs_enc.xml  -i sym2_t234.key --network usb0  --massflash 5  -p "-c bootloader/generic/cfg/flash_t234_qspi.xml"   --no-flash minoverlays internal
# I then attempt to create the external image containing the encrypted app partition # and append it to the image with the following command
sudo BOARDID=3767 BOARDSKU=0000 ./tools/kernel_flash/l4t_initrd_flash.sh         --network usb0 --showlogs  --no-flash --external-device nvme0n1p1         -S 200GiB -c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml  --external-only --append -i ./sym2_t234.key ``-p "--generic-passphrase"`` --massflash 5 minoverlays external

However, I receive the following error message no matter what I do :
End sector for APP_ENC, expected at: 119537630, actual: 0

The content of the minoverlays configuration is the following :

#minoverlays.conf
source "${LDK_DIR}/jetson-orin-nano-devkit-nvme.conf";
OVERLAY_DTB_FILE=L4TConfiguration.dtbo,tegra234-carveouts.dtbo,tegra-optee.dtbo

Am I doing something wrong ?

hello cleng,

here’re step-by-step instruction to create encrypted images with a generic key.
please see-also Topic 291335 for reference.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.