I added the -p flag so the odm_production_mode should be set? correct? You can check the output of the fuse burning steps above. Here is the odmfuse_pkc.xml file again
<genericfuse MagicId="0x45535546" version="1.0.0">
<fuse name="SecureBootKey" size="16" value="0x<32 valid hex numbers which match the input>" />
<fuse name="Kek2" size="16" value="<32 valid hex numbers which match my input>" />
<fuse name="PublicKeyHash" size="32" value="0x<valid hash>" />
<fuse name="BootSecurityInfo" size="4" value="0x6" />
<fuse name="SecurityMode" size="4" value="0x1" />
</genericfuse>
odmfuseread.sh shows suprising output:
Error: Either RSA key file is not provided or SBK key file is provided for PKC protected target board.
you’ll need to include board info, such as BOARDID=3489 BOARDSKU=0888 FAB=300 BOARDREV=N.0 while using these commands to generate a fuse blob.
in the other words, these three, (1) board info, (2) --auth options, and (3) --noburn options should use together to create a fuseblob locally.
that xml file, odmfuse_pkc.xml looks correct, are you able to boot into the ubuntu desktop?
I reread and realized the fuse burning output above and realized there were issues burning fuses. Feel a bit dumb now… the line says this:
[ 2.4339 ] tegrarcm_v2 --oem burnfuses blow_fuse_data.bin
[ 2.4372 ] Applet version 01.00.0000
[ 2.5369 ] 0000000000000001: Oem commands are not supported
[ 2.5380 ] Fuse burning failed
My output was attached in this comment:
Now I cannot burn fuses (so something happened but not what we wanted, If I run the odmfuseread.sh script, the get_fuse_level function is getting “e” for $flval (so my board is in PKC)
However, if I try to flash with just PKC set I cannot…
Initial command
3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0]
Version info.
sys.version_info(major=3, minor=8, micro=10, releaselevel='final', serial=0)
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
[ 0.0069 ] Parsing partition layout
[ 0.0080 ] tegraparser_v2 --pt secureflash.xml.tmp
[ 0.0091 ]
[ 0.0092 ] Boot Rom communication
[ 0.0098 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_1_signed.rcm
[ 0.0105 ] BR_CID: 0xe1801001645966470000000013040080
[ 0.2351 ] Bootrom returned error 10
[ 0.3769 ] Boot Rom communication failed
[ 0.3769 ]
Error: Return value 10
Command tegrarcm_v2 --chip 0x18 0 --rcm rcm_1_signed.rcm
This seems to be a big issue, has this fuse burning and flashing been thoroughly tested on Jetson tx2 4GB?
Seems prone to alot of errors.
Ok, I can try this process on one more SOM, but I want it to work correctly.
I will be testing with the l4t 32.6.1 release a similar odmfuse.sh command.
I am not sure how I can recover the current SOM.
could you please try nvmassflashgen script before you fused another TX2-4GB,
you should execute in the offline method. here’s sample commands for your reference,
for example, BOARDID=3489 BOARDSKU=0888 FAB=300 FUSELEVEL=fuselevel_production ./nvmassflashgen.sh -u rsa_priv.pem -v sbk.key jetson-tx2-devkit-4gb mmcblk0p1
this will generate a mass-flash image tarball, once complete. i.e. mfi_jetson-tx2-devkit-4gb_encrypt_signed.tbz2
you should extract this tbz2 file, and execute nvmflash.sh to flash the target.
So, I use a command like this and can flash and boot!
But, I run the same command with ROOTFS_ENC=1 set, It fails.
Making system_boot.img...
populating bootfs from /home/mharr418/Documents/enc_rootfs_inv/unpack20/Linux_for_Tegra/rootfs/boot ... done.
populating /extlinux/extlinux.conf ... done.
Sync'ing system_boot.img ... done.
Converting RAW image to Sparse image... done.
system_boot.img built successfully.
Making system_root_encrypted.img...
ERROR: build_enc_root_fsimg: ECID is null .
Is this due to the failed fuse burning? Why then is setting the SBK key when not using ROOTFS_ENC working?
Here is the command with ROOTFS_ENC=1. (when I remove setting this global in my command, then the script works)
I am about ready to move onto the new SOM to test, cannot see any issues here and I think it is something in the fuse burning that is causing all these errors
Remember, the final goal is also to have the rootfs encrypted, ROOTFS_ENC=1
Booting with PKCSBK and odm_production mode is good, but if I add ROOTFS_ENC=1 to my command,
I get this on my screen :
I will now always set FUSELEVEL=fuselevel_production since we had issue reading this before, but I still want to read ECID from the board so I will go to flash.sh and comment these lines out:
#fuselevel is read wrong currently, will test on future boards
#if [ "${fuselevel}" = "" ]; then
get_fuse_level fuselevel hwchipid bootauth;
# fuselevel_unknown or empty will be handled as fuselevel_production
if [ "${fuselevel}" = "fuselevel_unknown" ] || [ "${fuselevel}" = "" ]; then
fuselevel="fuselevel_production";
fi;
echo "SHOWING FUSELEVEL"
echo $fuselevel
echo "${ECID}"
#else
# can not "--skipuid" when function get_fuse_level is skipped.
# SKIPUID="";
#fi;
Other than this, the intended process on 32.6.1 works well. I will be using it on my TX2.
FYI,
you’ll need to create eks.img to enable disk encryption on a fused TX2 platform.
there’s script file, example.sh it’ll use all zeros run gen_ekb.py for generating eks.img.
for example, $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/atf_and_trusty/trusty/app/nvidia-sample/hwkey-agent/CA_sample/tool/gen_ekb/example.sh
if necessary, you’ll need to replace those keys and creating eks.img. after that, please overwrite the generate file with Linux_for_Tegra/bootloader/eks.img.
because partition update is disabled by fused device. you need to update the eks partition by full flash the target.
for example, $ sudo ROOTFS_ENC=1 ./flash.sh -u pkc.key -v sbk.key jetson-tx2 mmcblk0p1
once system boot-up, please enter mount command to check your file system.
there’ll be crypt keywords if the process is complete.
for example,
$ mount
/dev/mapper/crypt_root on / type ext4 (rw,relatime,data=ordered)
we had verified disk encryption with device fused SBKPKC and adding KEK2.
so, how about running the example.sh, and replace KEK2 as yours to create eks.img. $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/atf_and_trusty/trusty/app/nvidia-sample/hwkey-agent/CA_sample/tool/gen_ekb/example.sh