can't flash tx2

sudo ./flash.sh -r -k APP jetson-tx2 mmcblk0p1

cuikai@cuikai-VirtualBox:~/64_TX2/Linux_for_Tegra$ sudo ./flash.sh -r -k APP jetson-tx2 mmcblk0p1
###############################################################################

L4T BSP Information:

R28 (release), REVISION: 2.0, GCID: 10567845, BOARD: t186ref, EABI: aarch64,

DATE: Fri Mar 2 04:57:01 UTC 2018

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

Target Board Information:

Name: jetson-tx2, Board Family: t186ref, SoC: Tegra 186,

OpMode: production, Boot Authentication: ,

###############################################################################
./tegraflash.py --chip 0x18 --applet “/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin” --cmd “dump eeprom boardinfo cvm.bin” --skipuid
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.0040 ] Generating RCM messages
[ 0.0050 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm /home/cuikai/64_TX2/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin 0 0
[ 0.0075 ] RCM 0 is saved as rcm_0.rcm
[ 0.0178 ] RCM 1 is saved as rcm_1.rcm
[ 0.0194 ] List of rcm files are saved in rcm_list.xml
[ 0.0305 ]
[ 0.0306 ] Signing RCM messages
[ 0.0315 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0325 ] Assuming zero filled SBK key
[ 0.0585 ]
[ 0.0585 ] Copying signature to RCM mesages
[ 0.0596 ] tegrarcm_v2 --chip 0x18 --updatesig rcm_list_signed.xml
[ 0.0694 ]
[ 0.0695 ] Boot Rom communication
[ 0.0705 ] tegrarcm_v2 --chip 0x18 --rcm rcm_list_signed.xml --skipuid
[ 0.0721 ] RCM version 0X180001
[ 0.0807 ] Boot Rom communication completed
[ 1.0942 ]
[ 1.0954 ] tegrarcm_v2 --isapplet
[ 1.0964 ] USB communication failed.Check if device is in recovery
[ 1.8307 ]
[ 1.8447 ] tegradevflash_v2 --iscpubl
[ 1.8568 ] CPU Bootloader is not running on device.
[ 1.8766 ]
[ 2.9117 ] Retrieving EEPROM data
[ 2.9119 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/cuikai/64_TX2/Linux_for_Tegra/bootloader/cvm.bin
[ 2.9128 ] Applet version 01.00.0000
[ 2.9307 ] Saved platform info in /home/cuikai/64_TX2/Linux_for_Tegra/bootloader/cvm.bin
[ 3.0186 ]
Board ID(3310) version(B02)
copying bctfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg)… done.
copying misc_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-misc-si-l4t.cfg)… done.
copying pinmux_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg)… done.
copying pmic_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg)… done.
copying pmc_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg)… done.
copying prod_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg)… done.
copying scr_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/minimal_scr.cfg)… done.
copying scr_cold_boot_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/mobile_scr.cfg)… done.
copying bootrom_config(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg)… done.
copying dev_params(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/BCT/emmc.cfg)… done.
Existing bootloader(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
populating kernel to rootfs… done.
populating initrd to rootfs… done.
populating extlinux.conf.emmc to rootfs… done.
populating /home/cuikai/64_TX2/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to rootfs… done.
done.
Making Boot image… done.
Existing sosfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin) reused.
copying tegraboot(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/nvtboot.bin)… done.
Existing mb2blfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
Existing mtspreboot(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/preboot_d15_prod_cr.bin) reused.
Existing mts(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/mce_mts_d15_prod_cr.bin) reused.
Existing mb1file(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/mb1_prod.bin) reused.
Existing bpffile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying bpfdtbfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb)… done.
Existing scefile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/camera-rtcpu-sce.bin) reused.
Existing spefile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/spe.bin) reused.
copying wb0boot(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/warmboot.bin)… done.
Existing tosfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/tos.img) reused.
Existing eksfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/home/cuikai/64_TX2/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)… done.
Reusing existing system.img…
done.
Existing tbcfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/cboot.bin) reused.
copying tbcdtbfile(/home/cuikai/64_TX2/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)… done.
copying cfgfile(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/t186ref/cfg/flash_l4t_t186.xml) to flash.xml… done.
Existing flasher(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/nvtboot_recovery_cpu.bin) reused.
Existing flashapp(/home/cuikai/64_TX2/Linux_for_Tegra/bootloader/tegraflash.py) reused.
*** Updating [APP] with system.img ***
./tegraflash.py --bl nvtboot_recovery_cpu.bin --chip 0x18 --applet mb1_recovery_prod.bin --sdram_config P3310_A00_8GB_Samsung_8GB_lpddr4_204Mhz_A02_l4t.cfg --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmic_config tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg --pmc_config tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --prod_config tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --dev_params emmc.cfg --cfg flash.xml --bins “mb2_bootloader nvtboot_recovery.bin; mts_preboot preboot_d15_prod_cr.bin; mts_bootpack mce_mts_d15_prod_cr.bin; bpmp_fw bpmp.bin; bpmp_fw_dtb tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb; tlk tos.img; eks eks.img; bootloader_dtb tegra186-quill-p3310-1000-c03-00-base.dtb” --cmd “write APP system.img; reboot”
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.0277 ] Generating RCM messages
[ 0.0287 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0297 ] RCM 0 is saved as rcm_0.rcm
[ 0.0357 ] RCM 1 is saved as rcm_1.rcm
[ 0.0368 ] List of rcm files are saved in rcm_list.xml
[ 0.0517 ]
[ 0.0518 ] Signing RCM messages
[ 0.0527 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0613 ] Assuming zero filled SBK key
[ 0.0984 ]
[ 0.0985 ] Copying signature to RCM mesages
[ 0.0997 ] tegrarcm_v2 --chip 0x18 --updatesig rcm_list_signed.xml
[ 0.1153 ]
[ 0.1154 ] Boot Rom communication
[ 0.1163 ] tegrarcm_v2 --chip 0x18 --rcm rcm_list_signed.xml
[ 0.1198 ] BootRom is not running
[ 1.1434 ]
[ 1.1443 ] tegrarcm_v2 --isapplet
[ 1.1454 ] Applet version 01.00.0000
[ 1.1864 ]
[ 1.1874 ] tegrasign_v2 --key None --getmode mode.txt
[ 1.1886 ] Assuming zero filled SBK key
[ 1.2121 ]
[ 1.2121 ] Parsing partition layout
[ 1.2130 ] tegraparser_v2 --pt flash.xml.tmp
[ 1.2243 ]
[ 1.2244 ] Creating list of images to be signed
[ 1.2253 ] tegrahost_v2 --chip 0x18 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 1.2871 ]
[ 1.2872 ] Generating signatures
[ 1.2883 ] tegrasign_v2 --key None --list images_list.xml --pubkeyhash pub_key.key
[ 1.2893 ] Assuming zero filled SBK key
[ 1.6393 ]
[ 1.6394 ] Reading BCT from device for further operations
[ 1.6394 ] Generating blob
[ 1.6405 ] tegrahost_v2 --align blob_nvtboot_recovery_cpu.bin
[ 1.6473 ]
[ 1.6482 ] tegrahost_v2 --appendsigheader blob_nvtboot_recovery_cpu.bin zerosbk
[ 1.6771 ]
[ 1.6784 ] tegrasign_v2 --key None --list blob_nvtboot_recovery_cpu_sigheader.bin_list.xml
[ 1.6793 ] Assuming zero filled SBK key
[ 1.6964 ]
[ 1.6977 ] tegrahost_v2 --updatesigheader blob_nvtboot_recovery_cpu_sigheader.bin.encrypt blob_nvtboot_recovery_cpu_sigheader.bin.hash zerosbk
[ 1.7150 ]
[ 1.7169 ] tegrahost_v2 --align blob_nvtboot_recovery.bin
[ 1.7356 ]
[ 1.7368 ] tegrahost_v2 --appendsigheader blob_nvtboot_recovery.bin zerosbk
[ 1.7592 ]
[ 1.7604 ] tegrasign_v2 --key None --list blob_nvtboot_recovery_sigheader.bin_list.xml
[ 1.7640 ] Assuming zero filled SBK key
[ 1.7767 ]
[ 1.7780 ] tegrahost_v2 --updatesigheader blob_nvtboot_recovery_sigheader.bin.encrypt blob_nvtboot_recovery_sigheader.bin.hash zerosbk
[ 1.7954 ]
[ 1.7965 ] tegrahost_v2 --align blob_preboot_d15_prod_cr.bin
[ 1.8153 ]
[ 1.8163 ] tegrahost_v2 --appendsigheader blob_preboot_d15_prod_cr.bin zerosbk
[ 1.8254 ]
[ 1.8266 ] tegrasign_v2 --key None --list blob_preboot_d15_prod_cr_sigheader.bin_list.xml
[ 1.8365 ] Assuming zero filled SBK key
[ 1.8536 ]
[ 1.8549 ] tegrahost_v2 --updatesigheader blob_preboot_d15_prod_cr_sigheader.bin.encrypt blob_preboot_d15_prod_cr_sigheader.bin.hash zerosbk
[ 1.8659 ]
[ 1.8672 ] tegrahost_v2 --align blob_mce_mts_d15_prod_cr.bin
[ 1.8795 ]
[ 1.8805 ] tegrahost_v2 --appendsigheader blob_mce_mts_d15_prod_cr.bin zerosbk
[ 1.9071 ]
[ 1.9083 ] tegrasign_v2 --key None --list blob_mce_mts_d15_prod_cr_sigheader.bin_list.xml
[ 1.9093 ] Assuming zero filled SBK key
[ 2.0275 ]
[ 2.0310 ] tegrahost_v2 --updatesigheader blob_mce_mts_d15_prod_cr_sigheader.bin.encrypt blob_mce_mts_d15_prod_cr_sigheader.bin.hash zerosbk
[ 2.0459 ]
[ 2.0593 ] tegrahost_v2 --align blob_bpmp.bin
[ 2.0711 ]
[ 2.0721 ] tegrahost_v2 --appendsigheader blob_bpmp.bin zerosbk
[ 2.0872 ]
[ 2.0884 ] tegrasign_v2 --key None --list blob_bpmp_sigheader.bin_list.xml
[ 2.0920 ] Assuming zero filled SBK key
[ 2.1394 ]
[ 2.1407 ] tegrahost_v2 --updatesigheader blob_bpmp_sigheader.bin.encrypt blob_bpmp_sigheader.bin.hash zerosbk
[ 2.1604 ]
[ 2.1645 ] tegrahost_v2 --align blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb
[ 2.1795 ]
[ 2.1806 ] tegrahost_v2 --appendsigheader blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb zerosbk
[ 2.1993 ]
[ 2.2061 ] tegrasign_v2 --key None --list blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2_sigheader.dtb_list.xml
[ 2.2071 ] Assuming zero filled SBK key
[ 2.2558 ]
[ 2.2570 ] tegrahost_v2 --updatesigheader blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2_sigheader.dtb.encrypt blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2_sigheader.dtb.hash zerosbk
[ 2.2753 ]
[ 2.2825 ] tegrahost_v2 --align blob_tos.img
[ 2.2993 ]
[ 2.3004 ] tegrahost_v2 --appendsigheader blob_tos.img zerosbk
[ 2.3154 ]
[ 2.3231 ] tegrasign_v2 --key None --list blob_tos_sigheader.img_list.xml
[ 2.3240 ] Assuming zero filled SBK key
[ 2.3375 ]
[ 2.3387 ] tegrahost_v2 --updatesigheader blob_tos_sigheader.img.encrypt blob_tos_sigheader.img.hash zerosbk
[ 2.3698 ]
[ 2.3709 ] tegrahost_v2 --align blob_eks.img
[ 2.3821 ]
[ 2.3831 ] tegrahost_v2 --appendsigheader blob_eks.img zerosbk
[ 2.3991 ]
[ 2.4003 ] tegrasign_v2 --key None --list blob_eks_sigheader.img_list.xml
[ 2.4107 ] Assuming zero filled SBK key
[ 2.4192 ]
[ 2.4204 ] tegrahost_v2 --updatesigheader blob_eks_sigheader.img.encrypt blob_eks_sigheader.img.hash zerosbk
[ 2.4312 ]
[ 2.4322 ] tegrahost_v2 --align blob_tegra186-quill-p3310-1000-c03-00-base.dtb
[ 2.4473 ]
[ 2.4483 ] tegrahost_v2 --appendsigheader blob_tegra186-quill-p3310-1000-c03-00-base.dtb zerosbk
[ 2.4719 ]
[ 2.4730 ] tegrasign_v2 --key None --list blob_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb_list.xml
[ 2.4765 ] Assuming zero filled SBK key
[ 2.5155 ]
[ 2.5169 ] tegrahost_v2 --updatesigheader blob_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt blob_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.hash zerosbk
[ 2.5340 ]
[ 2.5351 ] tegrahost_v2 --generateblob blob.xml blob.bin
[ 2.5409 ] number of images in blob are 9
[ 2.5420 ] blobsize is 3749000
[ 2.5425 ] Added binary blob_nvtboot_recovery_cpu_sigheader.bin.encrypt of size 189824
[ 2.5482 ] Added binary blob_nvtboot_recovery_sigheader.bin.encrypt of size 79440
[ 2.5502 ] Added binary blob_preboot_d15_prod_cr_sigheader.bin.encrypt of size 63024
[ 2.5551 ] Added binary blob_mce_mts_d15_prod_cr_sigheader.bin.encrypt of size 2076832
[ 2.5586 ] Added binary blob_bpmp_sigheader.bin.encrypt of size 529440
[ 2.5606 ] Added binary blob_tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2_sigheader.dtb.encrypt of size 466160
[ 2.5684 ] Added binary blob_tos_sigheader.img.encrypt of size 62976
[ 2.5779 ] Added binary blob_eks_sigheader.img.encrypt of size 1488
[ 2.5779 ] Added binary blob_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt of size 279664
[ 2.5780 ]
[ 2.5781 ] Sending bootloader and pre-requisite binaries
[ 2.5792 ] tegrarcm_v2 --download blob blob.bin
[ 2.5804 ] Applet version 01.00.0000
[ 2.6002 ] Sending blob
[ 2.6005 ] […] 100%
[ 3.5579 ]
[ 3.5589 ] tegrarcm_v2 --boot recovery
[ 3.5685 ] Applet version 01.00.0000
[ 3.5992 ]
[ 3.6002 ] tegrarcm_v2 --isapplet
[ 4.2837 ]
[ 4.2867 ] tegradevflash_v2 --iscpubl
[ 4.2900 ] CPU Bootloader is not running on device.
[ 5.0595 ]
[ 36.2011 ] Writing partition
[ 36.2029 ] tegradevflash_v2 --write APP /home/cuikai/64_TX2/Linux_for_Tegra/bootloader/system.img
[ 36.2048 ] CPU Bootloader is not running on device.
[ 36.2114 ]
Error: Return value 4
Command tegradevflash_v2 --write APP /home/cuikai/64_TX2/Linux_for_Tegra/bootloader/system.img
Failed to flash/read t186ref.

can anyone help me ?thank you very much

i am build with kernel image , but kernel can’t boot up at now ,and i want to flash tx2 board,but it can’t work well at my side

Is this a VM on the host side? If so, then VMs do this all the time.

It looks like the prompt shows VirtualBox, so probably:

cuikai@cuikai-VirtualBox:~/64_TX2/Linux_for_Tegra$ sudo ./flash.sh -r -k APP jetson-tx2 mmcblk0p1

@seasonkky, please flash from a natively-installed Ubuntu 16.04 x86_64 host. JetPack-L4T doesn’t support flashing from within VM’s.

@dusty_nv thanks ,i will try with host

@dusty_nv hi,how can i just flash kernel Image file?

i use 64_TX2/Linux_for_Tegra$ sudo ./flash.sh -K kernel/Image jetson-tx2 mmcblk0p1

but it also flash all img

Don’t forget “-r” to prevent generating a new system.img. Before you do anything though you should have a clone for backup.

To add just a kernel, if not doing anything special, you can just copy it to “/boot/”. Preferably rename it from “Image” to something like “Image-custom”, and edit a new entry in “/boot/extlinux/extlinux.conf” in order to leave the original alive (and selectable via serial console if there is trouble…you shouldn’t work on kernels, drivers, so on, unless you have a serial console available).