1 Scope of Document
This document describes how to burn firmware to spi nand flash
2 Requiremen
2.1 Function Requirement
2.2 Performance Requirement
3 Method
DIP to Burn Mode, connect success, then debug console have some output info.
3.1 Burn u-boot-spl.bin
3.2 Burn u-boot.bin
3.3 Burn kernel
3.4 Burn rootfs
Erase rootfs data:
Burn rootfs to spi nand flash:
4 Spi nand boot output info
16:19:13:516---
16:19:13:518---NUC980 IBR 20180813
16:19:13:519---Boot from SPI-NAND
16:19:13:520---DDR-OK
16:19:13:549---finish SPI dow頲{
16:19:13:550--- #S
16:19:13:551--- SPL load main U-Boot from SPI NAND Flash! (Jan 6 2020 15:21:06)
16:19:15:064---
16:19:15:064---
16:19:15:065---U-Boot 2016.11-g651d514 (Jan 06 2020 - 15:20:23 +0800)
16:19:15:065---
16:19:15:066---CPU: NUC980
16:19:15:066---Board: NUC980
16:19:15:066---DRAM: 64 MiB
16:19:15:340---NAND: NAND Flash not found !
16:19:15:340---NUC980 NAND CONTROLLER IS NOT SUPPORT THE PAGE SIZE. (0, 0)
16:19:15:340---0 MiB
16:19:15:351---SF: Detected W25N01GV with page size 2 KiB, erase size 4 KiB, total 128 MiB
16:19:15:488---*** Warning - bad CRC, using default environment
16:19:15:489---
16:19:15:509---In: serial
16:19:15:509---Out: serial
16:19:15:509---Err: serial
16:19:15:531---Net: Net Initialization Skipped
16:19:15:531---No ethernet found.
16:19:18:550---Hit any key to stop autoboot: 0
16:19:18:550---SF: Detected W25N01GV with page size 2 KiB, erase size 4 KiB, total 128 MiB
16:19:18:551---device 0 offset 0x200000, size 0x800000
16:19:19:895---SF: 8388608 bytes @ 0x200000 Read: OK
16:19:19:895---## Booting kernel from Legacy Image at 00007fc0 ...
16:19:19:896--- Image Name: Linux-4.4.179+
16:19:19:906--- Image Type: ARM Linux Kernel Image (uncompressed)
16:19:19:907--- Data Size: 2188672 Bytes = 2.1 MiB
16:19:19:907--- Load Address: 00008000
16:19:19:918--- Entry Point: 00008000
16:19:21:149--- Verifying Checksum ... OK
16:19:21:150--- XIP Kernel Image ... OK
16:19:21:150---
16:19:21:150---Starting kernel ...
16:19:21:150---
16:19:21:157---SF: Detected W25N01GV with page size 2 KiB, erase size 4 KiB, total 128 MiB
16:19:21:787---SF: Deviceooting Linux on physical CPU 0x0
16:19:21:798---Linux version 4.4.179+ (root@vmuer-VirtualBox) (gcc version 4.8.4 (GCC) ) #4 PREEMPT Mon Jan 13 16:25:03 CST 2020
16:19:21:799---CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
16:19:21:809---CPU: VIVT data cache, VIVT instruction cache
16:19:21:809---Machine: NUC980
16:19:21:809---Memory policy: Data cache writeback
16:19:21:821---Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
16:19:21:831---Kernel command line: noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 rootflags=inband-tags rw console=ttyS0,115200n8 init=/sbin/init mem=64M rootwait=1 mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)
16:19:21:843---PID hash table entries: 256 (order: -2, 1024 bytes)
16:19:21:843---Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
16:19:21:854---Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
16:19:21:863---Memory: 60192K/65536K available (3186K kernel code, 207K rwdata, 940K rodata, 144K init, 205K bss, 5344K reserved, 0K cma-reserved)
16:19:21:863---Virtual kernel memory layout:
16:19:21:863--- vector : 0xffff0000 - 0xffff1000 ( 4 kB)
16:19:21:874--- fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
16:19:21:874--- vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
16:19:21:886--- lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
16:19:21:886--- modules : 0xbf000000 - 0xc0000000 ( 16 MB)
16:19:21:886--- .text : 0xc0008000 - 0xc040ff1c (4128 kB)
16:19:21:898--- .init : 0xc0410000 - 0xc0434000 ( 144 kB)
16:19:21:898--- .data : 0xc0434000 - 0xc0467fa0 ( 208 kB)
16:19:21:907--- .bss : 0xc0467fa0 - 0xc049b6ac ( 206 kB)
16:19:21:907---SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
16:19:21:908---Preemptible hierarchical RCU implementation.
16:19:21:919--- Build-time adjustment of leaf fanout to 32.
16:19:21:919---NR_IRQS:545
16:19:21:930---clocksource: nuc980-timer5: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 62215505635 ns
16:19:21:930---sched_clock: 24 bits at 120kHz, resolution 8333ns, wraps every 69905062489ns
16:19:21:930---Console: colour dummy device 80x30
16:19:21:941---console [ttyS0] enabled
16:19:22:007---Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
16:19:22:007---pid_max: default: 32768 minimum: 301
16:19:22:022---Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
16:19:22:022---Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
16:19:22:023---CPU: Testing write buffer coherency: ok
16:19:22:031---Setting up static identity map for 0x8400 - 0x843c
16:19:22:039---devtmpfs: initialized
16:19:22:063---clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
16:19:22:081---futex hash table entries: 256 (order: -1, 3072 bytes)
16:19:22:082---pinctrl core: initialized pinctrl subsystem
16:19:22:082---NET: Registered protocol family 16
16:19:22:089---DMA: preallocated 256 KiB pool for atomic coherent allocations
16:19:22:223---SCSI subsystem initialized
16:19:22:236---usbcore: registered new interface driver usbfs
16:19:22:237---usbcore: registered new interface driver hub
16:19:22:242---usbcore: registered new device driver usb
16:19:22:257---clocksource: Switched to clocksource nuc980-timer5
16:19:22:351---NET: Registered protocol family 2
16:19:22:360---TCP established hash table entries: 1024 (order: 0, 4096 bytes)
16:19:22:361---TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
16:19:22:373---TCP: Hash tables configured (established 1024 bind 1024)
16:19:22:373---UDP hash table entries: 256 (order: 0, 4096 bytes)
16:19:22:386---UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
16:19:22:386---NET: Registered protocol family 1
16:19:22:393---NetWinder Floating Point Emulator V0.97 (double precision)
16:19:22:477---romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
16:19:22:491---Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
16:19:22:492---io scheduler noop registered (default)
16:19:22:505---nuc980_gpio_probe - pdev = nuc980-gpio
16:19:22:505---nuc980_dma_probe - pdev = nuc980-dma
16:19:22:538---nuc980-dma nuc980-dma: NUC980 DMA ready
16:19:22:538---nuc980-uart.0: ttyS0 at I/O 0x0 (irq = 36, base_baud = 750000) is a NUC980
16:19:22:551---nuc980-uart.2: ttyS2 at I/O 0x0 (irq = 38, base_baud = 9375000) is a NUC980
16:19:22:569---nuc980-uart.4: ttyS4 at I/O 0x0 (irq = 39, base_baud = 9375000) is a NUC980
16:19:22:569---nuc980-uart.5: ttyS5 at I/O 0x0 (irq = 44, base_baud = 9375000) is a NUC980
16:19:22:586---nuc980-uart.6: ttyS6 at I/O 0x0 (irq = 40, base_baud = 9375000) is a NUC980
16:19:22:587---nuc980-uart.7: ttyS7 at I/O 0x0 (irq = 45, base_baud = 9375000) is a NUC980
16:19:22:598---nuc980-uart.8: ttyS8 at I/O 0x0 (irq = 41, base_baud = 9375000) is a NUC980
16:19:22:680---brd: module loaded
16:19:22:697---CAN device driver interface
16:19:22:711---nuc980-can2 nuc980-can2: nuc980_can2_platform device registered (regs=f00a2000, irq=62)
16:19:22:724---nuc980-can3 nuc980-can3: nuc980_can3_platform device registered (regs=f00a3000, irq=42)
16:19:22:737---libphy: nuc980_rmii0: probed
16:19:22:827---libphy: nuc980_rmii1: probed
16:19:22:914---GobiNet: Quectel_WCDMA<E_Linux&Android_GobiNet_Driver_V1.3.5
16:19:22:914---usbcore: registered new interface driver GobiNet
16:19:22:928---usbcore: registered new interface driver asix
16:19:22:928---usbcore: registered new interface driver ax88179_178a
16:19:22:942---usbcore: registered new interface driver cdc_ether
16:19:22:942---usbcore: registered new interface driver net1080
16:19:22:942---usbcore: registered new interface driver cdc_subset
16:19:22:953---usbcore: registered new interface driver zaurus
16:19:22:953---usbcore: registered new interface driver cdc_ncm
16:19:22:967---ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
16:19:22:967---nuc980-ehci nuc980-ehci: Nuvoton NUC980 EHCI Host Controller
16:19:22:980---nuc980-ehci nuc980-ehci: new USB bus registered, assigned bus number 1
16:19:22:980---nuc980-ehci nuc980-ehci: irq 23, io mem 0xb0015000
16:19:22:995---nuc980-ehci nuc980-ehci: USB 2.0 started, EHCI 0.95
16:19:23:009---hub 1-0:1.0: USB hub found
16:19:23:009---hub 1-0:1.0: 2 ports detected
16:19:23:009---ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
16:19:23:022---usb_hcd_nuc980_probe, id = 0, name: nuc980-ohci.0, 0
16:19:23:022---nuc980-ohci nuc980-ohci.0: Nuvoton NUC980 OHCI Host Controller
16:19:23:037---nuc980-ohci nuc980-ohci.0: new USB bus registered, assigned bus number 2
16:19:23:037---nuc980-ohci nuc980-ohci.0: irq 24, io mem 0xb0017000
16:19:23:103---hub 2-0:1.0: USB hub found
16:19:23:104---hub 2-0:1.0: 8 ports detected
16:19:23:112---usb_hcd_nuc980_probe, id = 1, name: nuc980-ohci.1, 0
16:19:23:113---usb_hcd_nuc980_probe, id = 2, name: nuc980-ohci.2, 0
16:19:23:126---usb_hcd_nuc980_probe, id = 3, name: nuc980-ohci.3, 0
16:19:23:126---usb_hcd_nuc980_probe, id = 4, name: nuc980-ohci.4, 0
16:19:23:143---usb_hcd_nuc980_probe, id = 5, name: nuc980-ohci.5, 0
16:19:23:144---usb_hcd_nuc980_probe, id = 6, name: nuc980-ohci.6, 0
16:19:23:144---usbcore: registered new interface driver usb-storage
16:19:23:156---usbcore: registered new interface driver usbserial
16:19:23:156---usbcore: registered new interface driver ipw
16:19:23:169---usbserial: USB Serial support registered for IPWireless converter
16:19:23:169---usbcore: registered new interface driver option
16:19:23:175---usbserial: USB Serial support registered for GSM modem (1-port)
16:19:23:183---nuc980-rtc nuc980-rtc: rtc core: registered nuc980-rtc as rtc0
16:19:23:232---ledtrig-cpu: registered to indicate activity on CPUs
16:19:23:252---usbcore: registered new interface driver usbhid
16:19:23:252---usbhid: USB HID core driver
16:19:23:268---nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
16:19:23:269---nand: Winbond W25N01GV 1G 3.3V
16:19:23:280---nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
16:19:23:291---nand: WARNING: spi0.0: the ECC used on your system is too weak compared to the one required by the NAND chip
16:19:23:292---Scanning device for bad blocks
16:19:23:567---3 cmdlinepart partitions found on MTD device nand0
16:19:23:568---Creating 3 MTD partitions on "nand0":
16:19:23:575---0x000000000000-0x000000200000 : "u-boot"
16:19:23:586---0x000000200000-0x000001600000 : "kernel"
16:19:23:594---0x000001600000-0x000008000000 : "user"
16:19:23:610---NET: Registered protocol family 17
16:19:23:611---can: controller area network core (rev 20120528 abi 9)
16:19:23:611---NET: Registered protocol family 29
16:19:23:622---can: raw protocol (rev 20120528)
16:19:23:623---can: broadcast manager protocol (rev 20120528 t)
16:19:23:629---can: netlink gateway (rev 20130117) max_hops=1
16:19:23:645---nuc980-rtc nuc980-rtc: setting system clock to 2020-01-15 08:19:19 UTC (1579076359)
16:19:23:679---yaffs: dev is 32505858 name is "mtdblock2" rw
16:19:23:679---yaffs: passed flags "inband-tags"
16:20:03:206---VFS: Mounted root (yaffs2 filesystem) on device 31:2.
16:20:03:206---Freeing unused kernel memory: 144K
16:20:05:884---mount: mounting /dev/mtdblock0 on /mnt/mtdblock0 failed: No such device
16:20:05:902---yaffs: dev is 32505856 name is "mtdblock0" rw
16:20:05:902---yaffs: passed flags "inband-tags"
16:20:06:883---[Mount YAFFS2]: /dev/mtdblock0 --> /mnt/mtdblock0
16:20:07:061---mount: mounting /dev/mtdblock1 on /mnt/mtdblock1 failed: No such device
16:20:07:078---yaffs: dev is 32505857 name is "mtdblock1" rw
16:20:07:079---yaffs: passed flags "inband-tags"
16:20:09:832---[Mount YAFFS2]: /dev/mtdblock1 --> /mnt/mtdblock1
16:20:10:009---mount: mounting /dev/mtdblock2 on /mnt/mtdblock2 failed: No such device
16:20:10:026---[Mount YAFFS2]: /dev/mtdblock2 --> /mnt/mtdblock2
16:20:10:068---nuc980-emac0 nuc980-emac0: eth0 is OPENED
16:20:10:088---nuc980-emac1 nuc980-emac1: eth1 is OPENED
16:20:10:603---~ # open tty1 fail