Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The goal of the document is to illustrate how to build SP7021 Linux image for booting from SPI-NOR flash on SP7021 boards. SP7021 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 two binary files named spi_all.bin and ISPBOOOT.BIN. Third, you need to either use flash programmer to write the spi_all.bin to SPI-NOR flash or copy ISPBOOOT.BIN to an USB drive to in-system program SPI-NOR flash. Finally, set DIP-SW to “boot from SPI-NOR flash”. You are now ready to turn on SP7021 power to boot Linux from SPI-NOR flash. For details, please follow the following steps.

1. Download source files

Get latest source files from git server of SP7021 (Source files of SP7021 can be downloaded from GitHub or Yocto server of SP7021. Refer to https://github.com/sunplus-plus1/SP7021 or 2. HOW TO GET SOURCE FILE AND PACKAGE). Refer to report of ll command for the contents of top folder of source of SP7021:

...

Refer to Selection of boot devices of SP7021 (Plus1) for details of boot selection of SP7021.

...

“ISP all: Done” means in-system program processes are done successfully.

Note that in-system-program (ISP) of SP7021 does not support USB hub. The USB flash drive for ISP should be plugged into USB socket of SP7021 board directly.

If you are using Banana Pi BPI-F2P boards, please plug you USB flash drive to the micro USB socket for ISP. It is the only USB socket that is connected to SP7021 directly.

8. Set DIP-SW to “boot from SPI-NOR flash”

...