Getting the below errors while compiling the kernel

I am using ubuntu 18.04 machine.

Traceback (most recent call last):
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 1280, in
tegraflash_run_commands()
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 1149, in tegraflash_run_commands
interpreter.onecmd(command)
File “/usr/lib/python3.10/cmd.py”, line 217, in onecmd
return func(arg)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 665, in do_sign
tegraflash_sign_binary(exports, args)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash_internal.py”, line 757, in tegraflash_sign_binary
filename = tegraflas_oem_sign_file(temp_file, magicid)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash_internal.py”, line 2109, in tegraflas_oem_sign_file
for file_nodes in xml_tree.getiterator(‘file’):
AttributeError: ‘ElementTree’ object has no attribute ‘getiterator’
Error: Unable to find the signed file generated by tegraflash.py
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.0012 ] Generating signature
[ 0.0016 ] tegrasign_v2 --key --getmode mode.txt
[ 0.0019 ] Assuming zero filled SBK key
[ 0.0020 ]
[ 0.0021 ] header_magic: d00dfeed
[ 0.0023 ] tegrahost_v2 --chip 0x19 --align 1_tegra194-p3668-all-p3509-0000.dtb
[ 0.0026 ]
[ 0.0029 ] tegrahost_v2 --chip 0x19 0 --magicid DATA --appendsigheader 1_tegra194-p3668-all-p3509-0000.dtb zerosbk
[ 0.0032 ] adding BCH for 1_tegra194-p3668-all-p3509-0000.dtb
[ 0.0075 ]
[ 0.0081 ] tegrasign_v2 --key --list 1_tegra194-p3668-all-p3509-0000_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 0.0084 ] Assuming zero filled SBK key
[ 0.0088 ]
Traceback (most recent call last):
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 1280, in
tegraflash_run_commands()
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 1149, in tegraflash_run_commands
interpreter.onecmd(command)
File “/usr/lib/python3.10/cmd.py”, line 217, in onecmd
return func(arg)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash.py”, line 665, in do_sign
tegraflash_sign_binary(exports, args)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash_internal.py”, line 757, in tegraflash_sign_binary
filename = tegraflas_oem_sign_file(temp_file, magicid)
File “/home/ayyappan/ingame/ptp/nvidia_nx_baseline_bsp/L4T_dev/L4T_bsp/Linux_for_Tegra/bootloader/tegraflash_internal.py”, line 2109, in tegraflas_oem_sign_file
for file_nodes in xml_tree.getiterator(‘file’):
AttributeError: ‘ElementTree’ object has no attribute ‘getiterator’
Error: Unable to find the signed file generated by tegraflash.py
cp: cannot stat ‘kernel/Image.sig’: No such file or directory
cp: cannot stat ‘kernel/dtb/tegra194-p3668-all-p3509-0000.dtb.sig’: No such file or directory

Hi,
We have shared the steps in
Facing the below errors while building the kernel for Javier NX module - #28 by DaneLLL

It should work well if you execute the steps one by one. Please try again.

pthon 3.9 and use xlrd library which call removed getiterator method, replace “getiterator” with iter in “./L4T_bsp/Linux_for_Tegra/bootloader/tegraflash_internal.py” and started working.

Hi,
If your host PC is in Ubuntu 18.04, by default python is linked to 2.7.17. We would suggest use this default version.

No. By default its 3.10. Is there any way to go back?? if so please share the commands

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