Issue flashing Jetson TX2 R32.2 over USB

We want to flash the EMMC of a Jetson TX2 production module with Auvidea carrier board over USB.
The process worked fine for the Jetson Nano with Auvidea board, but now we need more computing power.

There are some commits from Alexandru Costache that should ensure compatibility with JetPack R32.2:

Unfortunately, when using the last production image v2.38.3rev2 from BalenaCloud for the TX2, the jetson-flash program crashes during the creation of the image:

Writing to /home/max/Desktop/tx2-flash/workdir/jetson-flash-artifacts/resin/img [========================] 100% eta 0s

setTimeout(function(){throw e;}, 0);

Same tool works fine when specifying jetson-nano-emmc and a nano BalenaCloud image, so it has to do something with the TX2 image and / or changes related to the TX2 in the code.

Any ideas @acostach @telphan @imrehg @remsol @floion what could be the reason for this? Outdated BalenaCloud image that is not compatible with the latest filesystem structure maybe?

By the way, is it possible to somehow create a BalenaCloud compatible image from the latest version of on my own? 2.38 with supervisor 9.x seems pretty outdated compared to 2.45.1 from the TX2 repo.

Thanks for your help!


Are you using the add_tx2_32_2 branch of jetson-flash with a image downloaded from dashboard at 2.38? That branch should be used with an image obtained from building an image for the tx2 from , which adds support for L4T 32.

The 2.38 image has L4T 28.2 and should work with the current master HEAD revision of jetson-flash.

And yes, it is possible to build a Balena cloud compatible image on your own. If you are using the “balena-jetson-skx2” repository HEAD revision you can build balenaOS 2.45 with L4T 28.3 , and if you use the “balena-jetson” repository you can build BalenaOS 2.45 with L4T 32.2 support.

Also, I’ve highlighted for you the places you need to add/mention the dtb and machine configuration file for a L4T 32.2 build for your Auvidea baseboard:

@acostach Thanks for the clarification! In this case we need to build a L4T 32 image from balena-jetson, modify the filenames of the DTB to match the one we get from Auvidea and use it with the mentioned branch of jetson-flash.

Can you please give a short clarification how to make the created image compatible with BalenaCloud, what files to copy where in order to link it to a specific BalenaCloud application? I was not able to find an explanation anywhere…

Hi @maxritter,

All you need to do for L4T 32.2 is to clone the balena-jetson repository repository using git clone --recursive, and use barrys to trigger the build. I believe the link your were looking for is this one: All details on how to build your own image are present there.

For machine you’ll use -m jetson-tx2 - or your custom machine you create . So, if you wish to create your custom Auvidea machine with an Auvidea device tree blob, you can use the example I posted above.

Please don’t forget to place the config.json you download from your APP’s dashboard inside the boot partition of your image generated by your yocto build. The config.json is the file that ‘links’ your device at run-time to your dashboard APP. You can obtain it from the dashboard using the button “Add Device” > Advanced > Download configuration file only.

More info on config.json and partitions is available at

@acostach Thank you very much! I was able to build a plain jetson-tx2 v2.45.1+rev2 yocto image and execute the flasher until the point it would actually flash the device.

Now I want to adjust it for my Auvidea JN143 carrier board and the Jetson TX2 4GB (P3489-0080) module.

I have added my Auvidea “tegra186-quill-p3489-0888-a00-00-base.dtb DTB” file to “balena-jetson/layers/meta-balena-jetson/recipes-kernel/linux” and adjusted “linux-tegra_%.bbappend” as you described. I have also adjusted “” and added the “” and “jn143-tx2.svg” files.

Now during build of my -m jn143-tx2 machine, I get the following error:

ERROR: tegra186-flash-dry-32.2.0-r0 do_configure: Function failed: do_configure (log file is located at /home/osboxes/balena-jetson/build/tmp/work/aarch64-poky-linux/tegra186-flash-dry/32.2.0-r0/temp/log.do_configure.48662)
ERROR: Logfile of failure stored in: /home/osboxes/balena-jetson/build/tmp/work/aarch64-poky-linux/tegra186-flash-dry/32.2.0-r0/temp/log.do_configure.48662
Log data follows:
| DEBUG: Executing shell function do_configure
| 1+0 records in
| 1+0 records out
| 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00012807 s, 32.0 MB/s
| 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.0134 ] tegrasign_v2 --key None --getmode mode.txt
| [ 0.0151 ] Assuming zero filled SBK key
| [ 0.0153 ]
| [ 0.0154 ] Generating RCM messages
| [ 0.0167 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
| [ 0.0184 ] RCM 0 is saved as rcm_0.rcm
| [ 0.0189 ] RCM 1 is saved as rcm_1.rcm
| [ 0.0189 ] List of rcm files are saved in rcm_list.xml
| [ 0.0189 ]
| [ 0.0189 ] Signing RCM messages
| [ 0.0206 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
| [ 0.0227 ] Assuming zero filled SBK key
| [ 0.0264 ]
| [ 0.0265 ] Copying signature to RCM mesages
| [ 0.0283 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
| [ 0.0309 ]
| [ 0.0310 ] Parsing partition layout
| [ 0.0329 ] tegraparser_v2 --pt
| [ 0.0353 ]
| [ 0.0353 ] Creating list of images to be signed
| [ 0.0370 ] tegrahost_v2 --chip 0x18 0 --partitionlayout --list images_list.xml zerosbk
| [ 0.0392 ] Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed
| [ 0.0563 ]
| Error: Return value 4
| Command tegrahost_v2 --chip 0x18 0 --partitionlayout --list images_list.xml zerosbk
| Keep temporary directory /home/osboxes/balena-jetson/build/tmp/work/aarch64-poky-linux/tegra186-flash-dry/32.2.0-r0/tegraflash/48775
| 1+0 records in
| 1+0 records out
| 70900 bytes (71 kB, 69 KiB) copied, 0.000261411 s, 271 MB/s
| cp: cannot stat ‘signed/*’: No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/osboxes/balena-jetson/build/tmp/work/aarch64-poky-linux/tegra186-flash-dry/32.2.0-r0/temp/log.do_configure.48662)
ERROR: Task (/home/osboxes/balena-jetson/build/…/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/ failed with exit code ‘1’

Am I missing modifications for the TX2 4GB P3489 version?

F. ex. when I look at “”, I see there are some definitions that point to the P3310 version of the TX2:

–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 \

whereas the jetson-tx2-4GB.conf inside R32.2 of Linux_for_Tegra has the following definitions:


I am a little bit stuck what exactly I have to adjust in order to make it work for the P3489 version, your help would be highly appreciated. Thanks!

@maxritter, so you created the yocto machine that extends the tx2, your coffee file uses this new yocto machine, tegra186-flash-dry specifies KERNEL_DEVICETREE_jn143-tx2 = "${DEPLOY_DIR_IMAGE}/tegra186-quill-p3489-0888-a00-00-base.dtb" and you are still getting this error, right?

If the answer is yes, then please share a github repository where I can have a look and see what you might be missing.

@acostach: Here are my changes:

I tried to change all stuff related to the “normal” p3310 version of the TX2 to the p3489 version of the TX2 4GB and also do the changes related to the DTB for the Auvidea JN143.

I also had to incorporate changes to the 4GB version into tegra-meta, affecting this two files: and

Now during compilation, I get the following error:

| 533904 bytes (534 kB, 521 KiB) copied, 0.00170326 s, 313 MB/s
| Warning: The resulting partition is not properly aligned for best performance.
| dd: failed to open ‘’: No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_resinos_img (log file is located at /home/osboxes/balena-jetson/build/tmp/work/jn143_tx2-poky-linux/resin-image/1.0-r0/temp/log.do_image_resinos_img.22329)
ERROR: Task (/home/osboxes/balena-jetson/build/…/layers/meta-balena/meta-balena-common/recipes-core/images/ failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 3954 tasks of which 1507 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
Summary: There were 5 WARNING messages shown.

Would be great if some if you experts can make a proper integration of the P3489 TX2 4GB version, and then I can do my JN143 on top which should be no big thing. Thanks!

OK, I’ll check it out see what happens and get back to you

Hi @maxritter,

I’ve been able to successfully build the image using your repository and performing the following changes:

  • put back the pinmux_configs and the bpmp dtbs just the way they were, no changes there in So tegra186-flash-dry should only add:

KERNEL_DEVICETREE_jn143-tx2 = “${DEPLOY_DIR_IMAGE}/tegra186-quill-p3489-0888-a00-00-base.dtb”

and move the kernel dependency to do_configure, like this:

do_configure[depends] += "tegra-binaries:do_preconfigure \
virtual/kernel:do_deploy \
do_compile[depends] += " \
virtual/bootloader:do_deploy \

I’ve also left comments in your repository for your commits.

  • put back partition_specification186.txt and resinOS-flash186.xml just like they were, no changes there.
  • only add the dtb that you are using, which is tegra186-quill-p3489-0888-a00-00-base.dtb
  • checkout meta-tegra at revision 9d1cac5c9647c5f56dc44b5de32f888ec4e9a511 , just like it was. No changes there.

Please try a new build with these suggestions.

@acostach It worked!! Thank you so much for your efforts :slight_smile:
I am now able to run the Jetson TX2 4GB with the JN143 using the latest balenaOS 2.45.1+rev2 on BalenaCloud.

1 Like

Great to hear it works for you. Please let us know when you encounter any issues in the future o/

Sorry, I came a bit late to the party but glad to see this works. Could be helpful for us as well. Thanks for the effort guys!

Unfortunately, I have to come back to this issue b/c I just can’t get it to work after 2 days of trying :sweat_smile: I formatted my laptop and forgot to save the image and flashing folder I used at that time, so I had to build everything from scratch again.

For whatever reason, the device never boots up after flashing. I really tried 100 different things, but I am stuck now and need your precious help @remsol @acostach @telphan.

So what I did is to use the repo I created at that time and included the changes that acostach proposed to make the build work again, including the Auvidea DTB file for R32.2 (tegra186-quill-p3489-0888-a00-00-base.dtb). I commited all changes here:

Then I used jetson-flash and included the Auvidea kernel files into Linux_for_Tegra R32.2 like I did last time. I also changed resinOS-flash to incorporate the P3489 DTB for the TX2 4GB:

<partition name="bpmp-fw-dtb" type="data" oem_sign="true">
	<allocation_policy> sequential </allocation_policy>
	<filesystem_type> basic </filesystem_type>
	<size> 1024000 </size>
	<file_system_attribute> 0 </file_system_attribute>
	<allocation_attribute> 8 </allocation_attribute>
	<percent_reserved> 0 </percent_reserved>
	<filename> tegra186-quill-p3489-0888-a00-00-base.dtb </filename>
<partition name="bpmp-fw-dtb_b" type="data" oem_sign="true">
	<allocation_policy> sequential </allocation_policy>
	<filesystem_type> basic </filesystem_type>
	<size> 1024000 </size>
	<file_system_attribute> 0 </file_system_attribute>
	<allocation_attribute> 8 </allocation_attribute>
	<percent_reserved> 0 </percent_reserved>
	<filename> tegra186-quill-p3489-0888-a00-00-base.dtb </filename>

When I flash, everything looks good. I have attached the output log of the flasher to this post.flash_out.log (35.8 KB)

After a reboot of the board, nothing happens. The ethernet port does not light up at all, so it seems the device is somehow stuck during boot. I tried some other devices and other power supplies to make sure it is not a HW issue, which is the same for all. Unfortunately I do not have a serial cable here to see the output. If everything fails, I could order one, but this might take some time.

Any ideas / help would be so much appreciated, thanks!

Never mind, I finally found the issue by comparing the output log to the one from the Nvidia sdkmanager. Have to use tegra186-a02-bpmp-lightning-p3489-a00-00-te770m_sigheader.dtb for bpmp-fw-dtb and bpmp-fw-dtb_b inside resinOS-flash.xml

No worries, glad to hear you managed to recover the custom setup and thanks for letting us know.