New Jetpack 5: odmfuseread.sh still broken

Hi,

The fix for the odmfuseread script promised here only fixes the second part (i.e. the crash).
However, in the new JetPack release, the odmfuseread.sh script is still broken, there are 2 issues:

  1. Python3 issue:
    Please update line 1946 from:
    for file_nodes in xml_tree.getiterator(‘file’):
    to:
    for file_nodes in xml_tree.iter(‘file’):

  2. Incomplete help text:
    Please add to the usage description the board Id 0x23 for the Jetson Orin Nano Devkit.

Thanks!

hello business37,

may I also know which release version you’re tested with?

I used Jetson_Linux_R35.5.0_aarch64

hello business37,

we’ve tested on JP-5.1.3 (r35.5.0) to check fuse variables via odmfuseread.sh without failures.
may I know what’s your commands, and what’s the error messages reported?

ya… this is out-of-date,
let me submit change update to address it.

The file that needs fixing is bootloader/tegraflash_impl_t234.py
The command I’m running is:

$ sudo ./odmfuseread.sh -i 0x23 -k ~/jetson-secureboot/keys/pkc.pem -S ~/jetson-secureboot/keys/sbk.key jetson-orin-nano-devkit

And here is the full output:

./tegraflash.py --chip 0x23 --applet “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/mb1_t234_prod.bin” --skipuid --cfg readinfo_t234_min_prod.xml --dev_params tegra234-br-bct-diag-boot.dts --device_config tegra234-mb1-bct-device-p3767-0000.dts --misc_config tegra234-mb1-bct-misc-p3767-0000.dts --bins “mb2_applet applet_t234.bin” --cmd “dump eeprom cvm cvm.bin; dump custinfo custinfo_out.bin; reboot recovery” --encrypt_key “/home/sschorr/jetson-secureboot/keys/sbk.key” --key “/home/sschorr/jetson-secureboot/keys/pkc.pem”
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.0582 ] tegrarcm_v2 --chip 0x23 0 --ismb2applet
[ 0.0587 ] File rcm_state open failed
[ 0.0590 ] ERROR: failed to read rcm_state
[ 0.0590 ]
[ 0.0632 ] tegrasign_v3.py --key /home/sschorr/jetson-secureboot/keys/pkc.pem --getmode mode.txt
[ 0.0643 ] Key size is 384 bytes
[ 0.0685 ] Pre-processing config: tegra234-mb1-bct-device-p3767-0000.dts
[ 0.0787 ] Pre-processing config: tegra234-mb1-bct-misc-p3767-0000.dts
[ 0.0935 ] Parsing partition layout
[ 0.0943 ] tegraparser_v2 --pt readinfo_t234_min_prod.xml.tmp
[ 0.0977 ] Kernel DTB used: None
[ 0.0977 ] WARNING: dce base dtb is not provided

[ 0.0977 ] Parsing partition layout
[ 0.0980 ] tegraparser_v2 --pt readinfo_t234_min_prod.xml.tmp
[ 0.0987 ] Creating list of images to be encrypted and signed
[ 0.0995 ] tegrahost_v2 --chip 0x23 0 --partitionlayout readinfo_t234_min_prod.xml.bin --list images_list.xml oem-rsa
[ 0.0998 ] MB1: Nvheader already present is mb1_t234_prod_aligned.bin
[ 0.1048 ] Header already present for mb1_t234_prod_aligned_sigheader.bin
[ 0.1053 ] MB1: Nvheader already present is mb1_t234_prod_aligned.bin
[ 0.1111 ] Header already present for mb1_t234_prod_aligned_sigheader.bin
[ 0.1119 ] MB1: Nvheader already present is psc_bl1_t234_prod_aligned.bin
[ 0.1186 ] Header already present for psc_bl1_t234_prod_aligned_sigheader.bin
[ 0.1191 ] adding BCH for mb2_t234_aligned.bin
[ 0.1241 ] MB1: Nvheader already present is psc_bl1_t234_prod_aligned.bin
[ 0.1383 ] Header already present for psc_bl1_t234_prod_aligned_sigheader.bin
[ 0.1389 ] adding BCH for mb2_t234_aligned.bin
Traceback (most recent call last):
File “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/./tegraflash.py”, line 1404, in
tegraflash_run_commands()
File “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/./tegraflash.py”, line 1238, in tegraflash_run_commands
interpreter.onecmd(command)
File “/usr/lib/python3.10/cmd.py”, line 217, in onecmd
return func(arg)
File “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/./tegraflash.py”, line 876, in do_dump
self.chip_inst.tegraflash_dump(exports, args)
File “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 2504, in tegraflash_dump
self.tegraflash_enc_and_sign_images()
File “/home/sschorr/Jetson_Linux_R35.5.0_aarch64/Linux_for_Tegra/bootloader/tegraflash_impl_t234.py”, line 1946, in tegraflash_enc_and_sign_images
for file_nodes in xml_tree.getiterator(‘file’):
AttributeError: ‘ElementTree’ object has no attribute ‘getiterator’
Reading board information failed.

As the message says, there is no method “getiterator”, it needs to be replaced by calling “iter”.

Thanks

may I also know your host environment, for example, is it ubuntu-20 or 22?

I’m running Ubuntu 22.04.4 LTS, with Python 3.10.12

hello business37,

it should be an OS issue there.

as mentioned in Secure Boot section.

An X86 host running Ubuntu 18.04 LTS, or 20.04 LTS.

FYI,
we’ve also tested again on Ubuntu-20.04 and Ubuntu-18.04 to verify odmfuseread.sh without failures.