Flashing TX2 NX custom board

Hi Team,

I am trying to flash TX2 NX with a custom carrier board using flash.sh script.
The flashing gets struck in the following line.

*** Flashing target device started. ***
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.0021 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0031 ] Assuming zero filled SBK key
[ 0.0059 ]
[ 0.0061 ] Generating RCM messages
[ 0.0077 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0085 ] RCM 0 is saved as rcm_0.rcm
[ 0.0106 ] RCM 1 is saved as rcm_1.rcm
[ 0.0106 ] List of rcm files are saved in rcm_list.xml
[ 0.0106 ]
[ 0.0107 ] Signing RCM messages
[ 0.0122 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0135 ] Assuming zero filled SBK key
[ 0.0169 ]
[ 0.0170 ] Copying signature to RCM mesages
[ 0.0192 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[ 0.0210 ]
[ 0.0210 ] Parsing partition layout
[ 0.0238 ] tegraparser_v2 --pt flash.xml.tmp
[ 0.0264 ]
[ 0.0265 ] Creating list of images to be signed
[ 0.0288 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 0.3171 ]
[ 0.3171 ] Generating signatures
[ 0.3182 ] tegrasign_v2 --key None --list images_list.xml --pubkeyhash pub_key.key
[ 0.3190 ] Assuming zero filled SBK key
[ 2.1975 ]
[ 2.1977 ] Generating br-bct
[ 2.3160 ] Updating dev and MSS params in BR BCT
[ 2.3164 ] tegrabct_v2 --dev_param emmc.cfg --sdram tegra186-mb1-bct-memcfg-p3636-0001-a01.cfg --brbct br_bct.cfg --chip 0x18 0
[ 2.4812 ]
[ 2.4813 ] Updating bl info
[ 2.4829 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[ 2.9321 ]
[ 2.9323 ] Updating smd info
[ 2.9366 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 --updatesmdinfo flash.xml.bin
[ 2.9414 ]
[ 2.9416 ] Updating Odmdata
[ 2.9454 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatefields Odmdata =0x2090000
[ 2.9509 ]
[ 2.9512 ] Get Signed section of bct
[ 2.9565 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --listbct bct_list.xml
[ 2.9615 ]
[ 2.9665 ] tegrasign_v2 --key None --list bct_list.xml --pubkeyhash pub_key.key
[ 2.9697 ] Assuming zero filled SBK key
[ 2.9706 ]
[ 2.9707 ] Updating BCT with signature
[ 2.9730 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatesig bct_list_signed.xml
[ 2.9751 ]
[ 2.9752 ] Generating coldboot mb1-bct
[ 2.9769 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_cold_boot_bct.cfg --sdram tegra186-mb1-bct-memcfg-p3636-0001-a01.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr mobile_scr.cfg --pmic tegra186-mb1-bct-pmic-p3636-0001-a00.cfg --brcommand tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg --prod tegra186-mb1-bct-prod-p3636-0001-a00.cfg
[ 2.9782 ] MB1-BCT version: 0xf
[ 2.9786 ] Copying Sdram info from 1 to 2 set
[ 2.9973 ] Copying Sdram info from 2 to 3 set
[ 2.9980 ] Packing sdram param for instance[0]
[ 2.9982 ] Packing sdram param for instance[1]
[ 2.9984 ] Packing sdram param for instance[2]
[ 2.9986 ] Packing sdram param for instance[3]

[ 2.9988 ] Parsing config file :mobile_scr.cfg
[ 2.9990 ] Appending platform config data of size :- 12240

[ 3.0005 ] Parsing config file :tegra186-mb1-bct-pmic-p3636-0001-a00.cfg
[ 3.0009 ] Appending platform config data of size :- 508

[ 3.0012 ] Parsing config file :tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg
[ 3.0013 ] Appending platform config data of size :- 64
[ 3.0013 ]
[ 3.0014 ] Parsing config file :tegra186-mb1-bct-prod-p3636-0001-a00.cfg
[ 3.0014 ] Appending platform config data of size :- 1628
[ 3.0014 ]
[ 3.0014 ] Updating mb1-bct with firmware information
[ 3.0035 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
[ 3.0047 ] MB1-BCT version: 0xf
[ 3.0051 ]
[ 3.0051 ] Updating mb1-bct with storage information
[ 3.0060 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatestorageinfo flash.xml.bin
[ 3.0068 ] MB1-BCT version: 0xf
[ 3.0072 ]
[ 3.0081 ] tegrahost_v2 --chip 0x18 --align mb1_cold_boot_bct_MB1.bct
[ 3.0090 ]
[ 3.0098 ] tegrahost_v2 --appendsigheader mb1_cold_boot_bct_MB1.bct zerosbk
[ 3.0109 ]
[ 3.0120 ] tegrasign_v2 --key None --list mb1_cold_boot_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[ 3.0128 ] Assuming zero filled SBK key
[ 3.0143 ]
[ 3.0155 ] tegrahost_v2 --updatesigheader mb1_cold_boot_bct_MB1_sigheader.bct.encrypt mb1_cold_boot_bct_MB1_sigheader.bct.hash zerosbk
[ 3.0165 ]
[ 3.0166 ] Generating recovery mb1-bct
[ 3.0175 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_bct.cfg --sdram tegra186-mb1-bct-memcfg-p3636-0001-a01.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr minimal_scr.cfg --pmic tegra186-mb1-bct-pmic-p3636-0001-a00.cfg --brcommand tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg --prod tegra186-mb1-bct-prod-p3636-0001-a00.cfg
[ 3.0184 ] MB1-BCT version: 0xf
[ 3.0186 ] Copying Sdram info from 1 to 2 set
[ 3.0320 ] Copying Sdram info from 2 to 3 set
[ 3.0324 ] Packing sdram param for instance[0]
[ 3.0327 ] Packing sdram param for instance[1]
[ 3.0330 ] Packing sdram param for instance[2]
[ 3.0332 ] Packing sdram param for instance[3]

[ 3.0335 ] Parsing config file :minimal_scr.cfg
[ 3.0338 ] Appending platform config data of size :- 12240

[ 3.0346 ] Parsing config file :tegra186-mb1-bct-pmic-p3636-0001-a00.cfg
[ 3.0352 ] Appending platform config data of size :- 508
[ 3.0352 ]
[ 3.0352 ] Parsing config file :tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg
[ 3.0352 ] Appending platform config data of size :- 64
[ 3.0352 ]
[ 3.0353 ] Parsing config file :tegra186-mb1-bct-prod-p3636-0001-a00.cfg
[ 3.0353 ] Appending platform config data of size :- 1628
[ 3.0353 ]
[ 3.0354 ] Updating mb1-bct with firmware information
[ 3.0371 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatefwinfo flash.xml.bin
[ 3.0380 ] MB1-BCT version: 0xf
[ 3.0383 ]
[ 3.0384 ] Updating mb1-bct with storage information
[ 3.0392 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatestorageinfo flash.xml.bin
[ 3.0399 ] MB1-BCT version: 0xf
[ 3.0404 ]
[ 3.0412 ] tegrahost_v2 --chip 0x18 --align mb1_bct_MB1.bct
[ 3.0420 ]
[ 3.0429 ] tegrahost_v2 --appendsigheader mb1_bct_MB1.bct zerosbk
[ 3.0439 ]
[ 3.0450 ] tegrasign_v2 --key None --list mb1_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[ 3.0458 ] Assuming zero filled SBK key
[ 3.0473 ]
[ 3.0485 ] tegrahost_v2 --updatesigheader mb1_bct_MB1_sigheader.bct.encrypt mb1_bct_MB1_sigheader.bct.hash zerosbk
[ 3.0495 ]
[ 3.0497 ] Copying signatures
[ 3.0506 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[ 3.3028 ]
[ 3.3030 ] Boot Rom communication
[ 3.3063 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[ 3.3093 ] BootRom is not running
[ 8.3617 ]
[ 9.3686 ] tegrarcm_v2 --isapplet
[ 9.3733 ] Applet version 01.00.0000
[ 9.3921 ]
[ 9.3923 ] Sending BCTs
[ 9.3980 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[ 9.4019 ] Applet version 01.00.0000
[ 9.4244 ] Sending bct_bootrom
[ 9.4251 ] […] 100%
[ 9.4277 ] Sending bct_mb1
[ 9.4284 ] […] 100%

Could you please give some pointers to find root cause of this issue.

Regards,
Ajith.

Dump the uart log and it shall tell where it gets stuck during flash.

Hi @WayneWWW

I got the following error message from UART logs

[0164.561] E> MB1 BCT does not have PMC table
[0164.565] E> PMC init failed
[0164.568] E> MB1 BCT does not have pinmux table
[0164.572] E> Pinmux init failed
[0164.577] C> I2C command failed
[0164.580] C> block index = (0) and rail_id = (1)
[0164.584] C> Addr: Reg = [0x78:0x00]: 336166918
[0164.590] C> I2C command failed
[0164.593] C> block index = (1) and rail_id = (1)
[0164.597] C> Addr: Reg = [0x78:0x2b]: 336166918
[0164.603] C> I2C command failed
[0164.606] C> block index = (2) and rail_id = (1)
[0164.611] C> Addr: Reg = [0x78:0x2a]: 336166918
[0164.780] !!! Exception !!! [lr:0x40022a84, dfar:0x22110c0, dfsr:0x1008]
[0164.786] MB1-BIT() boot status dump :
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[0164.815] Last seen error : 0x00000000

Thanks,
Ajith.

Do you have NX devkit there? Could you flash that module + NX devkit first to make sure that driver package is fine?

Hi @WayneWWW

I have NX devkit. I will check with Devkit once.

Thanks,
Ajith.