# Issue flashing Jetson TX2 R32.2 over USB

**URL:** <https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521>\
**Category:** Product support\
**Created:** [November 28, 2019, 12:47pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521 "2019-11-28T12:47:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [November 28, 2019, 12:47pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/1 "2019-11-28T12:47:27Z")

</div>

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: [https://github.com/balena-os/jetson-flash/commits/add\_tx2\_32\_2-build-4f4aa59f5b50b90bd818e9dbfa7424dca9c9ac79](https://github.com/balena-os/jetson-flash/commits/add_tx2_32_2-build-4f4aa59f5b50b90bd818e9dbfa7424dca9c9ac79)

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

/home/max/Desktop/tx2-flash/node\_modules/bluebird/js/release/using.js:12  
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 [https://github.com/balena-os/balena-jetson-skx2](https://github.com/balena-os/balena-jetson-skx2) 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!

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [November 28, 2019, 2:45pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/3 "2019-11-28T14:45:46Z")

</div>

Hi,

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 [https://github.com/balena-os/balena-jetson](https://github.com/balena-os/balena-jetson) , 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.

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [November 28, 2019, 3:29pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/5 "2019-11-28T15:29:40Z")

</div>

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:

> **[balena-os/balena-jetson](https://github.com/balena-os/balena-jetson/tree/master/layers/meta-balena-jetson/conf/machine)**
>
> Contribute to balena-os/balena-jetson development by creating an account on GitHub.

> <https://github.com/balena-os/balena-jetson/blob/b95b31383fef5ce27690dd3dc83b18d79d383f77/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra186-flash-dry_32.2.0.bb#L33>

> <https://github.com/balena-os/balena-jetson/blob/b95b31383fef5ce27690dd3dc83b18d79d383f77/layers/meta-balena-jetson/recipes-kernel/linux/linux-tegra_%25.bbappend#L21>

> <https://github.com/balena-os/balena-jetson/blob/b95b31383fef5ce27690dd3dc83b18d79d383f77/layers/meta-balena-jetson/recipes-kernel/linux/linux-tegra_%25.bbappend#L189>

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [November 28, 2019, 3:34pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/6 "2019-11-28T15:34:33Z")

</div>

@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…

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [November 28, 2019, 3:53pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/7 "2019-11-28T15:53:37Z")

</div>

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: [https://www.balena.io/os/docs/custom-build/](https://www.balena.io/os/docs/custom-build/) 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 [https://www.balena.io/os/docs/architecture/](https://www.balena.io/os/docs/architecture/)

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [November 29, 2019, 10:00am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/11 "2019-11-29T10:00:44Z")

</div>

@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 “tegra186-flash-dry\_32.2.0.bb” and added the “jn143-tx2.coffee” 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 flash.xml.in.tmp  
| [0.0353]  
| [0.0353] Creating list of images to be signed  
| [0.0370] tegrahost\_v2 --chip 0x18 0 --partitionlayout flash.xml.in.bin --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 flash.xml.in.bin --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/tegra186-flash-dry\_32.2.0.bb:do\_configure) failed with exit code ‘1’

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

F. ex. when I look at “tegra186-flash-dry\_32.2.0.bb”, 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:

PROD\_CONFIG=“tegra186-mb1-bct-prod-storm-p3489-1000-a00.cfg”;  
PINMUX\_CONFIG=“tegra186-mb1-bct-pinmux-quill-p3489-1000-a00.cfg”;  
PMIC\_CONFIG=“tegra186-mb1-bct-pmic-lightning-p3489-1000-a00.cfg”;  
PMC\_CONFIG=“tegra186-mb1-bct-pad-quill-p3489-1000-a00.cfg”;  
BOOTROM\_CONFIG=“tegra186-mb1-bct-bootrom-quill-p3489-1000-a00.cfg”;

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!

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [November 29, 2019, 9:29pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/13 "2019-11-29T21:29:17Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [December 1, 2019, 3:48pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/15 "2019-12-01T15:48:25Z")

</div>

@acostach: Here are my changes: [https://github.com/maxritter/balena-jetson-jn143-tx2-4gb/commits/master](https://github.com/maxritter/balena-jetson-jn143-tx2-4gb/commits/master)

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: [https://github.com/maxritter/meta-tegra/tree/master/recipes-bsp/tegra-binaries/files/jetson-tx2-4gb](https://github.com/maxritter/meta-tegra/tree/master/recipes-bsp/tegra-binaries/files/jetson-tx2-4gb) and [https://github.com/maxritter/meta-tegra/blob/master/conf/machine/jetson-tx2-4gb.conf](https://github.com/maxritter/meta-tegra/blob/master/conf/machine/jetson-tx2-4gb.conf).

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/resin-image.bb:do\_image\_resinos\_img) 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:  
/home/osboxes/balena-jetson/build/…/layers/meta-balena/meta-balena-common/recipes-core/images/resin-image.bb:do\_image\_resinos\_img  
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!

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [December 2, 2019, 9:41am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/16 "2019-12-02T09:41:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [December 2, 2019, 11:21am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/18 "2019-12-02T11:21:04Z")

</div>

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 tegra186-flash-dry\_32.2.0.bb. 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.

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [December 3, 2019, 6:27am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/20 "2019-12-03T06:27:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![robertgzr](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/robertgzr/32/1387_2.png) [@robertgzr](https://forums.balena.io/u/robertgzr)\
**Post date:** [December 3, 2019, 8:20am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/21 "2019-12-03T08:20:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![remsol](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/remsol/32/2713_2.png) [@remsol](https://forums.balena.io/u/remsol)\
**Post date:** [December 15, 2019, 2:29pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/23 "2019-12-15T14:29:24Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [April 7, 2020, 9:37am UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/25 "2020-04-07T09:37:30Z")

</div>

Unfortunately, I have to come back to this issue b/c I just can’t get it to work after 2 days of trying 😅 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: [https://github.com/maxritter/balena-jetson-jn143-tx2-4gb/commits/master](https://github.com/maxritter/balena-jetson-jn143-tx2-4gb/commits/master)

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>
<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>
</partition>

```

When I flash, everything looks good. I have attached the output log of the flasher to this post.[flash\_out.log](https://forums.balena.io/uploads/short-url/hhanFW4YoJaygNvEcKze2r3UsGC.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!

---

<div class="post-metadata">

**Author:** ![maxritter](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@maxritter](https://forums.balena.io/u/maxritter)\
**Post date:** [April 7, 2020, 4:03pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/28 "2020-04-07T16:03:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [April 7, 2020, 4:40pm UTC](https://forums.balena.io/t/issue-flashing-jetson-tx2-r32-2-over-usb/47521/31 "2020-04-07T16:40:11Z")

</div>

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