The goal of the document is to illustrate how to build SP7021 Linux image for booting from SPI-NOR flash on SP7021 boards. FirstSP7021 build (make) system supports two types of root file-system for SPI-NOR flash. One is initramfs file-system and other is jffs2 file-system. If you choose initramfs file-system, build system merges root file-system into Linux kernel. The whole kernel (kernel + root file-system) is loaded into and operates in DRAM directly. The advantage of initramfs file-system is that accessing speed is very fast. But since it is stored in DRAM, all changes disappear when power off. If you choose jffs2 file-system, root file-system is compressed and is stored in rootfs partition of SPI-NOR flash. The drawback of jffs2 file-system is that accessing speed is slow. But all changes are kept in SPI-NOR flash when power off.
To build image of SPI-NOR flash, first, you need to get source files of SP7021 from git server of SP7021. Second, you need to run make to build all images of SP7021. After make processes complete successfully, it will create a binary file named spi_all.bin. Third, you need to use flash programmer to write the spi_all.bin to SPI NOR flash. Finally, plug the written SPI-NOR flash into socket of SPI-NOR (SOC-8) on your SP7021 board, set DIP-SW to “boot from SPI-NOR flash”. You are ready to turn on SP7021 power to boot Linux from SPI-NOR flash. For details, please follow the following steps.
...
Run make config command on top folder. After configuration menu pops up, first, choose a board you want to build image for. For example, press 1 to choose “SP7021 Ev Board”. Second, press 1 to choose to use C chip (quad core CA7). Finally, press 3 (jffs2) or 4 (initramfs) to choose to boot from SPI-NOR flash and then enter to start to configure building environment. Refer to screenshot below,
...