OE4T / tegra-demo-distro

Reference/demonstration distro for meta-tegra
MIT License
73 stars 74 forks source link

Can't Flash Jetson TX2 NX with Kirkstone branch #223

Closed Gandouge78 closed 2 years ago

Gandouge78 commented 2 years ago

Hi, I try to flash my TX2NX with a fresh build of tegra-demo-distro using the branch Kirkstone. Here what I done

  1. clone tegra-demo-distro and checkout branche kirkstone
  2. git submodule update --init
  3. . ./setup-env --machine jetson-xavier-nx-devkit-tx2-nx
  4. bitbake core-image-minimal
  5. tar xvf core-image-minimal-jetson-xavier-nx-devkit-tx2-nx.tegraflash.tar.gz
  6. sudo ./doflash.sh

And the last part failed every time. But when I try my build from dunfell it work and i can flash it.

Here the log of doflash.sh

[   0.0096 ] tegrasign_v3.py --getmode mode.txt --key None
[   0.0097 ] Assuming zero filled SBK key
[   0.0026 ] Generating RCM messages
[   0.0049 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[   0.0062 ] RCM 0 is saved as rcm_0.rcm
[   0.0068 ] RCM 1 is saved as rcm_1.rcm
[   0.0068 ] List of rcm files are saved in rcm_list.xml
[   0.0068 ] 
[   0.0068 ] Signing RCM messages
[   0.0168 ] tegrasign_v3.py --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0169 ] Assuming zero filled SBK key
[   0.0174 ] Copying signature to RCM mesages
[   0.0200 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[   0.0224 ] 
[   0.0225 ] Parsing partition layout
[   0.0252 ] tegraparser_v2 --pt flash.xml.tmp
[   0.0268 ] 
[   0.0270 ] Using default ramcode: 0
[   0.0270 ] Disable BPMP dtb trim, using default dtb
[   0.0270 ] 
[   0.0270 ] Creating list of images to be signed
[   0.0285 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[   0.0581 ] 
[   0.0581 ] Generating signatures
[   0.0677 ] tegrasign_v3.py --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0678 ] Assuming zero filled SBK key
[   0.3394 ] Generating br-bct
[   0.3417 ] Updating dev and MSS params in BR BCT
[   0.3418 ] tegrabct_v2 --dev_param emmc.cfg --sdram jetson-xavier-nx-devkit-tx2-nx.cfg --brbct br_bct.cfg --chip 0x18 0
[   0.3570 ] 
[   0.3571 ] Updating bl info
[   0.3600 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.3622 ] 
[   0.3623 ] Updating smd info
[   0.3646 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 --updatesmdinfo flash.xml.bin
[   0.3661 ] 
[   0.3661 ] Updating Odmdata
[   0.3688 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatefields Odmdata =0x2090000
[   0.3717 ] 
[   0.3718 ] Get Signed section of bct
[   0.3746 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --listbct bct_list.xml
[   0.3763 ] 
[   0.3788 ] tegrasign_v3.py --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.3803 ] Assuming zero filled SBK key
[   0.4339 ] 
[   0.4339 ] Updating BCT with signature
[   0.4368 ] tegrabct_v2 --brbct br_bct_BR.bct --chip 0x18 0 --updatesig bct_list_signed.xml
[   0.4401 ] 
[   0.4402 ] Generating coldboot mb1-bct
[   0.4429 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_cold_boot_bct.cfg --sdram jetson-xavier-nx-devkit-tx2-nx.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr mobile_scr.cfg --pinmux tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg --pmc tegra186-mb1-bct-pad-p3636-0001-a00.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
[   0.4442 ] MB1-BCT version: 0xf
[   0.4445 ] Copying Sdram info from 1 to 2 set
[   0.4582 ] Copying Sdram info from 2 to 3 set
[   0.4588 ] Packing sdram param for instance[0]
[   0.4592 ] Packing sdram param for instance[1]
[   0.4595 ] Packing sdram param for instance[2]
[   0.4598 ] Packing sdram param for instance[3]

[   0.4601 ] Parsing config file :tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg 
[   0.4607 ] Appending platform config data of size :- 2280
[   0.4611 ] 
[   0.4611 ] Parsing config file :mobile_scr.cfg 
[   0.4611 ] Appending platform config data of size :- 12240
[   0.4611 ] 
[   0.4611 ] Parsing config file :tegra186-mb1-bct-pad-p3636-0001-a00.cfg 
[   0.4611 ] Appending platform config data of size :- 24
[   0.4611 ] 
[   0.4611 ] Parsing config file :tegra186-mb1-bct-pmic-p3636-0001-a00.cfg 
[   0.4611 ] Appending platform config data of size :- 508
[   0.4611 ] 
[   0.4611 ] Parsing config file :tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg 
[   0.4611 ] Appending platform config data of size :- 64
[   0.4611 ] 
[   0.4612 ] Parsing config file :tegra186-mb1-bct-prod-p3636-0001-a00.cfg 
[   0.4612 ] Appending platform config data of size :- 1628
[   0.4612 ] 
[   0.4612 ] Updating mb1-bct with firmware information
[   0.4638 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatefwinfo flash.xml.bin
[   0.4652 ] MB1-BCT version: 0xf
[   0.4659 ] 
[   0.4660 ] Updating mb1-bct with storage information
[   0.4687 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_cold_boot_bct_MB1.bct --updatestorageinfo flash.xml.bin
[   0.4702 ] MB1-BCT version: 0xf
[   0.4709 ] 
[   0.4732 ] tegrahost_v2 --chip 0x18 --align mb1_cold_boot_bct_MB1.bct
[   0.4743 ] 
[   0.4766 ] tegrahost_v2 --chip 0x18 0 --appendsigheader mb1_cold_boot_bct_MB1.bct zerosbk
[   0.4778 ] 
[   0.4879 ] tegrasign_v3.py --key None --list mb1_cold_boot_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.4881 ] Assuming zero filled SBK key
[   0.4888 ] tegrahost_v2 --chip 0x18 0 --updatesigheader mb1_cold_boot_bct_MB1_sigheader.bct.encrypt mb1_cold_boot_bct_MB1_sigheader.bct.hash zerosbk
[   0.4902 ] 
[   0.4904 ] Generating recovery mb1-bct
[   0.4928 ] tegrabct_v2 --chip 0x18 0 --mb1bct mb1_bct.cfg --sdram jetson-xavier-nx-devkit-tx2-nx.cfg --misc tegra186-mb1-bct-misc-si-l4t.cfg --scr minimal_scr.cfg --pinmux tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg --pmc tegra186-mb1-bct-pad-p3636-0001-a00.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
[   0.4939 ] MB1-BCT version: 0xf
[   0.4942 ] Copying Sdram info from 1 to 2 set
[   0.5094 ] Copying Sdram info from 2 to 3 set
[   0.5098 ] Packing sdram param for instance[0]
[   0.5101 ] Packing sdram param for instance[1]
[   0.5104 ] Packing sdram param for instance[2]
[   0.5106 ] Packing sdram param for instance[3]

[   0.5109 ] Parsing config file :tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg 
[   0.5114 ] Appending platform config data of size :- 2280

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

[   0.5124 ] Parsing config file :tegra186-mb1-bct-pad-p3636-0001-a00.cfg 
[   0.5127 ] Appending platform config data of size :- 24
[   0.5127 ] 
[   0.5127 ] Parsing config file :tegra186-mb1-bct-pmic-p3636-0001-a00.cfg 
[   0.5127 ] Appending platform config data of size :- 508
[   0.5127 ] 
[   0.5128 ] Parsing config file :tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg 
[   0.5128 ] Appending platform config data of size :- 64
[   0.5128 ] 
[   0.5128 ] Parsing config file :tegra186-mb1-bct-prod-p3636-0001-a00.cfg 
[   0.5128 ] Appending platform config data of size :- 1628
[   0.5128 ] 
[   0.5129 ] Updating mb1-bct with firmware information
[   0.5152 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatefwinfo flash.xml.bin
[   0.5161 ] MB1-BCT version: 0xf
[   0.5167 ] 
[   0.5167 ] Updating mb1-bct with storage information
[   0.5196 ] tegrabct_v2 --chip 0x18 --mb1bct mb1_bct_MB1.bct --updatestorageinfo flash.xml.bin
[   0.5214 ] MB1-BCT version: 0xf
[   0.5219 ] 
[   0.5243 ] tegrahost_v2 --chip 0x18 --align mb1_bct_MB1.bct
[   0.5254 ] 
[   0.5278 ] tegrahost_v2 --chip 0x18 0 --appendsigheader mb1_bct_MB1.bct zerosbk
[   0.5295 ] 
[   0.5400 ] tegrasign_v3.py --key None --list mb1_bct_MB1_sigheader.bct_list.xml --pubkeyhash pub_key.key
[   0.5401 ] Assuming zero filled SBK key
[   0.5410 ] tegrahost_v2 --chip 0x18 0 --updatesigheader mb1_bct_MB1_sigheader.bct.encrypt mb1_bct_MB1_sigheader.bct.hash zerosbk
[   0.5422 ] 
[   0.5424 ] Copying signatures
[   0.5448 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.5796 ] 
[   0.5797 ] Boot Rom communication
[   0.5819 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[   0.5830 ] BootRom is not running
[   5.7503 ] 
[   6.7539 ] tegrarcm_v2 --isapplet
[   6.7550 ] Applet version 01.00.0000
[   6.8282 ] 
[   6.8283 ] Sending BCTs
[   6.8305 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt
[   6.8314 ] Applet version 01.00.0000
[   6.9205 ] Sending bct_bootrom
[   6.9207 ] [................................................] 100%
[   6.9221 ] Sending bct_mb1
[   6.9232 ] [................................................] 100%
[   6.9304 ] 
Error: Return value 8
Command tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt

Have you any idea of what I'm doing wrong ? I used core-image-minimal to avoid long build.

madisongh commented 2 years ago

I just tried this on my TX2-NX (mounted in a Xavier NX dev kit), and had no issue. The NVIDIA tools do a lousy job of error reporting, but usually this sort of thing happens if there's a problem with USB communication. Have you followed the guidelines on the wiki page? In particular, using as direct a connection as possible (no hubs), and a good quality cable, and flashing directly from your native Linux (not from a container or VM) works best.

Gandouge78 commented 2 years ago

Ok I will try again with another cable.

Gandouge78 commented 2 years ago

Found my problem. I recover my Xavier NX dev kit in 2/3 weeks so I used my custom carrier board. For the flash to succes I need to replace the pinmux and tegra186-bpmp-p3636-0001-a00-00.dtb.

Now every works thanks