Writing to QSPI flash failed

We have problem to flash the QSPI flash on Parker chip of our boards. Tracing the flashing script, we found that it hangs at

/tmp/nvdd --inputbin=/tmp/bctCopiesBlob.tmp --device=/dev/mtd/mtd0 --startoffset=0 --partsize=524288

The flashing script was provided by Nvidia. Here nvdd is Nvidia’s dd to write to mtd0 (see below). Please advise. Does that mean QSPI flash is somehow corrupted?

A related question is how to erase mtd0 ? (some people suggest that maybe we should erase it first).

Thanks.

Jin

# ./nvdd
-d|--device is necessary
Error Code 0x4
Usage:
-i|--inputbin <PARTITION_BINARY>.
	Input binary that will written or used for verification
-f|--outputbin <filename>.
	Output binary name that will be created by reading data from device
-d|--device <DEVICE_NAME>.
	Device on which nvdd will operate
-o|--startoffset <START_OFFSET>.
	Offset on device from where nvdd operate
-s|--partsize <PARTITION_SIZE>.
	Size of partition where input binary will be written
-e|--parterase.
	Erase rest of the partition after writing binary-r|--readback.
	Read data from storage and compare with original binary
-u|--partunlock.
	Unlock partition if it was locked
-n|--nowrite.
	Used for verification only and avoid writing on device
-m|--md5sum <MD5 STRING>.
	String used to validate written binary on device
-p|--printmd5sum
	Print md5sum of the calculated for partition on device
-E|--deverase <eoffset=OFFSET,esize=SIZE>
	Erase ezise on device from eoffset
Example: ./nvdd --inputbin KERNEL_PRIMARY_16.img --device /dev/mtd0 --startoffset 6815744 --partsize 18874368 --readback

hello jin.lu,

may I know how did you get nvdd, is it included in the formal release image?
thanks

Hi,

Yes. This is part of the Vibrant foundation boot package we got. The bootburn.sh on my host uses adb over USB to load the nvdd and the binary to the /tmp on the target, and calls the nvdd command above over the adb shell.

I can enter the target over adb shell and manually run that command. The behavior is the same. The command hangs and I had to cycle the power to restart the target.

Thanks.

Jin

hello jin.lu,

did you meant you used “adb” commands to access the board?
I’m surprised since JetPack's OS image is L4T.
in my understanding, adb commands should only workable for Android’s environment, right?

may I know what’s your setups.
for example, which release you’re working on.
thanks

Jerry,

Thanks so much. Yes, adb was originally designed for updating Android. I believe Nvidia ported the adb to its foundation flashing/booting process for “general purpose” flashing. It is a way to connect to a target just like the minicom over a serial connection.

So we have a board based on Nvidia chip and reference design. We used the vibrant foundation (see NVIDIA_Vibrante_4.0_for_Foundation_References) to build and flash the vibrante-t186ref-linux image to the target.

As part of the process, the flashing script flashes (by using nvdd) some binaries (see the above) to the QSPI NOR flash. I think nvdd is Nvidia’s version of linux dd command.

My question is specific about nvdd:

(1) If nvdd hangs when doing

/tmp/nvdd --inputbin=/tmp/bctCopiesBlob.tmp --device=/dev/mtd/mtd0 --startoffset=0 --partsize=524288

how do I debug it. What are the possible reasons?

(2) How to use nvdd to erase the content of QSPI (/dev/mtd/mtd0). Some people suggested that I try to erase (clean) it before flashing it.

Hi Jin,

this issue has resolved as you can flash using our SDKM.

  • Fabian