11-16-2017 02:13 AM
when i use qspi flash with zynq and linux there is a strange question. i have two SD card systems which have the difference in boot.bin(means that they have the same linux images ,devicetrees, ramdisk images).when i use one of them, the qspi flash works well. the flash_eraseall tools shows:
flash_eraseall /dev/mtd0
Erasing 64 Kibyte @ 0 - 0% complete.random: nonblocking pool is initialized
Erasing 64 Kibyte @ f00000 - 100% complete.
the flashcp tool works well too.
but when i use another, i found that the flash_eraseall tool can not erase the flash mtd partition in right place. it allways start at 10000 not at 0.
flash_eraseall /dev/mtd0
Erasing 64 Kibyte @ 10000 - 0% complete.random: nonblocking pool is initialized
Erasing 64 Kibyte @ f00000 - 100% complete.
this means the first 10000 is not erased. the flashcp tool is not opeating properly too. when i copy a file into flash, i discover that the file is writen beginning at the offset 10000 too. the first 10000 is not updated.
the bootlog and /proc/mtd is the same between these two systems
6 ofpart partitions found on MTD device spi0.0
Creating 6 MTD partitions on "spi0.0":
0x000000000000-0x000000f00000 : "qspi-boot"
0x000000f00000-0x000001300000 : "qspi-linux"
0x000001300000-0x000001310000 : "qspi-device-tree"
0x000001310000-0x000001610000 : "qspi-rootfs"
0x000001610000-0x000001650000 : "qspi-uboot-env"
0x000001650000-0x000002000000 : "qspi-user"
zynq> cat /proc/mtd
dev: size erasesize name
mtd0: 00f00000 00010000 "qspi-boot"
mtd1: 00400000 00010000 "qspi-linux"
mtd2: 00010000 00010000 "qspi-device-tree"
mtd3: 00300000 00010000 "qspi-rootfs"
mtd4: 00040000 00010000 "qspi-uboot-env"
mtd5: 009b0000 00010000 "qspi-user"
i think there is a parameter in fsbl, uboot,or fpga to determine the start position of flash operation.but i don't have the source file of these two boot.bin files.
11-17-2017 10:28 AM
Hi,
You didn't mention which version of tools you are using. Please use below commands to program the flash at offset 0x0 in u-boot. Below commands will load file contents to DDR and then DDR to QSPI flash.
fatload mmc 0 100000 Boot.bin
sf probe 0 0 0
sf erase 0 3000000
sf write 100000 0 3000000
11-17-2017 10:28 AM
Hi,
You didn't mention which version of tools you are using. Please use below commands to program the flash at offset 0x0 in u-boot. Below commands will load file contents to DDR and then DDR to QSPI flash.
fatload mmc 0 100000 Boot.bin
sf probe 0 0 0
sf erase 0 3000000
sf write 100000 0 3000000
11-28-2017 02:55 AM