Showing results for 
Search instead for 
Did you mean: 
Registered: ‎09-19-2014

Writing to QSPI flash across all partitions from Linux

I have a Zynq Mini-ITX board with 32MB QSPI on it.

I'm using Linux with mtd-utils.


QSPI can be updated via JTAG by creating partitions for different boot components as described in the UG873 document (, section 5.2.5).

It creates a single BOOT.mcs file as a QSPI partition.


On bootup, it finds all the partitions correctly:

[ 1.040691] 7 ofpart partitions found on MTD device spi0.0
[ 1.046097] Creating 7 MTD partitions on "spi0.0":
[ 1.050991] 0x000000000000-0x0000000e0000 : "qspi-fsbl"
[ 1.063582] 0x0000000e0000-0x000000100000 : "qspi-ubootenv"
[ 1.074164] 0x000000100000-0x000000dc0000 : "qspi-bitstream"
[ 1.084411] 0x000000dc0000-0x000000fe0000 : "qspi-uboot"
[ 1.094426] 0x000000fe0000-0x000001400000 : "qspi-linux"
[ 1.104394] 0x000001400000-0x000001420000 : "qspi-device-tree"
[ 1.115015] 0x000001420000-0x000001a80000 : "qspi-rootfs"


I can updated a partition by: flashcp -v fsbl.elf /dev/mtd0


Is there any way to update the whole QSPI flash device (across all partitions) within Linux with a single image file?

(For comparison, if doing something to a hard disk across the whole device and across all partitions, you would use /dev/hda instead of a specific partition like /dev/hda1. However, /dev/mtd doesn't exist)

Tags (4)
0 Kudos