How to build SP7021 Linux image for booting from SPI-NAND flash
The goal of the document is to illustrate how to build SP7021 Linux image for booting from SPI-NAND flash on SP7021 boards, and how to write SP7021 images to the SPI-NAND flash.
First, you need to get source files 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 ISPBOOOT.BIN. This binary file is packed with all necessary codes and images to write to the SPI-NAND flash. Third, you need to copy the built ISPBOOOT.BIN file to root directory of an USB flash drive. Finally, plug the USB flash drive into an USB socket of SP7021 board, set DIP-SW to “boot from USB”, and turn on power of the SP7021 board. After power-on, SP7021 will load and run ISPBOOOT.BIN. The codes, in ISPBOOOT.BIN, will then take control and write all images to SPI-NAND flash. After completing writing images to SPI-NAND, please set DIP-SW to “boot from SPI-NAND”.
Now you are ready to turn off and on SP7021 power again to boot Linux from SPI-NAND flash. For details, please follow the following steps.
1. Download source files
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:
wellslu@scdiu3:~/q628/nand$ ll
total 52
drwxr-xr-x 12 wellslu sp 4096 Oct 15 12:03 ./
drwxr-xr-x 19 wellslu sp 4096 Oct 15 12:03 ../
drwxr-xr-x 8 wellslu sp 4096 Jul 8 18:22 boot/
drwxr-xr-x 4 wellslu sp 4096 Aug 24 09:28 build/
drwxr-xr-x 7 wellslu sp 4096 Jul 28 09:33 crossgcc/
drwxr-xr-x 6 wellslu sp 4096 Jul 8 18:22 eCos/
drwxr-xr-x 9 wellslu sp 4096 Jul 8 18:22 freertos/
drwxr-xr-x 8 wellslu sp 4096 Aug 17 15:17 ipack/
drwxr-xr-x 7 wellslu sp 4096 Jul 8 18:22 linux/
-r--r--r-- 1 wellslu sp 23 Jul 8 18:22 Makefile
drwxr-xr-x 4 wellslu sp 4096 Jul 8 18:22 nonos/
drwxr-xr-x 7 wellslu sp 4096 Jul 8 18:22 .repo/
drwxr-xr-x 3 wellslu sp 4096 Jul 8 18:22 yocto/
2. Configure environment
Run make config command on top folder. After configuration menu pops up, first, choose 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 (CA7 x4). Finally, press 2 to choose to boot from SPI-NAND flash and then enter to start to configure building environment. Refer to screenshot below,
make config starts to build compiler environment. It may take a few minutes. Please wait for make config completing the processes.
3. Build all images and ISP files
Run make all command to start to create all images of SP7021. It may take several minutes to complete. After make all completes, you will see screen like:
From information on screen, 7 partitions are created (in the binary file ISPBOOOT.BIN). For example, size of uboot2 partition is 0x90400 (590,848 bytes). The maximum allowable size of uboot2 is 0x100000 (1,048,576 bytes). 56.35% of maximum size is used. Size of dtb partition is 0x5000 (20,480 bytes). 7.81% of maximum size is used. Size of kernel partition is 0x3e9800 (4,102,144 bytes). Size of rootfs partition is 0x744000 (7,618,560 bytes).
4. List of built images
All built image files are stored at folder out. Refer to screenshot of output of ll out command:
xboot.img is an image file of x-boot. x-boot is the first stage boot-loader. It is the first code SP7021 loads and runs when SP7021 is powered on. When it takes control, it loads and runs u-boot. u-boot.img is an image file of u-boot. u-boot is the second stage boot-loader. When it takes control, It loads and runs Linux kernel image. uImage is an image file of compressed Linux kernel with u-boot header. rootfs.img is an image file of root file-system of Linux. dtb is device-tree blob file. a926.img is an image file for processor A926. Processor A926 is designed for taking care of real-time tasks. x-boot, u-boot, and all other images are packed into binary file ISPBOOOT.BIN.
5. Copy ISPBOOOT.BIN to an USB flash drive
Copy the built 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 that FAT32 file-system should be in the first or the sole partition of the USB flash drive.
6. Set DIP-SW to “boot from USB”
Set DIP-SW (boot-select switch) to “boot from USB”. For example, if you are using SP7021 Ev Board, please set DIP-SW to OFF-OFF-OFF-OFF-ON-OFF (1-1-1-1-0-1) for booting from USB flash drive. Refer to picture below, DIP-SW is set to OFF-OFF-OFF-OFF-ON-OFF.
Refer to https://sunplus.atlassian.net/wiki/spaces/doc/pages/460981046 for details of boot selection of SP7021.
7. Write all SP7021 images to SPI-NAND flash
Plug your USB flash drive which contains ISPBOOOT.BIN into either USB socket of SP7021 board. Install UART console and set terminal to 115,200 bps. Finally, turn on power of SP7021 board. After power on, SP7021 starts to ”boot from USB” drive. It first loads x-boot from ISPBOOOT.BIN in USB flash drive. x-boot loads u-boot. u-boot will then loads all images, verify md5-checksum and write them to SPI-NAND one by one. Wait for writing to complete. Finally, you will see screen like:
“ISP all: Done” means all images were written to SPI-NAND 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. Boot Linux from SPI-NAND flash
Set DIP-SW (boot select switch) to “boot from SPI-NAND flash”. For example, if you are using SP7021 Ev Board, please set DIP-SW to OFF-OFF-ON-ON-OFF-ON (1-1-0-0-1-0) for booting from SPI-NAND flash. Refer to picture below:
DIP-SW is set to OFF-OFF-ON-ON-OFF-ON. Now, you are ready to boot SP7021 Linux from SPI-NAND flash. Turn on power of SP7021 board again to boot system.
9. In-system program (ISP) from an SD card
Note that you can also copy your ISPBOOOT.BIN file to root directory of a micro SD card to do in-system-program to eMMC device. The SD card be formatted to DOS/Windows FAT32 file-system. Note that SP7021 only detects ISPBOOOT.BIN in the first partition.
Set DIP-SW (boot-select switch) to “boot from SD card”. For example, if you are using SP7021 Ev Board, please set DIP-SW to OFF-OFF-OFF-OFF-ON-ON (1-1-1-1-0-0) for booting from SD card.
Plug your SD card into micro SD socket of SP7021 board, install UART console, and then turn on power of SP7021 board. SP7021 will start to do ISP from SD card.
Appendix A. Layout of partitions of SPI-NAND flash
Refer to layout of partitions of a 256MiB SPI-NAND flash. There are a GPT (GUID Partition Table) and 9 partitions in SPI-NAND flash. The figures in parenthesis of each partition is the maximum size of the partition. Size of partition rootfs extends to end of SPI-NAND flash.
Appendix B. Log of ISP-ing of SPI-NAND flash
+++iBoot v1.02 Jan 10 2019 11:20:28
-- B --
[d] iboot.c :96
[d] iboot.c :107
[d] iboot.c :877
hw_cfg=0x00017BFF
bootmode=0x00000017
[d] iboot.c :813
[d] iboot.c :316
[[usb_isp]]
usb0
[d] bootmain.c :116
dev=1 pin=0
find file
[d] fat_boot.c :181
[d] fat_boot.c :189
[d] ehci_usb.c :229
[d] ehci_usb.c :239
Reset EHCI
.........................
No usb device on port 0
[d] fat_boot.c :213
[d] iboot.c :285
not found
usb1
[d] bootmain.c :116
dev=1 pin=0
find file
[d] fat_boot.c :181
[d] fat_boot.c :189
[d] ehci_usb.c :229
[d] ehci_usb.c :239
Reset EHCI
usb1 connected(0ms)
enum u-disk
get dev desc (64)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 64
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
vid=85 64 pid=10 00 rev=11 00
set addr
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get dev desc (18)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 18
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get conf desc (9)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 9
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get conf desc (9)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 32
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
set config 1
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
Test Unit Ready (0)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (1)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (2)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (3)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (4)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :218
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :230
part@0x00000800
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :259
[d] fat_boot.c :295
[d] fat_boot.c :314
[d] fat_boot.c :318
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :337
load file
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
mg=0x54554258
len=0x00006798
chk=0x0000E581
flg=0x00000001
[d] bootmain.c :338
OTP pub-key:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Verify signature...(AB) FAIL
signature:
B6 9D 40 DC EA 86 8F D7 7C DD 80 E3 2F B4 BD 1A
F1 B1 03 1C 92 12 E2 B4 22 09 8F 16 FD 09 9B 49
15 18 BD 97 69 AD FF A1 37 87 7D C9 99 7E 24 31
42 FC 2E B7 AE C4 07 28 F0 84 FC 18 75 D0 40 0A
tV=88
OTP Secure Boot is OFF
boot!
..336451
+++xBoot Apr 20 2021 15:50:11
[d] xboot.c :162
-- B --
B: b_sysclk=202M abio_ctrl=(16bit,DDR)
[d] xboot.c :228
[otp_rw.c]otp_rw in
otp_rw.c]otp_rw out
mode=0x00000017
[d] xboot.c :1659
[d] xboot.c :1015
{{usb_isp}}
finding file
[d] fat/fat_boot.c :284
[d] fat/fat_boot.c :294
[d] usb/ehci_usb.c :227
[d] usb/ehci_usb.c :237
Reset EHCI
usb1 connected(2ms)
enum u-disk
get dev desc (64)
vid=85 64 pid=10 00 rev=11 00
set addr
get dev desc (18)
get conf desc (18)
get conf desc (32)
set config 1
Test Unit Ready (0)
Test Unit Ready (1)
Test Unit Ready (2)
Test Unit Ready (3)
Test Unit Ready (4)
[d] fat/fat_boot.c :343
[d] fat/fat_boot.c :355
part@0x00000800
[d] fat/fat_boot.c :397
FAT32 file system
[d] fat/fat_boot.c :473
[d] fat/fat_boot.c :505
[d] fat/fat_boot.c :509
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
++iBoot v1.02 Jan 10 2019 11:20:28
-- B --
[d] iboot.c :96
[d] iboot.c :107
[d] iboot.c :877
hw_cfg=0x00017BFF
bootmode=0x00000017
[d] iboot.c :813
[d] iboot.c :316
[[usb_isp]]
usb0
[d] bootmain.c :116
dev=1 pin=0
find file
[d] fat_boot.c :181
[d] fat_boot.c :189
[d] ehci_usb.c :229
[d] ehci_usb.c :239
Reset EHCI
.........................
No usb device on port 0
[d] fat_boot.c :213
[d] iboot.c :285
not found
usb1
[d] bootmain.c :116
dev=1 pin=0
find file
[d] fat_boot.c :181
[d] fat_boot.c :189
[d] ehci_usb.c :229
[d] ehci_usb.c :239
Reset EHCI
usb1 connected(0ms)
enum u-disk
get dev desc (64)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 64
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
vid=85 64 pid=10 00 rev=11 00
set addr
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get dev desc (18)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 18
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get conf desc (9)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 9
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
get conf desc (9)
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 32
[d] ehci_usb.c :653
[d] ehci_usb.c :701
Out 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
set config 1
[d] ehci_usb.c :727
Setup 8
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 0
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :762
Test Unit Ready (0)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (1)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (2)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (3)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
Test Unit Ready (4)
[d] ehci_usb.c :459
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :218
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :230
part@0x00000800
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :259
[d] fat_boot.c :295
[d] fat_boot.c :314
[d] fat_boot.c :318
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :321
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] fat_boot.c :337
load file
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 4096
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
[d] ehci_usb.c :534
[d] ehci_usb.c :775
Out 31
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 512
[d] ehci_usb.c :653
[d] ehci_usb.c :701
In 13
[d] ehci_usb.c :653
[d] ehci_usb.c :701
[d] ehci_usb.c :842
mg=0x54554258
len=0x00006798
chk=0x0000E581
flg=0x00000001
[d] bootmain.c :338
OTP pub-key:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Verify signature...(AB) FAIL
signature:
B6 9D 40 DC EA 86 8F D7 7C DD 80 E3 2F B4 BD 1A
F1 B1 03 1C 92 12 E2 B4 22 09 8F 16 FD 09 9B 49
15 18 BD 97 69 AD FF A1 37 87 7D C9 99 7E 24 31
42 FC 2E B7 AE C4 07 28 F0 84 FC 18 75 D0 40 0A
tV=88
OTP Secure Boot is OFF
boot!
..336541
+++xBoot Apr 20 2021 15:50:11
[d] xboot.c :162
-- B --
B: b_sysclk=202M abio_ctrl=(16bit,DDR)
[d] xboot.c :228
[otp_rw.c]otp_rw in
otp_rw.c]otp_rw out
mode=0x00000017
[d] xboot.c :1659
[d] xboot.c :1015
{{usb_isp}}
finding file
[d] fat/fat_boot.c :284
[d] fat/fat_boot.c :294
[d] usb/ehci_usb.c :227
[d] usb/ehci_usb.c :237
Reset EHCI
usb1 connected(2ms)
enum u-disk
get dev desc (64)
vid=85 64 pid=10 00 rev=11 00
set addr
get dev desc (18)
get conf desc (18)
get conf desc (32)
set config 1
Test Unit Ready (0)
Test Unit Ready (1)
Test Unit Ready (2)
Test Unit Ready (3)
Test Unit Ready (4)
[d] fat/fat_boot.c :343
[d] fat/fat_boot.c :355
part@0x00000800
[d] fat/fat_boot.c :397
FAT32 file system
[d] fat/fat_boot.c :473
[d] fat/fat_boot.c :505
[d] fat/fat_boot.c :509
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :512
[d] fat/fat_boot.c :528
Run draiminit@0x9E8063A1
Done draiminit
dram test 0x00800000 - 0x00800400
fat load uboot
load data size=618225
start verify in xboot!
******OTP Secure Boot is OFF, return success******
uboot_pentagram_board
boot next @0x00200040
put bootinfo
wake up A
A_G0.11(pll): 0x00445149
A_G0.3(abio): 0x00020718
A_G0.18(ioctrl): 0x00F1E004
U-Boot 2019.04-g62af0b4-dirty (Apr 20 2021 - 15:50:14 +0800)
CONFIG_SYS_CACHELINE_SIZE: 64
Model: SP7021/CA7/Ev
DRAM: 512 MiB
clk@osc0 : 27000000 Hz
clk@0 : 13500000 Hz
clk@A_pll0 : 2000000000 Hz
plla : 135475200 Hz
plle : 50000000 Hz
plle_2p5 : 2500000 Hz
plle_25 : 25000000 Hz
plle_112p5 : 112500000 Hz
pllf : 202500000 Hz
plltv : 148500000 Hz
plltv_a : 148500000 Hz
pllsys : 202500000 Hz
NAND:
[SPI-NAND] sp_spinand: regs@0x9c002b80
[SPI-NAND] sp_bch : regs@0x9c101000
[SPI-NAND] node: bch@sp_bch, offset: 0x00003608
[SPI-NAND] sp_spinand_init in
[SPI-NAND] buff=0x1f8dda40@0x1f8dda40 size=8192
[SPI-NAND] device name : MT29F2G01ABADD
[SPI-NAND] device id : 0x002c242c
[SPI-NAND] options : 0x00004000
[SPI-NAND] drv options : 0x00000001
[SPI-NAND] chip number : 1
[SPI-NAND] block size : 131072
[SPI-NAND] page size : 2048
[SPI-NAND] oob size : 64
[SPI-NAND] oob avail : 34
[SPI-NAND] ecc size : 512
[SPI-NAND] ecc strength: 4
[SPI-NAND] ecc steps : 4
256 MiB
MMC: sd: 0
Loading Environment from NAND... *** Warning - !ISP mode, using default environment
OK
In: serial
Out: serial
Err: serial
Reason(s) of reset: REG(116, 22): 0x0002
After cleaning REG(116, 22): 0x0000
arch/arm/mach-pentagram/cpu.c, arch_misc_init: TBD.
Net:
Warning: l2sw@0x9c108000 using MAC address from ROM
eth0: l2sw@0x9c108000
Hit any key to stop autoboot: 0
[scr] bootcmd started
9e809408: 00000017 ....
[scr] ISP from USB storage
starting USB...
USB0: ehci_sunplus_probe.383, dev_name:usb@0x9C102100,port_num:0
after write usbruncmd,usbcmd:80b01,retry_times:0
USB EHCI 1.10
USB1: ehci_sunplus_probe.383, dev_name:usb@0x9C103100,port_num:1
after write usbruncmd,usbcmd:80b01,retry_times:1
USB EHCI 1.10
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
2048 bytes read in 18 ms (110.4 KiB/s)
isp_main_storage=nand
## Executing script at 01000020
ISP file from USB storage
Interface: USB
Device 0: Vendor: JetFlash Rev: 1100 Prod: Transcend 16GB
Type: Removable Hard Disk
Capacity: 15480.0 MB = 15.1 GB (31703040 x 512)
Filesystem: FAT32 "NO NAME "
14279680 ISPBOOOT_q628.BIN
14265344 ISPBOOOT.BIN
13600 watchdog
3 file(s), 0 dir(s)
Load ISP main script and run it ...
11264 bytes read in 40 ms (274.4 KiB/s)
## Executing script at 01000000
Device 0: nand0, sector size 128 KiB
Page size 2048 b
OOB size 64 b
Erase size 131072 b
subpagesize 2048 b
options 0x40004000
bbt options 0x00008000
NAND erase.chip: device 0 whole chip
Erasing at 0xffe0000 -- 100% complete.
OK
Device 0 bad blocks:
mtdparts add nand0 0x20000@0x00000000 nand_header && printenv mtdparts
mtdparts variable not set, see 'help mtdparts'
mtdparts=sp_spinand.0:128k(nand_header)
programming xboot1 ...
26624 bytes read in 18 ms (1.4 MiB/s)
partition: xboot1, start from 0x20000, size: 0x100000, programmed size: 0x6800
bblk write bblk 0x1000000 0x20000 0x6800
device 0 offset 0x20000, size 0x6800
sp_nand_write_bblk: alloc size 2112
sp_nand_write_bblk: write bblk off=0x20000 nsect=26 copies=2 sect_sz=1024
mtdparts add nand0 0x20000@0x20000 xboot1 && printenv mtdparts
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1)
programming uboot1 ...
618496 bytes read in 42 ms (14 MiB/s)
partition: uboot1, start from 0x40000, size: 0x100000, programmed size: 0x97000
bblk write bblk 0x1000000 0x40000 0x97000
device 0 offset 0x40000, size 0x97000
sp_nand_write_bblk: alloc size 2112
sp_nand_write_bblk: write bblk off=0x40000 nsect=604 copies=1 sect_sz=1024
mtdparts add nand0 0x140000@0x40000 uboot1 && printenv mtdparts
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1)
programming uboot2 ...
618496 bytes read in 43 ms (13.7 MiB/s)
partition: uboot2, start from 0x180000, size: 0x100000, programmed size: 0x97000
bblk write bblk 0x1000000 0x180000 0x97000
device 0 offset 0x180000, size 0x97000
sp_nand_write_bblk: alloc size 2112
sp_nand_write_bblk: write bblk off=0x180000 nsect=604 copies=1 sect_sz=1024
mtdparts add nand0 0x280000@0x180000 uboot2 && printenv mtdparts
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2)
isp_nand_addr_1st_part=0x400000
programming env ...
partition: env, start from 0x400000, size: 0x80000, programmed size: 0x0
mtdparts add nand0 0x80000@0x400000 env
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env)
programming env_redund ...
partition: env_redund, start from 0x480000, size: 0x80000, programmed size: 0x0
mtdparts add nand0 0x80000@0x480000 env_redund
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund)
programming nonos ...
partition: nonos, start from 0x500000, size: 0x100000, programmed size: 0xc000
mtdparts add nand0 0x100000@0x500000 nonos
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos)
49152 bytes read in 24 ms (2 MiB/s)
isp_addr_nand_write_next:
nand write 0x1000000 0x500000 0xc000
NAND write: device 0 offset 0x500000, size 0xc000
49152 bytes written: OK
programming dtb ...
partition: dtb, start from 0x600000, size: 0x40000, programmed size: 0x5400
mtdparts add nand0 0x40000@0x600000 dtb
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos),256k(dtb)
21504 bytes read in 24 ms (875 KiB/s)
isp_addr_nand_write_next: 50c000
nand write 0x1000000 0x600000 0x5400
NAND write: device 0 offset 0x600000, size 0x5400
21504 bytes written: OK
programming kernel ...
partition: kernel, start from 0x640000, size: 0x1900000, programmed size: 0x408800
mtdparts add nand0 0x1900000@0x640000 kernel
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos),256k(dtb),25m(kernel)
2097152 bytes read in 77 ms (26 MiB/s)
isp_addr_nand_write_next: 605400
nand write 0x1000000 0x640000 0x200000
NAND write: device 0 offset 0x640000, size 0x200000
2097152 bytes written: OK
2097152 bytes read in 76 ms (26.3 MiB/s)
isp_addr_nand_write_next: 840000
nand write 0x1000000 840000 0x200000
NAND write: device 0 offset 0x840000, size 0x200000
2097152 bytes written: OK
34816 bytes read in 24 ms (1.4 MiB/s)
isp_addr_nand_write_next: a40000
nand write 0x1000000 a40000 0x8800
NAND write: device 0 offset 0xa40000, size 0x8800
34816 bytes written: OK
programming rootfs ...
partition: rootfs, start from 0x1f40000, size: 0xe000000, programmed size: 0x744000
mtdparts add nand0 -@0x1f40000 rootfs
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos),256k(dtb),25m(kernel),230144k(rootfs)
2097152 bytes read in 85 ms (23.5 MiB/s)
isp_addr_nand_write_next: a48800
ubi0: attaching mtd10
ubi0: scanning is finished
ubi0: empty MTD device detected
ubi0: attached mtd10 (name "rootfs", size 224 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubi0: good PEBs: 1798, bad PEBs: 0, corrupted PEBs: 0
ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 0
ubi0: available PEBs: 1754, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40
No size specified -> Using max size (222715904)
Creating dynamic volume rootfs of size 222715904
ubi write.part 0x1000000 rootfs 0x200000 0x744000
2097152 bytes written to volume rootfs
2097152 bytes read in 76 ms (26.3 MiB/s)
isp_addr_nand_write_next: a48800
ubi write.part 0x1000000 rootfs 0x200000
2097152 bytes written to volume rootfs
2097152 bytes read in 75 ms (26.7 MiB/s)
isp_addr_nand_write_next: a48800
ubi write.part 0x1000000 rootfs 0x200000
2097152 bytes written to volume rootfs
1327104 bytes read in 56 ms (22.6 MiB/s)
isp_addr_nand_write_next: a48800
ubi write.part 0x1000000 rootfs 0x144000
1327104 bytes written to volume rootfs
programming header (boot parameters) ...
device 0 offset 0x0, size 0x6800
PlaneSelectMode=10000103
BchType=0 addrCycle=0 ReduntSize=64 BlockNum=2048 PagePerBlock=64 PageSize=2048
xboot_copies=2 xboot_pg_off=64 xboot_pg_cnt=26
tcpsum=0x0000b903
sp_nand_write_bblk: alloc size 2112
sp_nand_write_bblk: memcpy size 256, off=0x0
verifying xboot1 ...
bblk read bblk 0x1000000 xboot1 0x6800
device 0 offset 0x20000, size 0x6800
sp_nand_read_bblk: alloc size 2112
sp_nand_read_bblk: sect size 1024
sp_nand_read_bblk: read bblk off=0x20000 nsect=26 no_skip=0
md5 for 01000000 ... 010067ff ==> 820dc9c5730d67a286e138e65c98e4d9
md5sum: OK.
verifying uboot1 ...
bblk read bblk 0x1000000 uboot1 0x97000
device 0 offset 0x40000, size 0x97000
sp_nand_read_bblk: alloc size 2112
sp_nand_read_bblk: sect size 1024
sp_nand_read_bblk: read bblk off=0x40000 nsect=604 no_skip=0
md5 for 01000000 ... 01096fff ==> 3855a54d5a6527a49c79ac1e9c001b0b
md5sum: OK.
verifying uboot2 ...
bblk read bblk 0x1000000 uboot2 0x97000
device 0 offset 0x180000, size 0x97000
sp_nand_read_bblk: alloc size 2112
sp_nand_read_bblk: sect size 1024
sp_nand_read_bblk: read bblk off=0x180000 nsect=604 no_skip=0
md5 for 01000000 ... 01096fff ==> 3855a54d5a6527a49c79ac1e9c001b0b
md5sum: OK.
verifying env ...
verifying env_redund ...
verifying nonos ...
nand read 0x1000000 nonos 0xc000
NAND read: device 0 offset 0x500000, size 0xc000
49152 bytes read: OK
md5 for 01000000 ... 0100bfff ==> cc5db728b337a826d74cb2af0a39a879
md5sum: OK.
verifying dtb ...
nand read 0x1000000 dtb 0x5400
NAND read: device 0 offset 0x600000, size 0x5400
21504 bytes read: OK
md5 for 01000000 ... 010053ff ==> 1a725467e6ce8cf5dcd17cce84a0bda7
md5sum: OK.
verifying kernel ...
nand read 0x1000000 kernel 0x200000
NAND read: device 0 offset 0x640000, size 0x200000
2097152 bytes read: OK
md5 for 01000000 ... 011fffff ==> 3687be9d6e152e9e4d0959ac3ecc5a77
md5sum: OK.
isp_addr_nand_read_next: 840000
nand read 0x1000000 840000 0x200000
NAND read: device 0 offset 0x840000, size 0x200000
2097152 bytes read: OK
md5 for 01000000 ... 011fffff ==> cba799e7af285790ed22fb4b2e4c645c
md5sum: OK.
isp_addr_nand_read_next: a40000
nand read 0x1000000 a40000 0x8800
NAND read: device 0 offset 0xa40000, size 0x8800
34816 bytes read: OK
md5 for 01000000 ... 010087ff ==> 960caff33542acc646a761ea7f90080c
md5sum: OK.
Following environment variables will be saved:
addr_dst_dtb=0x2FFFC0
addr_dst_kernel=0x307FC0
addr_dst_nonos=0x10000
addr_src_dtb=0x98020000
addr_src_kernel=0x98200000
addr_src_nonos=0x98100000
addr_tmp_header=0x800000
b_c=console=tty1 console=ttyS0,115200 earlyprintk
baudrate=115200
be2le=setexpr byte *${tmpaddr} '&' 0x000000ff; setexpr tmpval $tmpval + $byte; setexpr tmpval $tmpval * 0x100; setexpr byte *${tmpaddr} '&' 0x0000ff00; setexpr byte ${byte} / 0x100; setexpr tmpval $tmpval + $byte; setexpr tmpval $tmpval * 0x100; setexpr byte *${tmpaddr} '&' 0x00ff0000; setexpr byte ${byte} / 0x10000; setexpr tmpval $tmpval + $byte; setexpr tmpval $tmpval * 0x100; setexpr byte *${tmpaddr} '&' 0xff000000; setexpr byte ${byte} / 0x1000000; setexpr tmpval $tmpval + $byte;
boot_kernel=if itest ${if_use_nfs_rootfs} == 1; then setenv bootargs ${b_c} root=/dev/nfs nfsroot=${nfs_serverip}:${nfs_rootfs_dir} ip=${nfs_clintip}:${nfs_serverip}:${nfs_gatewayip}:${nfs_netmask}::eth0:off rdinit=/linuxrc noinitrd rw; fi; verify ${addr_dst_kernel}; bootm ${addr_dst_kernel} - ${fdtcontroladdr};
bootcmd=echo [scr] bootcmd started; md.l ${bootinfo_base} 1; if itest.l *${bootinfo_base} == 0x11; then if itest ${if_zebu} == 1; then if itest ${if_qkboot} == 1; then echo [scr] qk zmem boot; run qk_zmem_boot; else echo [scr] zmem boot; run zmem_boot; fi; else if itest ${if_qkboot} == 1; then echo [scr] qk romter boot; run qk_romter_boot; elif itest.s ${sp_main_storage} == tftp; then echo [scr] tftp_boot; run tftp_boot; else echo [scr] romter boot; run romter_boot; fi; fi; elif itest.l *${bootinfo_base} == 0x1F; then if itest ${if_zebu} == 1; then echo [scr] zebu emmc boot; run zebu_emmc_boot; else if itest ${if_qkboot} == 1; then echo [scr] qk emmc boot; run qk_emmc_boot; else echo [scr] emmc boot; run emmc_boot; fi; fi; elif itest.l *${bootinfo_base} == 0x09; then echo [scr] nand boot; run nand_boot; elif itest.l *${bootinfo_base} == 0x17; then echo [scr] ISP from USB storage; run isp_usb; elif itest.l *${bootinfo_base} == 0x07; then echo [scr] ISP from SD Card; run isp_sdcard; else echo Stop; fi
bootdelay=0
bootinfo_base=0x9e809408
emmc_boot=mmc read ${addr_tmp_header} ${addr_src_nonos} 0x1; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_nonos ${tmpval} + 0x40; setexpr sz_nonos ${sz_nonos} + 0x200; setexpr sz_nonos ${sz_nonos} / 0x200; mmc read ${addr_dst_nonos} ${addr_src_nonos} ${sz_nonos}; sp_nonos_go ${addr_dst_nonos}; mmc read ${addr_tmp_header} ${addr_src_kernel} 0x1; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 0x48; setexpr sz_kernel ${sz_kernel} + 0x200; setexpr sz_kernel ${sz_kernel} / 0x200; mmc read ${addr_dst_kernel} ${addr_src_kernel} ${sz_kernel}; setenv bootargs ${b_c} ${emmc_root} ${args_emmc} ${args_kern}; run boot_kernel
emmc_root=root=/dev/mmcblk0p8 rw rootwait
ethaddr=00:22:60:00:88:30
fdtcontroladdr=1f8d4e98
fileaddr=1000000
filesize=144000
if_qkboot=CONFIG_SYS_USE_QKBOOT_HEADER
if_use_nfs_rootfs=USE_NFS_ROOTFS
if_zebu=CONFIG_SYS_ENV_ZEBU
isp_common=setenv isp_ram_addr 0x1000000; setenv filesize 0; fatsize $isp_if $isp_dev /cmdline.txt; if test $filesize != 0; then fatload $isp_if $isp_dev $addr_dst_dtb /cmdline.txt; raspb init $fileaddr $filesize; echo new bootargs; echo $bootargs; fi; fatload $isp_if $isp_dev $isp_ram_addr /ISPBOOOT.BIN 0x800 0x100000; setenv isp_main_storage ${sp_main_storage} && printenv isp_main_storage; setexpr script_addr $isp_ram_addr + 0x20 && setenv script_addr 0x${script_addr} && source $script_addr;
isp_dev=0
isp_if=usb
isp_sdcard=setenv isp_if mmc && setenv isp_dev $sdcard_devid; mmc list; fatsize $isp_if $isp_dev /ISPBOOOT.BIN; echo ISPBOOOT filesize = $filesize; if itest.l ${filesize} == 0x10000; then echo run sdcard_boot; scriptaddr=0x1000000; bootscr=boot.scr; bootenv=uEnv.txt; if run loadbootenv; then echo Loaded environment from ${bootenv}; env import -t ${scriptaddr} ${filesize}; fi; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; if run loadbootscr; then echo Jumping to ${bootscr}; source ${scriptaddr}; fi; else echo run isp_common; run isp_common; fi
isp_usb=setenv isp_if usb && setenv isp_dev 0; $isp_if start; run isp_common;
loadbootenv=fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /${bootenv} || fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /boot/${bootenv} || fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /sunplus/sp7021/${bootenv};
loadbootscr=fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /${bootscr} || fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /boot/${bootscr} || fatload ${isp_if} ${isp_dev}:1 ${scriptaddr} /sunplus/sp7021/${bootscr};
macaddr=00:22:60:00:88:20
mtddevname=nand_header
mtddevnum=0
mtdids=nand0=sp_spinand.0
mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos),256k(dtb),25m(kernel),230144k(rootfs)
nand_boot=nand read ${addr_tmp_header} nonos 0x40; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_nonos ${tmpval} + 0x40; nand read ${addr_dst_nonos} nonos ${sz_nonos}; sp_nonos_go ${addr_dst_nonos}; nand read ${addr_tmp_header} kernel 0x40; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 0x48; nand read ${addr_dst_kernel} kernel ${sz_kernel}; setenv bootargs ${b_c} root=ubi0:rootfs rw ubi.mtd=9,2048 rootflags=sync rootfstype=ubifs mtdparts=${mtdparts} user_debug=255 rootwait; run boot_kernel
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
nfs_clintip=NFS_ROOTFS_CLINT_IP
nfs_gatewayip=NFS_ROOTFS_GATEWAY_IP
nfs_netmask=NFS_ROOTFS_NETMASK
nfs_rootfs_dir=NFS_ROOTFS_DIR
nfs_serverip=NFS_ROOTFS_SERVER_IP
part_sizes=uboot2_1Menv_512Kenv_redund_512Knonos_1Mdtb_256Kkernel_25Mrootfs_224M
partition=nand0,0
qk_emmc_boot=mmc read ${addr_tmp_header} ${addr_src_kernel} 0x1; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 0x200; setexpr sz_kernel ${sz_kernel} / 0x200; mmc read ${addr_dst_kernel} ${addr_src_kernel} ${sz_kernel}; sp_go ${addr_dst_kernel} ${fdtcontroladdr}
qk_romter_boot=cp.b ${addr_src_kernel} ${addr_tmp_header} 0x40; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 4; setexpr sz_kernel ${sz_kernel} / 4; cp.l ${addr_src_kernel} ${addr_dst_kernel} ${sz_kernel}; sp_go ${addr_dst_kernel} ${fdtcontroladdr}
qk_zmem_boot=sp_go ${addr_dst_kernel} ${fdtcontroladdr}
romter_boot=cp.b ${addr_src_nonos} ${addr_tmp_header} 0x40; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_nonos ${tmpval} + 0x40; setexpr sz_nonos ${sz_nonos} + 3; setexpr sz_nonos ${sz_nonos} / 4; cp.l ${addr_src_nonos} ${addr_dst_nonos} ${sz_nonos}; sp_nonos_go ${addr_dst_nonos}; cp.b ${addr_src_kernel} ${addr_tmp_header} 0x40; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 0x48; echo loading kernel ...; setexpr sz_kernel ${sz_kernel} + 3; setexpr sz_kernel ${sz_kernel} / 4; cp.l ${addr_src_kernel} ${addr_dst_kernel} ${sz_kernel}; run boot_kernel
sdcard_devid=0
serverip=172.18.12.62
sp_main_storage=nand
stderr=vidconsole,serial
stdin=serial
stdout=vidconsole,serial
tftp_boot=setenv ethaddr ${macaddr} && printenv ethaddr; printenv serverip; setenv filesize 0; dhcp ${addr_dst_kernel} ${serverip}:a926_username; if test $filesize != 0; then setexpr tmpval $filesize + 3; setexpr tmpval $tmpval / 4; echo Copying nonos image to $addr_dst_nonos; cp.l $addr_dst_kernel $addr_dst_nonos $tmpval; echo "## Booting A926 from image at ${addr_dst_nonos}"; sp_nonos_go ${addr_dst_nonos}; fi; dhcp ${addr_dst_dtb} ${serverip}:dtb_username && dhcp ${addr_dst_kernel} ${serverip}:uImage_username; if test $? != 0; then echo Error occurred while getting images from tftp server!; exit; fi; verify ${addr_dst_kernel}; bootm ${addr_dst_kernel} - ${addr_dst_dtb};
update_common=setenv isp_ram_addr 0x1000000; setenv isp_update_file_name ISP_UPDT.BIN; fatload $isp_if $isp_dev $isp_ram_addr /$isp_update_file_name 0x800; setenv isp_main_storage ${sp_main_storage} && printenv isp_main_storage; setenv isp_image_header_offset 0; setexpr script_addr $isp_ram_addr + 0x20 && setenv script_addr 0x${script_addr} && source $script_addr;
update_sdcard=setenv isp_if mmc && setenv isp_dev 1; mmc list; run update_common;
update_tftp=setenv isp_ram_addr 0x1000000; setenv ethaddr ${macaddr} && printenv ethaddr; printenv serverip; dhcp $isp_ram_addr $serverip:TFTP0000.BIN; setenv isp_main_storage ${sp_main_storage} && printenv isp_main_storage; setexpr script_addr $isp_ram_addr + 0x00 && setenv script_addr 0x${script_addr} && source $script_addr;
update_usb=setenv isp_if usb && setenv isp_dev 0; $isp_if start; run update_common;
zebu_emmc_boot=mmc rescan; mmc part; mmc read ${addr_tmp_header} ${addr_src_kernel} 0x1; setenv tmpval 0; setexpr tmpaddr ${addr_tmp_header} + 0x0c; run be2le; setexpr sz_kernel ${tmpval} + 0x40; setexpr sz_kernel ${sz_kernel} + 0x48; setexpr sz_kernel ${sz_kernel} + 0x200; setexpr sz_kernel ${sz_kernel} / 0x200; mmc read ${addr_dst_kernel} ${addr_src_kernel} ${sz_kernel}; sp_go ${addr_dst_kernel} ${fdtcontroladdr}
zmem_boot=bootm ${addr_dst_kernel} - ${fdtcontroladdr}
Environment size: 9446/524283 bytes
Saving Environment to NAND... Erasing redundant NAND...
Erasing at 0x4e0000 -- 100% complete.
Writing to redundant NAND... OK
OK
**************************************************
ISP all: Done
**************************************************
=>
Appendix C. Log of Booting from SPI-NAND flash (from u-boot to Linux)
U-Boot 2019.04-g62af0b4-dirty (Apr 20 2021 - 15:50:14 +0800)
CONFIG_SYS_CACHELINE_SIZE: 64
Model: SP7021/CA7/Ev
DRAM: 512 MiB
clk@osc0 : 27000000 Hz
clk@0 : 13500000 Hz
clk@A_pll0 : 2000000000 Hz
plla : 135475200 Hz
plle : 50000000 Hz
plle_2p5 : 2500000 Hz
plle_25 : 25000000 Hz
plle_112p5 : 112500000 Hz
pllf : 202500000 Hz
plltv : 148500000 Hz
plltv_a : 148500000 Hz
pllsys : 202500000 Hz
NAND:
[SPI-NAND] sp_spinand: regs@0x9c002b80
[SPI-NAND] sp_bch : regs@0x9c101000
[SPI-NAND] node: bch@sp_bch, offset: 0x00003608
[SPI-NAND] sp_spinand_init in
[SPI-NAND] buff=0x1f8dda40@0x1f8dda40 size=8192
[SPI-NAND] device name : MT29F2G01ABADD
[SPI-NAND] device id : 0x002c242c
[SPI-NAND] options : 0x00004000
[SPI-NAND] drv options : 0x00000001
[SPI-NAND] chip number : 1
[SPI-NAND] block size : 131072
[SPI-NAND] page size : 2048
[SPI-NAND] oob size : 64
[SPI-NAND] oob avail : 34
[SPI-NAND] ecc size : 512
[SPI-NAND] ecc strength: 4
[SPI-NAND] ecc steps : 4
256 MiB
MMC: sd: 0
Loading Environment from NAND... OK
In: serial
Out: serial
Err: serial
Reason(s) of reset: REG(116, 22): 0x0002
After cleaning REG(116, 22): 0x0000
arch/arm/mach-pentagram/cpu.c, arch_misc_init: TBD.
Net: eth0: l2sw@0x9c108000
Hit any key to stop autoboot: 0
[scr] bootcmd started
9e809408: 00000009 ....
[scr] nand boot
NAND read: device 0 offset 0x500000, size 0x40
64 bytes read: OK
NAND read: device 0 offset 0x500000, size 0xc000
49152 bytes read: OK
Image Name: uboot
Image Type: ARM Linux Sunplus Quick Boot Image (uncompressed)
Data Size: 49088 Bytes = 47.9 KiB
Load Address: 00010040
Entry Point: 00010040
Verifying Checksum ... OK
[u-boot] nonos_B address 0x00010000 nonos_size= 49088
NAND read: device 0 offset 0x640000, size 0x40
64 bytes read: OK
NAND read: device 0 offset 0x640000, size 0x408788
4229000 bytes read: OK
kernel_hdr addr = 307fc0
******OTP Secure Boot is OFF, return success******
## Booting kernel from Legacy Image at 00307fc0 ...
Image Name: Linux-5.4.35-g9a9e0ae-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4228864 Bytes = 4 MiB
Load Address: 00308000
Entry Point: 00308000
Verifying Checksum ... OK
## Flattened Device Tree blob at 1f8d4e98
Booting using the fdt blob at 0x1f8d4e98
XIP Kernel Image ... OK
Loading Device Tree to 1f8cb000, end 1f8d3010 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.35-g9a9e0ae-dirty (wellslu@scdiu3) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05)) #202 SMP PREEMPT Tue Apr 20 15:38:17 CST 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: SP7021/CA7/Ev
[ 0.000000] printk: bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] sp_map_io
[ 0.000000] P_REG: [9c000000-9dffffff] -> [f8000000-f9ffffff]
[ 0.000000] C_REG: [9ec00000-9effffff] -> [fa000000-fa3fffff]
[ 0.000000] percpu: Embedded 15 pages/cpu s30348 r8192 d22900 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129540
[ 0.000000] Kernel command line: console=tty1 console=ttyS0,115200 earlyprintk root=ubi0:rootfs rw ubi.mtd=9,2048 rootflags=sync rootfstype=ubifs mtdparts=sp_spinand.0:128k(nand_header),128k(xboot1),1280k(uboot1),2560k(uboot2),512k(env),512k(env_redund),1m(nonos),256k(dtb),25m(kernel),230144k(rootfs) user_debug=255 rootwait
[ 0.000000] printk: log_buf_len individual max cpu contribution: 4096 bytes
[ 0.000000] printk: log_buf_len total cpu_extra contributions: 12288 bytes
[ 0.000000] printk: log_buf_len min size: 16384 bytes
[ 0.000000] printk: log_buf_len: 32768 bytes
[ 0.000000] printk: early log buf free: 14488(88%)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 508096K/522240K available (4096K kernel code, 835K rwdata, 2132K rodata, 1024K init, 232K bss, 14144K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 205
[ 0.000000] random: get_random_bytes called from start_kernel+0x1c3/0x308 with crng_init=0
[ 0.000000] @@@ Sunplus clock init
[ 0.000000] plla 135475200
[ 0.000000] plle 50000000
[ 0.000000] plle_2p5 2500000
[ 0.000000] plle_25 25000000
[ 0.000000] plle_112p5 112500000
[ 0.000000] pllf 202500000
[ 0.000000] plltv 148500000
[ 0.000000] pllsys 202500000
[ 0.000000] arch_timer: cp15 timer(s) running at 27.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x63a1e71a3, max_idle_ns: 440795203123 ns
[ 0.000010] sched_clock: 56 bits at 27MHz, resolution 37ns, wraps every 4398046511093ns
[ 0.008139] Switching to timer-based delay loop, resolution 37ns
[ 0.014974] Console: colour dummy device 80x30
[ 0.020189] printk: console [tty1] enabled
[ 0.024387] Calibrating delay loop (skipped), value calculated using timer frequency.. 54.00 BogoMIPS (lpj=270000)
[ 0.034947] pid_max: default: 32768 minimum: 301
[ 0.039922] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.047392] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.056260] CPU: Testing write buffer coherency: ok
[ 0.061904] CPU0: update cpu_capacity 1024
[ 0.066082] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.132071] Setting up static identity map for 0x400000 - 0x400054
[ 0.138518] rcu: Hierarchical SRCU implementation.
[ 0.183529] smp: Bringing up secondary CPUs ...
[ 0.243985] CPU1: update cpu_capacity 1024
[ 0.243996] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.323934] CPU2: update cpu_capacity 1024
[ 0.323944] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.404019] CPU3: update cpu_capacity 1024
[ 0.404028] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.404144] smp: Brought up 1 node, 4 CPUs
[ 0.438106] SMP: Total of 4 processors activated (216.00 BogoMIPS).
[ 0.444491] CPU: All CPU(s) started in SVC mode.
[ 0.449944] devtmpfs: initialized
[ 0.459519] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.468355] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.478431] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.485902] pinctrl core: initialized pinctrl subsystem
[ 0.492046] NET: Registered protocol family 16
[ 0.497359] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.505785] sp_init
[ 0.507947] av1_stc: 0x0003c1a5
[ 0.511141] P-chip: sys = 202MHz, cpio_ctrl = (16bit, DDR)
[ 0.516770] C-chip: core = 931MHz, sys = 465MHz, pllio = 1998MHz, cpio_bus = 399MHz
[ 0.524558] apply partial clken to save power
[ 0.529403] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.537559] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.543548] 1: ext0-mask=0xf
[ 0.546481] 2: ext1-mask=0xe
[ 0.564045] sp_bch_probe in
[ 0.570113] sppctl pctl: funcs: 156 unq_grps: 140
[ 0.575279] SP7021 PinCtl by Sunplus/Tibbo Tech.(C) 2020
[ 0.613081] fbcon: Taking over console
[ 0.626348] SCSI subsystem initialized
[ 0.631128] usbcore: registered new interface driver usbfs
[ 0.636894] usbcore: registered new interface driver hub
[ 0.643773] usbcore: registered new device driver usb
[ 0.649487] videodev: Linux video capture interface: v2.00
[ 0.656688] sunplus,sp7021-ocotp 9c00af00.otp: by Sunplus (C) 2020
[ 0.665273] clocksource: Switched to clocksource arch_sys_counter
[ 0.690310] register sunplus_usb_phy0_driver
[ 0.695106] uphy0_irq:36
[ 0.704396] register sunplus_usb_phy1_driver
[ 0.708974] uphy1_irq:37
[ 0.717981] register sunplus_usb_otg0_driver
[ 0.723090] register sunplus_usb_otg1_driver
[ 0.746100] HDMITX installed
[ 0.749120] HDMI plug in
[ 0.752839] NET: Registered protocol family 2
[ 0.758412] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.766966] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.774896] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.782228] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.788904] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.795615] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.803031] NET: Registered protocol family 1
[ 0.825710] RPC: Registered named UNIX socket transport module.
[ 0.831745] RPC: Registered udp transport module.
[ 0.836589] RPC: Registered tcp transport module.
[ 0.841375] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.849020] hw perfevents: no interrupt-affinity property for /arm-pmu, guessing.
[ 0.857140] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[ 0.867336] Initialise system trusted keyrings
[ 0.872166] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.895512] NFS: Registering the id_resolver key type
[ 0.900709] Key type id_resolver registered
[ 0.904964] Key type id_legacy registered
[ 0.909205] Key type asymmetric registered
[ 0.913377] Asymmetric key parser 'x509' registered
[ 0.918549] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.926141] io scheduler mq-deadline registered
[ 0.930750] io scheduler kyber registered
[ 0.939033] K_TTYS: sp_uart0's Rx is in PIO mode.
[ 0.943853] K_TTYS: sp_uart0's Tx is in PIO mode.
[ 0.948694] 9c000900.serial: ttyS0 at MMIO 0x9c000900 (irq = 53, base_baud = 1687500) is a sp_uart0
[ 0.958011] printk: console [ttyS0] enabled
[ 0.958011] printk: console [ttyS0] enabled
[ 0.966452] printk: bootconsole [earlycon0] disabled
[ 0.966452] printk: bootconsole [earlycon0] disabled
[ 0.994029] loop: module loaded
[ 0.997092] [SPI-NAND] sp_spinand_probe in
[ 0.999471] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x24
[ 0.999577] nand: Micron MT29F2G01ABADD
[ 1.000237] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 1.008668] Bad block table not found for chip 0
[ 1.012981] Bad block table not found for chip 0
[ 1.017207] Scanning device for bad blocks
[ 1.031758] random: fast init done
[ 1.206336] Bad block table written to 0x00000ffe0000, version 0x01
[ 1.208022] Bad block table written to 0x00000ffc0000, version 0x01
[ 1.208205] 10 cmdlinepart partitions found on MTD device sp_spinand.0
[ 1.214174] Creating 10 MTD partitions on "sp_spinand.0":
[ 1.219571] 0x000000000000-0x000000020000 : "nand_header"
[ 1.225634] 0x000000020000-0x000000040000 : "xboot1"
[ 1.230364] 0x000000040000-0x000000180000 : "uboot1"
[ 1.235362] 0x000000180000-0x000000400000 : "uboot2"
[ 1.240319] 0x000000400000-0x000000480000 : "env"
[ 1.244929] 0x000000480000-0x000000500000 : "env_redund"
[ 1.250260] 0x000000500000-0x000000600000 : "nonos"
[ 1.255082] 0x000000600000-0x000000640000 : "dtb"
[ 1.259840] 0x000000640000-0x000001f40000 : "kernel"
[ 1.264808] 0x000001f40000-0x000010000000 : "rootfs"
[ 1.270668] [SPI-NAND] ====Sunplus SPI-NAND Driver====
[ 1.274240] [SPI-NAND] ==spi nand driver info==
[ 1.278768] [SPI-NAND] regs = 0x(ptrval)@0x9c002b80, size = 79
[ 1.284545] [SPI-NAND] buffer = 0x(ptrval)@0x9e800000, size = 8192
[ 1.290708] [SPI-NAND] irq = 149
[ 1.293898] [SPI-NAND] ==spi nand device info==
[ 1.298438] [SPI-NAND] device name : sp_spinand.0
[ 1.303088] [SPI-NAND] device id : 0x0000242c
[ 1.307608] [SPI-NAND] options : 0x03004200
[ 1.312100] [SPI-NAND] drv options : 0x00000001
[ 1.316616] [SPI-NAND] chip number : 1
[ 1.320332] [SPI-NAND] block size : 131072
[ 1.324494] [SPI-NAND] page size : 2048
[ 1.328500] [SPI-NAND] oob size : 64
[ 1.332293] [SPI-NAND] oob avail : 34
[ 1.336119] [SPI-NAND] ecc size : 512
[ 1.340006] [SPI-NAND] ecc strength: 4
[ 1.343732] [SPI-NAND] ecc steps : 4
[ 1.347468] [SPI-NAND] ecc options : 0x00000000
[ 1.352630] libphy: Fixed MDIO Bus: probed
[ 1.356097] CAN device driver interface
[ 1.360480] [L2SW] L2 switch mode = 0
[ 1.363719] [L2SW] HW Addr = 00:22:60:00:88:30
[ 1.368767] [L2SW] Registered net device "eth0" successfully.
[ 1.373852] libphy: sunplus_mii_bus: probed
[ 1.379431] net eth0: could not add device link to 9c108000.l2sw-mii:01 err -17
[ 1.386570] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.391637] ehci-platform: EHCI generic platform driver
[ 1.397126] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.402960] ohci-platform: OHCI generic platform driver
[ 1.408336] register ehci0_hcd_sunplus_driver
[ 1.412752] ehci0-sunplus 9c102100.usb: Generic Platform EHCI Controller
[ 1.419222] ehci0-sunplus 9c102100.usb: new USB bus registered, assigned bus number 1
[ 1.427215] ehci0-sunplus 9c102100.usb: irq 14, io mem 0x9c102100
[ 1.455260] ehci0-sunplus 9c102100.usb: USB 2.0 started, EHCI 1.10
[ 1.456531] hub 1-0:1.0: USB hub found
[ 1.456674] hub 1-0:1.0: 1 port detected
[ 1.458626] register ehci1_hcd_sunplus_driver
[ 1.462539] ehci1-sunplus 9c103100.usb: Generic Platform EHCI Controller
[ 1.468966] ehci1-sunplus 9c103100.usb: new USB bus registered, assigned bus number 2
[ 1.476980] ehci1-sunplus 9c103100.usb: irq 17, io mem 0x9c103100
[ 1.505265] ehci1-sunplus 9c103100.usb: USB 2.0 started, EHCI 1.10
[ 1.506392] hub 2-0:1.0: USB hub found
[ 1.506528] hub 2-0:1.0: 1 port detected
[ 1.508592] register ohci0_hcd_sunplus_driver
[ 1.512490] ohci_id:1,irq:15
[ 1.515135] ohci0-sunplus 9c102080.usb: Generic Platform OHCI Controller
[ 1.521829] ohci0-sunplus 9c102080.usb: new USB bus registered, assigned bus number 3
[ 1.529802] ohci0-sunplus 9c102080.usb: irq 15, io mem 0x9c102080
[ 1.618176] hub 3-0:1.0: USB hub found
[ 1.618319] hub 3-0:1.0: 1 port detected
[ 1.619072] register ohci1_hcd_sunplus_driver
[ 1.619404] ohci_id:2,irq:18
[ 1.621894] ohci1-sunplus 9c103080.usb: Generic Platform OHCI Controller
[ 1.628607] ohci1-sunplus 9c103080.usb: new USB bus registered, assigned bus number 4
[ 1.636585] ohci1-sunplus 9c103080.usb: irq 18, io mem 0x9c103080
[ 1.708165] hub 4-0:1.0: USB hub found
[ 1.708291] hub 4-0:1.0: 1 port detected
[ 1.709182] usbcore: registered new interface driver usb-storage
[ 1.710843] register sunplus_driver_udc
[ 1.710843]
[ 1.717122] >>> sp_udc_alloc_request...
[ 1.717122]
[ 1.721224] <<< sp_udc_alloc_request...
[ 1.721224]
[ 1.726810] zero gadget: Gadget Zero, version: Cinco de Mayo 2008
[ 1.732561] zero gadget: zero ready
[ 1.736791] mousedev: PS/2 mouse device common for all mice
[ 1.742915] sp7021-rtc 9c003a00.serial: registered as rtc0
[ 1.747090] [RTC] Info: sp7021-rtc loaded
[ 1.751535] [DISP][_display_probe:3137] disp probe ...
[ 1.756299] [DISP]irq num:4
[ 1.759276] [DISP]ttl-name general hdmi,720X480
[ 1.764518] [DISP][_display_probe:3378] disp probe done
[ 1.769342] usbcore: registered new interface driver uvcvideo
[ 1.774599] USB Video Class driver (1.1.1)
[ 1.779734] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.784498] usbcore: registered new interface driver usbhid
[ 1.789626] usbhid: USB HID core driver
[ 1.793394] exFAT: Version 1.3.0
[ 1.797343] NET: Registered protocol family 10
[ 1.802598] Segment Routing with IPv6
[ 1.804774] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.812063] NET: Registered protocol family 17
[ 1.815008] can: controller area network core (rev 20170425 abi 9)
[ 1.821405] NET: Registered protocol family 29
[ 1.825581] can: raw protocol (rev 20170425)
[ 1.829799] can: broadcast manager protocol (rev 20170425 t)
[ 1.835462] can: netlink gateway (rev 20190810) max_hops=1
[ 1.841087] NET: Registered protocol family 37
[ 1.845396] Key type dns_resolver registered
[ 1.849613] Key type ceph registered
[ 1.865313] libceph: loaded (mon/osd proto 15/24)
[ 1.865764] Registering SWP/SWPB emulation handler
[ 1.866291] Loading compiled-in X.509 certificates
[ 1.875436] usb 2-1: new high-speed USB device number 2 using ehci1-sunplus
[ 1.892194] Console: switching to colour frame buffer device 90x30
[ 1.902093] sp7021-fb soc@B:fb_device: [_sp7021_fb_create_device:282] mem VA 0xe0a4e000(PA 0x1e000000), Palette VA 0xdebeb000(PA 0x1ebeb000), UI Res 720x480, size 2768896 + 1024
[ 1.917229] ubi0: attaching mtd9
[ 1.930452] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 1.934849] scsi host0: usb-storage 2-1:1.0
[ 2.428941] ubi0: scanning is finished
[ 2.439732] ubi0: attached mtd9 (name "rootfs", size 224 MiB)
[ 2.443583] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2.447442] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 2.451653] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2.458608] ubi0: good PEBs: 1794, bad PEBs: 4, corrupted PEBs: 0
[ 2.464668] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 2.471981] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[ 2.484271] ubi0: available PEBs: 0, total reserved PEBs: 1794, PEBs reserved for bad PEB handling: 36
[ 2.493896] ubi0: background thread "ubi_bgt0d" started, PID 653
[ 2.498191] sp7021-rtc 9c003a00.serial: setting system clock to 1970-01-01T00:40:44 UTC (2444)
[ 2.512102] UBIFS: parse sync
[ 2.517292] UBIFS (ubi0:0): Mounting in unauthenticated mode
[ 2.521891] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 655
[ 2.544948] UBIFS (ubi0:0): start fixing up free space
[ 2.633426] random: crng init done
[ 2.912255] UBIFS (ubi0:0): free space fixup complete
[ 2.929738] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 2.934350] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[ 2.944787] UBIFS (ubi0:0): FS size: 221319168 bytes (211 MiB, 1743 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[ 2.955744] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[ 2.960372] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 9BC26B72-4B35-4F82-86F2-D7BFEF35ED4C, small LPT model
[ 2.973665] VFS: Mounted root (ubifs filesystem) on device 0:14.
[ 2.979007] devtmpfs: mounted
[ 2.985618] Freeing unused kernel memory: 1024K
[ 2.990412] Run /sbin/init as init process
/etc/init.d/rcS starts...
Mounting other filesystems ...
rc.extra [bg]
End of /etc/init.d/rcS
0x0000A7CF
0x00000007
extra done
login[684]: root login on 'console'
~ #
Refer to report of df command:
Type of file-system is ubifs. Total size is 194.5 MB. Used is 5.5 MB. Available is 189.0 MB.