Flash.sh parameters for eMMC

I am preparing for a custom carrier board, but currently using the Xavier NX Developer Kit. I have created modified device tree files and board parameter files that mirror the p3509 carrier board, since the core designs are fairly close. I’m trying to reflash the SOM over USB using the flash.sh command. I have been fairly successful with this in the past, but it’s now not working.

I have built the system (kernel, rootfs, etc.) so that it will install on an SD card, but that won’t work for the commercial SOMs. Using flash.sh has worked, but I had to add the -S command with an appropriate size.

Now, however, I can’t get a size that will work. I can get a system.img to build if I make the size passed with -S large enough (perhaps 7091519488), but will fail to write to the eMMC with that size. I tried using the --no-flash parameter to create the system.img file and the write it using the size of the system.img file rounded up to the nearest 512 bytes as the -S parameter using the --no-systemimg to write to the eMMC:

> sudo ./flash.sh --no-systemimg -S 6458180608 p0661-a101+p3668-0000-qspi-sd mmcblk0p1

but that fails too:

[ 261.3215 ] Writing partition APP with system.img [ 6458180296 bytes ]
Error: Return value 3............................             ] 071%
Command tegradevflash_v2 --pt flash.xml.bin --create
Failed flashing t186ref.

Can you point me at something I can do to resolve this?

Hi chrisrfq,

It seems you are developing the custom board for Xavier NX.
Does the above procedure could work on the Xavier NX devkit but fail on your custom board?

The -S paramter is used to specify the size of rootfs while flashing the board. If it is not specified, it would just use default size (ROOTFSSIZE) for flash. You could try to search that string in your flash directory.

Does your board come with both internal eMMC and SD card slot?
As default setting, only one of them would be enabled in device tree as mmcblk0.

Does the above procedure could work on the Xavier NX devkit but fail on your custom board?

I don’t yet have our custom board. It is failing on the Xavier NX devkit.

p3668.conf.common indicates ROOTFSSIZE is 14GiB, but running the flash.sh command above with -S 6458180608 gives rootfssize as 6458180608. I also tried running the command with -r and without the -S and that shows the 14GiB rootfssize, but it still errors with a return value of 3. Do you know what the 3 indicates?

Our board will have both an eMMC and an off-SOM SD card slot. But the SD card will be for customer data storage. Doesn’t the mmcblk0 normally refers to the on-SOM eMMC?

Do commercial SOMs ship from NVidia with a default code load on the eMMC?

eMMC modules sold separately from the carrier board are never flashed. You have to do that yourself. Even if they are flashed, then the chances are that the other content is not the version you want and would need to flash it anyway.

Incidentally, if you flash the non-rootfs content, and if the size of that content changes, then it might collide with the partition size and/or location. You are better off (at least when testing) to also flash the rootfs. You can use a clone of the rootfs which is an exact duplicate of the existing rootfs, and essentially you would be leaving rootfs alone (other than making it possible to relocate it). I would not try flashing without rootfs until it works with the rootfs being flashed. Have you tried flashing the same thing using a clone?

Also, an SD card on a dev kit (part of the module itself) is wired differently than the SD card on a carrier board. They are quite different and the software is not interchangeable (especially important in boot stages).

Thanks for the info on those subjects.

Apparently my issue was with the heatsink fan not rotating during flashing. The heatsink got very hot and the process was aborting. I used an external fan to blow lots of air on the unit and it flashed without any errors.

Is the heatsink fan supposed to be spinning during reflashing?

I couldn’t tell you what the default is supposed to be during flash. I do know that if it heats up, then the fan is supposed to start. Normally the Jetson does not produce enough heat for the fan to start if idle. Most of the Jetsons have just a tiny burst of the fan momentarily starting as they are turned on, and then remaining stopped until warming up under load. Now that the Jetson is flashed and can run, does the fan start when kept under load? My concern would be if the fan does not work when getting warm under normal operations; then I’d suspect something is wrong with the fan circuitry.

It does normally run. It just doesn’t run during flashing over USB.

I think we have a subtle but important question for someone from NVIDIA: During flash, does the fan operate based on current temperature, or is it always on? If the fan does not run during flash, even when hot, is that a hardware issue?

1 Like

Fan would not run at the flash process for most platform since there should be less heat during flash.
We’ve designed fan to spin at a fixed speed during flashing, but that is only available for T234 platform.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.