The initial value of the calculation of CRC-8 of EEPROM, Jetson AGX Xavier

I edited EEPROM and now the Jetson AGX Xavier can’t be flashed.
I tried to calculate the 256th bit of EEPROM with CRC-8 referring to the following, but I do not know the initial value of the calculation.

What is the initial value of crc in the CRC-8 formula?

Also, there is an Xavier that accidentally deleted the dtb file and could not boot up, and because I changed the EEPROM, I can not flash it. How can I restore this Xavier?

There is no “initial value” for the crc value calculation. This value differs in every module.

The value in bit 255 is the checksum value from bit 0~254.
Thus, for example, if you change any value in bit 0~254, then you have to re-calculate bit 255. Otherwise, it will show you error.

If this device is totally not able to boot up, then please RMA your device.

Thank you for your reply, WayneWWW.

Maybe I can calculate the crc value. I didn’t understand the meaning of “checksum”.
(“Initial value” I was expecting is “0x00”.)

I have a question about RMA.
The warranty period of one year may have expired. Can you replace it even in that case?

I can help you reply the technical problem but the warranty is not in my scope so I cannot reply you.

Use the term checksum is because the bit 255 in eeprom is based on the sum of bit 0~254…

For example, the eeprom has the content of the serial number of each module, this value will be take into the calculation. That is why I said every module shares different crc value here. For example, module A has serial number 12345, and it will be take into the calculation. Thus, another module B with serial number 34567 in eeprom will give out different value in bit 255 in your eeprom.

The tool just uses the same algorithm to sum up the value from bit 0 to bit 254 and compare it with the value in bit 255. If it differs, then error.

Of course the algorithm here is not really “sum up”, it is just an example for you to understand. The real algorithm is in the document I shared above.

1 Like

Thank you. Maybe I understand.

The initial value meant “the initial value of the calculation”.
In the formula below, I didn’t know the value of crc when B = 0 …
This self-solved as described above.

crc = AddToCRC(B, crc)

I’ll ask another department about the warranty. Thank you.

@Nyanpy00 , please also try to set SKIP_EEPROM_CHECK=1 when running flash.sh and see if this will let you flash the board.

1 Like

It didn’t work…
The following is the flash log.

###############################################################################

L4T BSP Information:

R32 , REVISION: 3.1

###############################################################################

Target Board Information:

Name: jetson-xavier, Board Family: t186ref, SoC: Tegra 194,

OpMode: production, Boot Authentication: NS,

###############################################################################
copying soft_fuses(/home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)… done.
./tegraflash.py --chip 0x19 --applet “/home/deng/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod.bin” --skipuid --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg --bins “mb2_applet nvtboot_applet_t194.bin” --cmd “dump eeprom boardinfo cvm.bin;reboot recovery”
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.0050 ] Generating RCM messages
[ 0.0062 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod.bin zerosbk
[ 0.0074 ] Header already present for /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod.bin
[ 0.0117 ]
[ 0.0155 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0173 ] Assuming zero filled SBK key
[ 0.0176 ]
[ 0.0192 ] tegrasign_v2 --key None --file /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin --offset 2960 --length 1136 --pubkeyhash pub_key.key
[ 0.0204 ] Assuming zero filled SBK key
[ 0.0213 ]
[ 0.0225 ] tegrahost_v2 --chip 0x19 0 --updatesigheader /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.hash zerosbk
[ 0.0275 ]
[ 0.0292 ] tegrabct_v2 --chip 0x19 0 --sfuse tegra194-mb1-soft-fuses-l4t.cfg.pdf sfuse.bin
[ 0.0318 ]
[ 0.0333 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x19 0 --sfuses sfuse.bin --download rcm /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin 0 0
[ 0.0345 ] RCM 0 is saved as rcm_0.rcm
[ 0.0383 ] RCM 1 is saved as rcm_1.rcm
[ 0.0383 ] RCM 2 is saved as rcm_2.rcm
[ 0.0383 ] List of rcm files are saved in rcm_list.xml
[ 0.0383 ]
[ 0.0383 ] Signing RCM messages
[ 0.0395 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key --getmontgomeryvalues montgomery.bin
[ 0.0406 ] Assuming zero filled SBK key
[ 0.0416 ]
[ 0.0416 ] Copying signature to RCM mesages
[ 0.0434 ] tegrarcm_v2 --chip 0x19 0 --updatesig rcm_list_signed.xml
[ 0.0490 ]
[ 0.0490 ] Boot Rom communication
[ 0.0504 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
[ 0.0516 ] RCM version 0X190001
[ 0.0533 ] Boot Rom communication completed
[ 1.0690 ]
[ 2.0737 ] tegrarcm_v2 --isapplet
[ 2.0761 ] Applet version 01.00.0000
[ 2.0912 ]
[ 2.0934 ] tegrarcm_v2 --ismb2
[ 2.1273 ]
[ 2.1307 ] tegrahost_v2 --chip 0x19 --align nvtboot_applet_t194.bin
[ 2.1407 ]
[ 2.1457 ] tegrahost_v2 --chip 0x19 0 --magicid PLDT --appendsigheader nvtboot_applet_t194.bin zerosbk
[ 2.1496 ] adding BCH for nvtboot_applet_t194.bin
[ 2.1591 ]
[ 2.1647 ] tegrasign_v2 --key None --list nvtboot_applet_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 2.1705 ] Assuming zero filled SBK key
[ 2.1726 ]
[ 2.1770 ] tegrahost_v2 --chip 0x19 0 --updatesigheader nvtboot_applet_t194_sigheader.bin.encrypt nvtboot_applet_t194_sigheader.bin.hash zerosbk
[ 2.1830 ]
[ 2.1849 ] tegrarcm_v2 --download mb2 nvtboot_applet_t194_sigheader.bin.encrypt
[ 2.1864 ] Applet version 01.00.0000
[ 2.2037 ] Sending mb2
[ 2.2041 ] […] 100%
[ 2.2165 ]
[ 2.2197 ] tegrarcm_v2 --boot recovery
[ 2.2227 ] Applet version 01.00.0000
[ 2.2435 ]
[ 3.2482 ] tegrarcm_v2 --isapplet
[ 3.2677 ]
[ 3.2696 ] tegrarcm_v2 --ismb2
[ 3.2714 ] MB2 Applet version 01.00.0000
[ 3.3040 ]
[ 3.3073 ] tegrarcm_v2 --ismb2
[ 3.3115 ] MB2 Applet version 01.00.0000
[ 3.3498 ]
[ 3.3529 ] Retrieving EEPROM data
[ 3.3533 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/cvm.bin
[ 3.3562 ] MB2 Applet version 01.00.0000
[ 3.3920 ] 0000000036360018:
[ 3.4444 ]
[ 3.4475 ] tegradevflash_v2 --oem platformdetails eeprom cvm /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/cvm.bin
[ 3.4505 ] CPU Bootloader is not running on device.
[ 3.4537 ]
Error: Return value 4
Command tegradevflash_v2 --oem platformdetails eeprom cvm /home/username/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_AGX_XAVIER/Linux_for_Tegra/bootloader/cvm.bin
Reading board information failed.

Can you directly search the keyword SKIP_EEPROM_CHECK in flash.sh and remove those function that will be executed?

Haven’t used this parameter for long time. It should be added to the board config instead of parameters in flash.sh.
But directly remove this part from flash.sh should also work.

I deleted the following code in flash.sh and ran it, but it didn’t work…
I got the same error.

if [ “${SKIP_EEPROM_CHECK}” = “” ]; then
boardid=./chkbdinfo -i cvm.bin;
boardversion=./chkbdinfo -f cvm.bin;
boardsku=./chkbdinfo -k cvm.bin;
boardrevision=./chkbdinfo -r cvm.bin;
chkerr “Parsing board information failed.”;
fi;

What same error?

The following error.

Hi,

please also pass these parameters to the flash.sh. It was read from eeprom, but since we skip it now, need to manually set it.

sudo BOARDID=2888 FAB=400 BOARDSKU=0001 BOARDREV=D.0 ./flash.sh …

1 Like

It worked perfectly!!!
I can flash Xavier and clone OS file.
Thank you so much.

Please remember to correct your eeprom value after you can boot up.

1 Like

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