How to boot SP7021 Linux from TFTP server
The aim of the document is to illustrate how to boot SP7021 Linux from TFTP (Trivial File Transfer Protocol) server. First, you need to install a TFTP server on your Linux PC. Second, you need to download SP7021 source files from SP7021 git server. Third, build image of SPI NOR flash and image of Linux kernel. Fourth, burn image of SPI NOR flash to an SPI NOR flash chip. Finally, turn on power of SP7021 board to boot Linux from TFTP server.
SPI-NOR flash acts as a starter. The image of SPI-NOR flash actually contains boot-loader (x-boot) and u-boot images. SP7021 board needs to be setup to boot from SPI NOR flash. So, when you turn SP7021 board power on, SP7021 starts to load image of boot-loader (x-boot) from SPI NOR flash chip and then runs it. x-boot then loads image of u-boot and then runs it. u-boot sends dhcp commands to get IP address of itself from DHCP server. Once it gets IP address, it starts to download images of Linux kernel from TFTP server. Finally, it sends bootm command to boot Linux. Please follow the following steps.
1. Install TFTP server
First, use apt command to install TFTP server. For example, install package tftpd-hpa by issuing command:
wells@wells-linux:~/q628/sdc$ sudo apt install tftpd-hpa
Second, create a folder for TFTP service. For example, create folder /home/scftp and setup its permission and owners by issuing commands:
wells@wells-linux:~/q628/sdc$ sudo mkdir /home/scftp
wells@wells-linux:~/q628/sdc$ sudo chmod 777 -R /home/scftp
wells@wells-linux:~/q628/sdc$ sudo chown nobody.nogroup -R /scftp
where ‘-R’ in chmod and chown command means recursive with sub-folder.
Later, you need to copy kernel image and device-tree blob to this folder.
Third, edit tftpd-hpa configuration file, /etc/default/tftpd-hpa, as below:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/scftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
where “/home/scftp” is the folder you created for TFTP service. “--secure” means add security. This option is recommended for security as well as compatibility. “--create” means allow new files to be created. This is optional.
Fourth, re-start TFTP server to validate the new settings.
wells@wells-linux:~/q628/sdc$ sudo service tftpd-hpa restart
2. Download source files
Source files of SP7021 can be downloaded from GitHub or Yocto server of SP7021. Refer to GitHub - 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/tftp$ ll
total 52
drwxr-xr-x 12 wellslu sp 4096 Oct 15 12:16 ./
drwxr-xr-x 19 wellslu sp 4096 Oct 15 12:03 ../
drwxr-xr-x 8 wellslu sp 4096 Jul 17 18:23 boot/
drwxr-xr-x 4 wellslu sp 4096 Aug 24 17:14 build/
drwxr-xr-x 7 wellslu sp 4096 Jul 31 13:21 crossgcc/
drwxr-xr-x 6 wellslu sp 4096 Jul 17 18:23 eCos/
drwxr-xr-x 9 wellslu sp 4096 Jul 17 18:23 freertos/
drwxr-xr-x 8 wellslu sp 4096 Aug 11 14:30 ipack/
drwxr-xr-x 7 wellslu sp 4096 Jul 17 18:23 linux/
-r--r--r-- 1 wellslu sp 23 Jul 17 18:23 Makefile
drwxr-xr-x 4 wellslu sp 4096 Jul 17 18:23 nonos/
drwxr-xr-x 7 wellslu sp 4096 Jul 17 18:23 .repo/
drwxr-xr-x 3 wellslu sp 4096 Jul 17 18:23 yocto/
3. 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 for SP7021 Ev Board. Second, press 1 for selecting C-chip. Next, press 5 to select to configure for booting from TFTP server. Refer to screenshot below:
After press enter, make config will ask you to enter IP address of your TFTP server. Generally, you will set up your TFTP server in the machine as you build (compile) your Linux image. Please enter IP address of your TFTP server. Refer to screenshot below, IP address, 172.18.12.62, is entered:
make config will then ask you to enter TFTP service folder. Please enter TFTP service folder. After completing build image, make will copy image of Linux kernel and device-tree blob to the service folder. Refer to screenshot below, TFTP service folder, /home/scftp, is entered:
Note that you should have permission to write files to TFTP service folder.
Finally, make config will ask you to enter MAC address of your target board. If you want to preset (force to set) MAC address of your target board, please enter it. Refer to screenshot below, MAC address, 00:22:60:00:88:20, is entered:
If you don’t want to preset MAC address of your target board (using default random or hardware MAC address), just press enter directly. u-boot will skip presetting MAC address. After you press enter, make config will start to configure building environment. Please wait for a while. It takes 1~2 minutes to complete. After make config completes, you will see screen like:
Basic information, like default config files for xboot, uboot and kernel, dts file (sp7021-ev), cross-compiler are shown.
4. Build NOR image
Run make all command to start to create image of SPI NOR and Linux kernel. It may take several minutes to complete. When make all almost completes, it asks you to select iBoot, like:
Please select x. After make all completes, you will see screen like:
A binary file, spi_all.bin, for SPI NOR flash is built. Linux kernel image, uImage is built, renamed to uImage_xxxx and copied to TFTP service folder, /home/scftp. Linux device-tree blob, dtb, is built, renamed to dtb_xxxx and copied to TFTP service folder, /home/scftp. A926 image is built, renamed to a926_wellslu and copied to TFTP service folder, /home/scftp. xxxx is account of yours.
5. Burn your SPI NOR flash
Load binary file, spi_all.bin, to flash programmer application. It is placed at out/. Put your SPI NOR flash chip into socket of 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 screenshot below, a CFEON 64 Mibit (8 MiB) flash chip (EN25QH64) has been programmed and verified successfully.
Remove the SPI NOR flash chip from socket. Note that the size of 'spi_all.bin' is about 620 KiB. So, size of SPI NOR flash chip should be 1 MiB (or 8 Mibit) or greater.
6. In-system Program SPI-NOR flash
Besides, creating pure binary file, spi_all.bin, for SPI-NOR flash for flash programmer, make also creates another binary file, ISPBOOOT.BIN, for in-system program SPI-NOR flash. To in-system program SPI-NOR flash, you need to copy ISPBOOOT.BIN to an USB drive, set SP7021 board to boot from USB drive and then turn on power. U-Boot (which is self-contained in ISPBOOOT.BIN) will write image to SPI-NOR flash directly. Refer to step 7 of How to build SP7021 Linux image for booting from SPI-NOR flash for details.
7. Install SP7021 Ev Board
a) Plug your SPI NOR flash chip into SPI NOR socket (U12). Be careful about the pin 1 position of chip. It should be at the same corner of pin 1 of socket.
b) Connect your Ethernet cable to RJ-45 socket of Ethernet. You’ll see Link/Act LED is blinking while cable is connected.
c) Set DIP-SW to ON-OFF-ON-OFF for booting from NOR flash (Refer to Selection of boot devices of SP7021 for details).
Refer to picture below:
You are ready to turn SP7021 power on.
8. Turn power on to boot Linux from TFTP server
After you turn on power of SP7021 board, u-boot gets control of CPU. It sends dhcp command out to get IP address of itself from DHCP server. Once IP address is got, it downloads image of A926, image of Linux kernel and device-tree blob from TFTP server, and then boot the image. The image of Linux kernel and device-tree blob u-boot downloads are those you built and copied to TFTP service folder in step 2.
Refer to screenshot below, first, MAC address of Ethernet is preset to 00:22:60:00:88:20 and IP address of TFTP server is set to 172.18.12.62. Second, u-boot starts to send dhcp (BOOTP broadcast 1, BOOTP broadcast 2, …) command to get IP address. It gets IP address, 172.18.12.76, in 1765 milliseconds. It soon starts to download A926 image, a926_wellslu, from TFTP server. After complete downloading image, it starts to boot A926.
Refer to screenshot below, u-boot then starts to download device-tree blob, dtb_wellslu, and Linux image, uImage_wellslu, from TFTP server. After complete downloading images, it starts to Linux kernel.
9. Modify kernel, dtb or rootfs, and re-boot Linux from TFTP server
When you modify Linux kernel or rootfs, you need to re-build build image. make will copy new image of Linux kernel and device-tree blob to TFTP service folder automatically. No need re-burn SPI NOR flash because u-boot is fixed. Just press reset or re-turn on power of SP7021 board, u-boot (in SPI NOR flash) will download images from TFTP server and boot automatically.
Appendix A. Log of Booting from TFTP server (from U-Boot to Linux)
Refer to detailed log below:
U-Boot 2019.04-g0105cf0-dirty (Apr 22 2020 - 10:04:36 +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
SPI: Manufacturer id = 0x00, Device id = 0x0000
In: serial@sp_uart0
Out: serial@sp_uart0
Err: serial@sp_uart0
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: OTP address of mac address is not defined!
Warning: l2sw@0x9c108000 (eth0) using random MAC address - fe:b2:4a:9c:96:a6
eth0: l2sw@0x9c108000
Hit any key to stop autoboot: 0
[scr] bootcmd started
9e809408: 00000011 ....
[scr] tftp_boot
ethaddr=00:22:60:00:88:20
serverip=172.18.12.62
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
DHCP client bound to address 172.18.12.76 (1765 ms)
Using l2sw@0x9c108000 device
TFTP from server 172.18.12.62; our IP address is 172.18.12.76
Filename 'a926_wellslu'.
Load address: 0x10000
Loading: ####
806.6 KiB/s
done
Bytes transferred = 49560 (c198 hex)
## Booting A926 from image at 0x10000
Image Name: nonos_B
Image Type: ARM Linux Sunplus Quick Boot Image (uncompressed)
Data Size: 49496 Bytes = 48.3 KiB
Load Address: 00010040
Entry Point: 00010040
Verifying Checksum ... OK
[u-boot] nonos_B address 0x00010000 nonos_size= 49496
BOOTP broadcast 1
DHCP client bound to address 172.18.12.76 (7 ms)
Using l2sw@0x9c108000 device
TFTP from server 172.18.12.62; our IP address is 172.18.12.76
Filename 'dtb_wellslu'.
Load address: 0x2fffc0
Loading: ##
429.7 KiB/s
done
Bytes transferred = 19818 (4d6a hex)
BOOTP broadcast 1
DHCP client bound to address 172.18.12.76 (4 ms)
Using l2sw@0x9c108000 device
TFTP from server 172.18.12.62; our IP address is 172.18.12.76
Filename 'uImage_wellslu'.
Load address: 0x307fc0
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##
1.9 MiB/s
done
Bytes transferred = 8610656 (836360 hex)
## Booting kernel from Legacy Image at 00307fc0 ...
Image Name: Linux-4.19.37-g94a2999
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 8610520 Bytes = 8.2 MiB
Load Address: 00308000
Entry Point: 00308000
Verifying Checksum ... OK
******OTP Secure Boot is OFF ,return success******
## Flattened Device Tree blob at 002fffc0
Booting using the fdt blob at 0x2fffc0
XIP Kernel Image ... OK
Loading Device Tree to 1f906000, end 1f90dd69 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.37-g94a2999 (wellslu@scdiu3) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05)) #96 SMP PREEMPT Wed Apr 22 10:04:42 CST 2020
[ 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] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: Data cache writealloc
sp_map_io
[ 0.000000] B_REG 9c000000 -> [f8000000-fa000000]
[ 0.000000] A_REG 9ec00000 -> [fa000000-fa400000]
[ 0.000000] On node 0 totalpages: 130816
[ 0.000000] Normal zone: 1024 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 130816 pages, LIFO batch:31
[ 0.000000] random: get_random_bytes called from start_kernel+0x57/0x2f4 with crng_init=0
[ 0.000000] percpu: Embedded 16 pages/cpu s34636 r8192 d22708 u65536
[ 0.000000] pcpu-alloc: s34636 r8192 d22708 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129792
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/ram rw loglevel=8 user_debug=255 earlyprintk
[ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[ 0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[ 0.000000] log_buf_len min size: 16384 bytes
[ 0.000000] log_buf_len: 32768 bytes
[ 0.000000] early log buf free: 14700(89%)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 500932K/523264K available (4096K kernel code, 820K rwdata, 1736K rodata, 10240K init, 237K bss, 22332K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf800000 - 0xbfe00000 ( 6 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (5088 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (10240 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 821 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 238 kB)
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 205
[ 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] ### sp_pll_enable:603 (26)
[ 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.008142] Switching to timer-based delay loop, resolution 37ns
[ 0.014793] Console: colour dummy device 80x30
[ 0.019346] Calibrating delay loop (skipped), value calculated using timer frequency.. 54.00 BogoMIPS (lpj=270000)
[ 0.029889] pid_max: default: 32768 minimum: 301
[ 0.034828] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.041573] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.049533] CPU: Testing write buffer coherency: ok
[ 0.055183] CPU0: update cpu_capacity 1024
[ 0.059345] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.125320] Setting up static identity map for 0x400000 - 0x400054
[ 0.131747] rcu: Hierarchical SRCU implementation.
[ 0.176755] smp: Bringing up secondary CPUs ...
[ 0.237198] CPU1: update cpu_capacity 1024
[ 0.237209] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.317161] CPU2: update cpu_capacity 1024
[ 0.317169] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.397251] CPU3: update cpu_capacity 1024
[ 0.397258] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.397369] smp: Brought up 1 node, 4 CPUs
[ 0.431252] SMP: Total of 4 processors activated (216.00 BogoMIPS).
[ 0.437625] CPU: All CPU(s) started in SVC mode.
[ 0.443441] devtmpfs: initialized
[ 0.452158] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.460872] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.470935] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.477692] pinctrl core: initialized pinctrl subsystem
[ 0.483800] NET: Registered protocol family 16
[ 0.488938] DMA: preallocated 256 KiB pool for atomic coherent allocations
sp_init
av1_stc(0x c, 0x2ecf)
B: b_sysclk=202M abio_ctrl=(16bit, DDR)
A: core=931M a_sysclk=465M a_pllio=1998M abio_bus=399M
[ 0.508996] apply partial clken to save power
[ 0.513811] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.521968] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.527906] 1: ext0-mask=0xf
[ 0.530834] 2: ext1-mask=0xe
[ 0.543354] set hwirq=0 prio=0
[ 0.546580] set hwirq=1 prio=0
[ 0.549694] set hwirq=4 prio=0
[ 0.552804] set hwirq=5 prio=0
[ 0.560630] sppctl pctl: funcs:156 unq_grps:140
[ 0.565513] SP7021 PinCtl by SunPlus/Tibbo Tech.(C) 2019
[ 0.597654] SCSI subsystem initialized
[ 0.607439] usbcore: registered new interface driver usbfs
[ 0.613119] usbcore: registered new interface driver hub
[ 0.618791] usbcore: registered new device driver usb
[ 0.623919] usb acc config port= 0
[ 0.627604] videodev: Linux video capture interface: v2.00
[ 0.634048] sunplus,sp7021-ocotp 9c00af00.otp: by SunPlus (C) 2019
[ 0.641889] clocksource: Switched to clocksource arch_sys_counter
[ 0.660395] register sunplus_usb_phy0_driver
[ 0.665195] uphy0_irq:36
[ 0.674206] register sunplus_usb_phy1_driver
[ 0.678728] uphy1_irq:37
[ 0.687606] register sunplus_usb_otg0_driver
[ 0.692187] #@#OTG: @@@ otg reg 9c102400 112 irq 11 10000
[ 0.697879] #@#OTG: Init is B device
[ 0.701741] register sunplus_usb_otg1_driver
[ 0.706347] #@#OTG: @@@ otg reg 9c103400 112 irq 10 10000
[ 0.731884] #@#OTG: Init is B device
[ 0.736118] HDMITX installed
[ 0.739100] HDMI plug in
[ 0.742688] NET: Registered protocol family 2
[ 0.748051] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[ 0.755895] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.763134] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.769733] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.776384] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.782403] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.789041] NET: Registered protocol family 1
[ 0.812258] RPC: Registered named UNIX socket transport module.
[ 0.818272] RPC: Registered udp transport module.
[ 0.823110] RPC: Registered tcp transport module.
[ 0.827883] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.914216] hw perfevents: no interrupt-affinity property for /arm-pmu, guessing.
[ 0.922396] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[ 0.932823] Initialise system trusted keyrings
[ 0.937597] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.944777] exFAT: Version 1.2.9
[ 0.948431] NFS: Registering the id_resolver key type
[ 0.953947] Key type id_resolver registered
[ 0.958196] Key type id_legacy registered
[ 0.963292] Key type asymmetric registered
[ 0.967461] Asymmetric key parser 'x509' registered
[ 0.972560] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.980080] io scheduler noop registered
[ 0.984091] io scheduler deadline registered
[ 0.988503] io scheduler cfq registered (default)
[ 0.993300] io scheduler mq-deadline registered
[ 0.997897] io scheduler kyber registered
[ 1.004915] K_TTYS: sunplus_uart-ID = 10
[ 1.008903] K_TTYS: Setup DMA Rx 0
[ 1.012398] K_TTYS: Enable DMA clock(s)
[ 1.016309] K_TTYS: Enable clock PERI0
[ 1.020169] K_TTYS: addr_phy: 0x9c008980, membase: 0x(ptrval), irq: 138, which-uart: 1
[ 1.028344] K_TTYS: sunplus_uart-ID = 11
[ 1.032342] K_TTYS: Setup DMA Rx 1
[ 1.035789] K_TTYS: Enable DMA clock(s)
[ 1.039686] K_TTYS: Enable clock PERI1
[ 1.043550] K_TTYS: addr_phy: 0x9c0089c0, membase: 0x(ptrval), irq: 139, which-uart: 2
[ 1.051688] K_TTYS: sunplus_uart-ID = 20
[ 1.055683] K_TTYS: Setup DMA Tx 0
[ 1.059130] K_TTYS: Enable DMA clock(s)
[ 1.063055] K_TTYS: Enable clock PERI0
[ 1.066878] K_TTYS: gdma_phy: 0x9c008880 gdma_membase: 0x(ptrval)
[ 1.073086] K_TTYS: addr_phy: 0x9c008a00, membase: 0x(ptrval), irq: 0, which-uart: 1
[ 1.081051] K_TTYS: sunplus_uart-ID = 21
[ 1.085044] K_TTYS: Setup DMA Tx 1
[ 1.088491] K_TTYS: Enable DMA clock(s)
[ 1.092400] K_TTYS: Enable clock PERI1
[ 1.096222] K_TTYS: gdma_phy: 0x9c008900 gdma_membase: 0x(ptrval)
[ 1.102421] K_TTYS: addr_phy: 0x9c008a40, membase: 0x(ptrval), irq: 0, which-uart: 2
[ 1.110489] K_TTYS: sunplus_uart-ID = 0
[ 1.114429] K_TTYS: Enable UART clock(s)
[ 1.118418] K_TTYS: Enable Rstc(s)
[ 1.121902] K_TTYS: sp_uart0's Rx is in PIO mode.
[ 1.126675] K_TTYS: sp_uart0's Tx is in PIO mode.
[ 1.131462] 9c000900.serial: ttyS0 at MMIO 0x9c000900 (irq = 53, base_baud = 1687500) is a sp_uart0
[ 1.140731] console [ttyS0] enabled
[ 1.140731] console [ttyS0] enabled
[ 1.147756] bootconsole [earlycon0] disabled
[ 1.147756] bootconsole [earlycon0] disabled
[ 1.170244] loop: module loaded
[ 1.172212] libphy: Fixed MDIO Bus: probed
[ 1.172296] CAN device driver interface
[ 1.173097] [L2SW] HW Addr = 00:22:60:00:88:30
[ 1.175314] [L2SW] Registered net device "eth0" successfully.
[ 1.180435] libphy: sp7021_mii_bus: probed
[ 1.275173] net eth0: could not add device link to 9c108000.l2sw-mii:01 err -17
[ 1.276982] register ehci0_hcd_sunplus_driver
[ 1.277389] ehci_id:1,irq:14
[ 1.278559] ehci0-sunplus 9c102100.usb: Generic Platform EHCI Controller
[ 1.285337] ehci0-sunplus 9c102100.usb: new USB bus registered, assigned bus number 1
[ 1.293258] ehci0-sunplus 9c102100.usb: irq 14, io mem 0x9c102100
[ 1.321901] ehci0-sunplus 9c102100.usb: USB 2.0 started, EHCI 1.10
[ 1.323195] hub 1-0:1.0: USB hub found
[ 1.323313] hub 1-0:1.0: 1 port detected
[ 1.324993] hcd_irq:14,14
[ 1.327128] flag ***de7e1800 de7e1988 672 672 de7e1c24
[ 1.332645] register ehci1_hcd_sunplus_driver
[ 1.336833] ehci_id:2,irq:17
[ 1.339470] ehci1-sunplus 9c103100.usb: Generic Platform EHCI Controller
[ 1.346173] ehci1-sunplus 9c103100.usb: new USB bus registered, assigned bus number 2
[ 1.354131] ehci1-sunplus 9c103100.usb: irq 17, io mem 0x9c103100
[ 1.381878] ehci1-sunplus 9c103100.usb: USB 2.0 started, EHCI 1.10
[ 1.382943] hub 2-0:1.0: USB hub found
[ 1.383044] hub 2-0:1.0: 1 port detected
[ 1.384930] hcd_irq:17,17
[ 1.387106] flag ***de7ef800 de7ef988 672 672 de7efc24
[ 1.392570] register ohci0_hcd_sunplus_driver
[ 1.396771] ohci_id:1,irq:15
[ 1.399446] ohci0-sunplus 9c102080.usb: Generic Platform OHCI Controller
[ 1.406144] ohci0-sunplus 9c102080.usb: new USB bus registered, assigned bus number 3
[ 1.414089] ohci0-sunplus 9c102080.usb: irq 15, io mem 0x9c102080
[ 1.431994] hub_events,hub:de7df800
[ 1.484715] hub 3-0:1.0: USB hub found
[ 1.484818] hub 3-0:1.0: 1 port detected
[ 1.485339] flag *** 680 680 de6ecc2c
[ 1.485710] register ohci1_hcd_sunplus_driver
[ 1.489385] ohci_id:2,irq:18
[ 1.492173] hub_events,hub:dd839c00
[ 1.492183] ohci1-sunplus 9c103080.usb: Generic Platform OHCI Controller
[ 1.502212] ohci1-sunplus 9c103080.usb: new USB bus registered, assigned bus number 4
[ 1.510164] ohci1-sunplus 9c103080.usb: irq 18, io mem 0x9c103080
[ 1.584723] hub 4-0:1.0: USB hub found
[ 1.584818] hub 4-0:1.0: 1 port detected
[ 1.585321] flag *** 680 680 de6ec42c
[ 1.585850] usbcore: registered new interface driver usb-storage
[ 1.590943] udc_init
[ 1.593145] register sunplus_udc0_driver
[ 1.593160] hub_events,hub:dd839000
[ 1.612483] >>> sp_udc_start...
[ 1.612612] wei ep config
[ 1.612659] wei ep config
[ 1.612703] super speed source/sink: IN/ep1in-bulk, OUT/ep11out-bulk
[ 1.615983] wei ep config
[ 1.618578] wei ep config
[ 1.621186] Gadget Zero, version: Cinco de Mayo 2008
[ 1.626164] zero gadget: zero ready
[ 1.629992] func:sp_udc_enable line:4365
[ 1.633504] <<< sp_udc_start...
[ 1.636606] Force to Disconnect
[ 1.639726] <<< sp_udc_pullup...
[ 1.643255] mousedev: PS/2 mouse device common for all mice
[ 1.649232] sp7021-rtc 9c003a00.serial: rtc core: registered sp7021-rtc as rtc0
[ 1.655803] [RTC] Info: sp7021-rtc loaded
[ 1.660143] [DISP][_display_probe:2846] disp probe ...
[ 1.665019] [DISP]irq num:4
[ 1.667730] set hwirq=0 prio=0
[ 1.670820] set hwirq=1 prio=0
[ 1.673871] set hwirq=4 prio=0
[ 1.676867] set hwirq=5 prio=0
[ 1.680783] [DISP][_display_probe:3015] disp probe done
[ 1.685533] usbcore: registered new interface driver uvcvideo
[ 1.690859] USB Video Class driver (1.1.1)
[ 1.695118] hub_events,hub:dd832400
[ 1.695655] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.704070] usbcore: registered new interface driver usbhid
[ 1.709319] usbhid: USB HID core driver
[ 1.713787] NET: Registered protocol family 10
[ 1.719065] Segment Routing with IPv6
[ 1.721294] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.728238] NET: Registered protocol family 17
[ 1.731528] can: controller area network core (rev 20170425 abi 9)
[ 1.737795] NET: Registered protocol family 29
[ 1.742103] can: raw protocol (rev 20170425)
[ 1.746330] can: broadcast manager protocol (rev 20170425 t)
[ 1.751983] can: netlink gateway (rev 20170425) max_hops=1
[ 1.757594] NET: Registered protocol family 37
[ 1.761911] Key type dns_resolver registered
[ 1.766132] Key type ceph registered
[ 1.781906] libceph: loaded (mon/osd proto 15/24)
[ 1.782212] Registering SWP/SWPB emulation handler
[ 1.783178] Loading compiled-in X.509 certificates
[ 1.801791] sp7021-fb soc@B:fb_device: [_sp7021_fb_create_device:289] mem VA 0xe0877000(PA 0x1dc00000), Palette VA 0x0(PA 0x40000000), UI Res 720x480, size 2768896 + 0
[ 1.805903] sp7021-rtc 9c003a00.serial: setting system clock to 1970-01-01 00:07:46 UTC (466)
[ 1.832437] Freeing unused kernel memory: 10240K
[ 1.832678] Run /init as init process
/etc/init.d/rcS starts...
Mounting other filesystems ...
[ 1.874161] random: fast init done
rc.extra [bg]
End of /etc/init.d/rcS
0x00003C5F
0x0000000E
extra done
login[580]: root login on 'console'
~ # [ 11.823560] random: crng init done