...
where operating frequency of SPI-NOR flash is 50 MHz and SPI-NOR flash is installed in pin-group: spi_flash2_mux and spi_fla4b2_mux. Set them base on your real hardware installation.
4. Remove SECT_4K flag of SPI-NOR flash
This step is for jffs2 (3) root file-system. Please skip this step if you are using initramfs (4) root file-system.
Some SPI-NOR flashes support 4 kB sector-erase, but mkfs.jffs2 -e option does not support 4 kB size of erase. Please remove SECT_4K flag in C file “driver/mtd/spi-nor/spi-nor.c” if your NOR flash support 4 KB sector-erase . Refer to screenshot of diff report, SECT_4K flag of Winbond w25q128 flashes are removed.
...
5. Build SPI-NOR image
Run make all command to start to create all images of SP7021. It may take several minutes to complete. At almost final stage of building processes, make will ask you to select the use of iBoot,
...
Two binary files spi_all.bin and ISPBOOOT.BIN are built and copied to folder out. You Refer to screenshot of output of ll out command:
...
Binary file spi_all.bin is a pure image of SPI-NOR flash. You can use a flash programmer to write the image into an SPI-NOR flash. Refer to step 6 for detail.
Binary file ISPBOOOT.BIN consists of boot-loader (x-boot), u-boot and image of SPI-NOR flash. You can copy ISPBOOOT.BIN it to an USB drive to in-system program SPI-NOR image to SPI-NOR flash on SP7021 boards. Refer to step 7 for detail.
...
Put your SPI-NOR flash chip into socket of a flash programmer. Be careful about the pin 1 position of the chip. It should be at the same corner of pin 1 of socket. Refer to picture below, an SPI-NOR flash is placed at socket of a GZUT USB flash programmer.
...
Remove the SPI-NOR flash chip from socket. Plug the written SPI-NOR flash into socket of SPI-NOR flash of SP7021 boardboards.
Note that the size of spi_all.bin is about 10.2 12 MiB. So, size of SPI-NOR flash chip should be 16 MiB (or 128 Mibit) or greater.
7. In-system program SPI-NOR flash
First, copy the file ISPBOOOT.BIN file to root directory of an USB flash drive. Note that the USB flash drive should be formatted to DOS/Windows FAT32 file-system. SP7021 can only load files from an USB flash drive which is formatted to FAT32 file-system. Note Also note that FAT32 file-system should be in the first or the sole partition of the USB flash drive.
...
Third, plug your USB flash drive which contains ISPBOOOT.BIN into either USB socket of SP7021 board. Turn
Finally, turn on power of SP7021 board. After power on, SP7021 starts to ”boot from USB” drive. It first loads boot-loader (x-boot) from ISPBOOOT.BIN in USB flash drive. Boot-loader loads u-boot. u-boot will then write then runs built-in scripts which writes image to SPI-NOR . Wait for writing to completeflash and verify it. The processes takes 1 ~ 2 minutes. Please wait for the processes completing. At the end of in-system programprocesses, you will see screen like:In
...
“ISP all: Done” means in-system program processes are done successfully.
8. Set DIP-SW to “boot from SPI-NOR flash”
...