Flash multiple Jetson Nano production devices

Dear all,
Is there a way to generate an image of a Nano production system (customized by us) and flash it to another (not flashed) Nano production system? If yes, is it possible to parallelize the flashing process (flash multiple devices at the same time)?

Hi,

Multi-flash support would be ready in next jetpack release.

Nice.
I am trying to create an image for cloning as described on https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html
However the cloing procedure does not work for me.
I am calling “sudo ./flash.sh -r -k APP -G backup.img jetson-nano-emmc mmcblk0p1”.
The script seems stuck after the line “…tegradevflash --oem platformdetails storage storage_info.bin”.
What am I missing?
(using ubuntu 18.04 in virtualbox VM as host)

terminal gives following output and does not proceed after print out the last line

sudo ./flash.sh -r -k APP -G backup.img jetson-nano-emmc mmcblk0p1
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 2.1
###############################################################################
# Target Board Information:
# Name: jetson-nano-emmc, Board Family: t210ref, SoC: Tegra 210, 
# OpMode: production, Boot Authentication: , 
###############################################################################
./tegraflash.py --chip 0x21 --applet "/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/nvtboot_recovery.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin" 
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.0033 ] Generating RCM messages
[   0.0041 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/nvtboot_recovery.bin 0 0
[   0.0049 ] RCM 0 is saved as rcm_0.rcm
[   0.0055 ] RCM 1 is saved as rcm_1.rcm
[   0.0055 ] List of rcm files are saved in rcm_list.xml
[   0.0055 ] 
[   0.0055 ] Signing RCM messages
[   0.0063 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0070 ] Assuming zero filled SBK key
[   0.0128 ] 
[   0.0129 ] Copying signature to RCM mesages
[   0.0139 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0156 ] 
[   0.0157 ] Boot Rom communication
[   0.0168 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml --skipuid
[   0.0176 ] RCM version 0X210001
[   0.0616 ] Boot Rom communication completed
[   1.0690 ] 
[   1.0692 ] dump EEPROM info
[   1.0714 ] tegrarcm --oem platformdetails eeprom /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/cvm.bin
[   1.0740 ] Applet version 00.01.0000
[   1.0762 ] Saved platform info in /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/cvm.bin
[   1.1530 ] 
Board ID(3448) version(400) 
copying bctfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/BCT/P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg)... done.
copying bootloader(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
copying initrd(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
	populating kernel to rootfs... done.
	populating initrd to rootfs... done.
	populating /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0002-p3449-0000-b00.dtb to rootfs... done.
Making Boot image... done.
Existing sosfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/nvtboot.bin)... done.
copying cpu_bootloader(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
copying bpffile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/sc7entry-firmware.bin)... done.
Existing badpagefile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/badpage.bin) reused.
copying wb0boot(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/tos-mon-only.img) reused.
Existing eksfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0002-p3449-0000-b00.dtb)... done.
Warning (reg_format): "reg" property in /i2c@7000c000/temp-sensor@4c has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c@7000c000/temp-sensor@4c
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c@7000c000/temp-sensor@4c
Warning (reg_format): "reg" property in /i2c@7000c000/temp-sensor@4c has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c@7000c000/temp-sensor@4c
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c@7000c000/temp-sensor@4c
Copying nv_boot_control.conf to rootfs
Skip generating system.img
Existing tbcfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0002-p3449-0000-b00.dtb)... done.
Warning (reg_format): "reg" property in /i2c@7000c000/temp-sensor@4c has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c@7000c000/temp-sensor@4c
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c@7000c000/temp-sensor@4c
Warning (reg_format): "reg" property in /i2c@7000c000/temp-sensor@4c has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value for /i2c@7000c000/temp-sensor@4c
Warning (avoid_default_addr_size): Relying on default #size-cells value for /i2c@7000c000/temp-sensor@4c
copying cfgfile(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/cfg/flash_l4t_t210_emmc_p3448.xml) to flash.xml... done.
copying flasher(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/bootloader/tegraflash.py) reused.
*** Reading [APP] and storing to /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/backup.img ***
./tegraflash.py --bl cboot.bin --bldtb tegra210-p3448-0002-p3449-0000-b00.dtb  --chip 0x21 --applet nvtboot_recovery.bin --bct  P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg  --cfg  flash.xml   --cmd "read APP /home/miko/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448-0020/Linux_for_Tegra/backup.img"  
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.0055 ] Generating RCM messages
[   0.0065 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 0 --download rcm nvtboot_recovery.bin 0 0
[   0.0074 ] RCM 0 is saved as rcm_0.rcm
[   0.0079 ] RCM 1 is saved as rcm_1.rcm
[   0.0079 ] List of rcm files are saved in rcm_list.xml
[   0.0079 ] 
[   0.0079 ] Signing RCM messages
[   0.0087 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0095 ] Assuming zero filled SBK key
[   0.0147 ] 
[   0.0147 ] Copying signature to RCM mesages
[   0.0156 ] tegrarcm --chip 0x21 0 --updatesig rcm_list_signed.xml
[   0.0169 ] 
[   0.0170 ] Boot Rom communication
[   0.0178 ] tegrarcm --chip 0x21 0 --rcm rcm_list_signed.xml
[   0.0187 ] BootRom is not running
[   0.0596 ] 
[   0.0597 ] Parsing partition layout
[   0.0620 ] tegraparser --pt flash.xml.tmp
[   0.0652 ] 
[   0.0653 ] Creating list of images to be signed
[   0.0669 ] tegrahost --chip 0x21 0 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0727 ] 
[   0.0727 ] Generating signatures
[   0.0739 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0750 ] Assuming zero filled SBK key
[   0.1237 ] 
[   0.1238 ] Send BCT from Host
[   0.1238 ] Generating br-bct
[   0.1248 ] tegrabct --bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg --chip 0x21 0
[   0.1260 ] Copying Sdram info from 0 to 1 set
[   0.1274 ] Copying Sdram info from 1 to 2 set
[   0.1274 ] Copying Sdram info from 2 to 3 set
[   0.1274 ] 
[   0.1275 ] Updating boot device parameters
[   0.1286 ] tegrabct --bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatedevparam flash.xml.bin
[   0.1297 ] Warning: No sdram params
[   0.1299 ] 
[   0.1300 ] Updating bl info
[   0.1307 ] tegrabct --bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.1321 ] 
[   0.1321 ] Updating secondary storage information into bct
[   0.1329 ] tegraparser --pt flash.xml.bin --chip 0x21 0 --updatecustinfo P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct
[   0.1339 ] 
[   0.1339 ] Get Signed section of bct
[   0.1348 ] tegrabct --bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct --chip 0x21 0 --listbct bct_list.xml
[   0.1359 ] 
[   0.1359 ] Signing BCT
[   0.1376 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.1384 ] Assuming zero filled SBK key
[   0.1389 ] 
[   0.1389 ] Updating BCT with signature
[   0.1398 ] tegrabct --bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct --chip 0x21 0 --updatesig bct_list_signed.xml
[   0.1410 ] 
[   0.1410 ] Sending BCTs
[   0.1418 ] tegrarcm --download bct P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.bct
[   0.1427 ] Applet version 00.01.0000
[   0.1448 ] Sending bct
[   0.1449 ] [................................................] 100%
[   0.2181 ] 
[   0.2182 ] Retrieving storage infomation
[   0.2198 ] tegrarcm --oem platformdetails storage storage_info.bin
[   0.2213 ] Applet version 00.01.0000
[   0.2240 ] 00000004: Failed to get an accessor of secondary boot device
[   0.2270 ] 
[   0.2286 ] tegradevflash --oem platformdetails storage storage_info.bin

My issue seems to be related to a known bug/problem which is solved with upgrading L4T https://devtalk.nvidia.com/default/topic/1064479/jetson-nano/about-the-making-of-the-mirror-of-the-jetson-nano-module/post/5419408/#5419408
I am using 4.2.2 and would need to upgrade to 4.3. But I don´t want to loose all changes I made to the os.
Is it possbile to create an image of mmcblk0p1 locally on the device and use that one to flash other devices?

Flashing is not supported from virtual machines. Upgrading is only supported after 4.3 via apt-get. Unfortunately it’s not possible to upgrade 4.2.2 to 4.3 without backing up and restoring your changes manually. I suggest scp/sftp as it’s already running by default.

What a bummer. Generated an image of mmcplk01 locally on the jetson with dd.
So it is not possible to flash this raw image with the tegra flash tools?

You can generate an image in a VM, or even in docker if you modify certain scripts, however flashing isn’t recommended. I believe flash.sh has an option to just spit out and image. jetson-disk-image-creator.sh in Linux_for_Tegra/tools uses it that way. I don’t have a production module so i’m not certain of the exact commands, but I know it’s possible.

Using the flash.sh on a Ubuntu host to create a image via USB ( Jetson recovery) does not work for me (VM and normal installation). So the question is if there is a alternative method to generate an image which can be flashed via the flash.sh to another device.

Are you trying to clone a device? I would personally recommend against that on any platform, because once first boot happens, various thing are generated which should not be replicated across multiple hosts (ssh host keys, machine-id, hostname… it’s a very long list). Otherwise you will run into network and security issues.

To generate images you may choose to use Nvidia’s documentation to custimize your rootfs, add binaries, and from there, use their scripts to generate a flashable image. Please see “Setting Up Your File System” and other applicable sections, such as the Kernel customization. Let me know if you need any advice, for example, installing your software on a rootfs. From there, you can generate an image with all the proper first boot scripts that can be flashed onto any number of devices safely.

Hi again,
yes, I am trying to clone a device. Looked into the rootfs stuff and it looks promising. I want to run all devices in a headless mode (no display, no keyboard,…)
In this context I am having some questions regarding the setup:

  • Is it possible to automate the installation procedure, so basically “skip” the initial user config after first reboot (EULA accept, set user, language, keyboard…)-
  • Is CUDA already integrated the filesystem package from nvidia (4.3) ?
  • Can I remove packages (i.e. all gui stuff)?
  • I compiled some libraries in 4.2.2 on my Jetson developer version. Can I just copy/integrate them to the 4.3 rootfs?