使用晕哥制作的spi flash固件“v3s-wifi-ok-w25q256.bin”
uboot是我自己编译的,每一步都是按照一下连接来做的http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/SPI_flash_build.html
但是就是无法启动,启动到“Starting kernel ...”就会重启,替换为晕哥原来的uboot又可以重新启动了,
1、读回uboot对比我写入的也是一样的,烧写工具是使用的晕哥的sun-fel.exe的win板,烧写工具也没问题
2、是直接使用晕哥制作的spi flash固件“v3s-wifi-ok-w25q256.bin”可以正常启动,进入命令行
3、烧写晕哥的固件之后,重写烧写我自己编译的uboot就无法启动了
sunxi-fel.exe -p spiflash-write 0 u-boot-sunxi-with-spl.bin
启动信息如下*******************************
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Jan 28 2019 - 15:02:18)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jan 28 2019 - 15:02:18 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Setting up a 480x272 lcd console (overscan 0x0)
dotclock: 10000kHz = 10000kHz: (1 * 3MHz * 20) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jan 28 2019 - 15:02:18 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Setting up a 480x272 lcd console (overscan 0x0)
dotclock: 10000kHz = 10000kHz: (1 * 3MHz * 20) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffd0c ... OK
Starting kernel ...
离线
你看下烧我的, 控制台输出的 log,
关于 zImage的开始地址, 长度信息device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK然后与你的比较, 看差异在哪里?
我估计长度应该是超过了 4M(0x400000)
不太理解你的意思,以下是你的固件的启动信息,我看uboot阶段的log关键信息都是一样的。
U-Boot SPL 2017.01-rc2-00075-gec3f3ba-dirty (Dec 28 2017 - 15:38:11)
DRAM: 64 MiB
Trying to boot from sunxi SPI---------------------- 1111111111111111111111
//////////// spi0_set_speed: speed=100000000, reg=4096
U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 28 2017 - 15:38:11 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2-00075-gec3f3ba-dirty (Dec 28 2017 - 15:38:11 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l25635f with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x800000
SF: 8388608 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffd0c ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.0-licheepi-zero+ (hexing@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #86 SMP Thu Dec 28 17:56:11 CST 2017
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 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: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33920 r8192 d23424 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,6M(kernel)ro,-(rootfs) root=/dev/ram0 rdinit=/sbin/init vt.global_cursor_default=0
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 49508K/64036K available (6144K kernel code, 211K rwdata, 1344K rodata, 5120K init, 251K bss, 14528K 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 : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0e00000 (5120 kB)
[ 0.000000] .data : 0xc0e00000 - 0xc0e34ea0 ( 212 kB)
[ 0.000000] .bss : 0xc0e3b6b8 - 0xc0e7a48c ( 252 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000181] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000409] Console: colour dummy device 80x30
[ 0.000445] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000461] pid_max: default: 32768 minimum: 301
[ 0.000583] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000597] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001209] CPU: Testing write buffer coherency: ok
[ 0.001585] /cpus/cpu@0 missing clock-frequency property
[ 0.001608] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002040] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002214] Hierarchical SRCU implementation.
[ 0.002695] smp: Bringing up secondary CPUs ...
[ 0.002710] smp: Brought up 1 node, 1 CPU
[ 0.002720] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002728] CPU: All CPU(s) started in SVC mode.
[ 0.003483] devtmpfs: initialized
[ 0.006507] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006778] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006808] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006976] pinctrl core: initialized pinctrl subsystem
[ 0.007816] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[ 0.007953] NET: Registered protocol family 16
[ 0.008412] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009503] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009519] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.021564] SCSI subsystem initialized
[ 0.021837] usbcore: registered new interface driver usbfs
[ 0.021903] usbcore: registered new interface driver hub
[ 0.022004] usbcore: registered new device driver usb
[ 0.022257] pps_core: LinuxPPS API ver. 1 registered
[ 0.022268] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.022294] PTP clock support registered
[ 0.022504] Advanced Linux Sound Architecture Driver Initialized.
[ 0.024318] clocksource: Switched to clocksource arch_sys_counter
[ 0.035094] NET: Registered protocol family 2
[ 0.035680] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.035711] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.035735] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.035854] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.035902] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036125] NET: Registered protocol family 1
[ 0.366710] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.374720] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.376249] random: fast init done
[ 0.379053] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.379074] io scheduler noop registered
[ 0.379081] io scheduler deadline registered
[ 0.379350] io scheduler cfq registered (default)
[ 0.379363] io scheduler mq-deadline registered
[ 0.379371] io scheduler kyber registered
[ 0.383703] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.450400] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.453860] console [ttyS0] disabled
[ 0.474137] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 1.031134] console [ttyS0] enabled
[ 1.037423] libphy: Fixed MDIO Bus: probed
[ 1.041965] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 1.047867] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.053576] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 1.059611] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 1.069181] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.074862] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.082075] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.087741] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.094965] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.099924] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.106908] libphy: stmmac: probed
[ 1.116168] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.122707] ehci-platform: EHCI generic platform driver
[ 1.128353] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.133971] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.141970] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 1.174336] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.181532] hub 1-0:1.0: USB hub found
[ 1.185486] hub 1-0:1.0: 1 port detected
[ 1.189965] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.196263] ohci-platform: OHCI generic platform driver
[ 1.201802] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.208523] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.216468] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.289414] hub 2-0:1.0: USB hub found
[ 1.293237] hub 2-0:1.0: 1 port detected
[ 1.300798] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.310376] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.319373] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.326279] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.330821] i2c /dev entries driver
[ 1.335735] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.345203] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.414360] sunxi-mmc 1c0f000.mmc: base:0xc4079000 irq:23
[ 1.474345] sunxi-mmc 1c10000.mmc: base:0xc407d000 irq:24
[ 1.480869] usbcore: registered new interface driver usbhid
[ 1.486529] usbhid: USB HID core driver
[ 1.491995] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.500048] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.507556] NET: Registered protocol family 17
[ 1.512156] Registering SWP/SWPB emulation handler
[ 1.524728] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4400000
[ 1.535366] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 1.551550] Console: switching to colour frame buffer device 100x30
[ 1.564016] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 1.572499] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.583853] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.589690] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.598738] hub 3-0:1.0: USB hub found
[ 1.602602] hub 3-0:1.0: 1 port detected
[ 1.607793] using random self ethernet address
[ 1.612283] using random host ethernet address
[ 1.617914] usb0: HOST MAC 6e:25:13:89:a1:5d
[ 1.622237] usb0: MAC 1e:a7:be:b1:3a:7e
[ 1.626227] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.633706] g_cdc gadget: g_cdc ready
[ 1.639954] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.649424] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 01:09:02 UTC (4142)
[ 1.657911] vcc3v3: disabling
[ 1.660884] vcc5v0: disabling
[ 1.663848] ALSA device list:
[ 1.666866] #0: V3s Audio Codec
[ 1.676465] Freeing unused kernel memory: 5120K
mount: mounting tmpfs on /dev/shm failed: Invalid argument
mount: mounting tmpfs on /tmp failed: Invalid argument
mount: mounting tmpfs on /run failed: Invalid argument
Starting logging: OK
Starting network: [ 1.789894] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
OK
[ 2.240874] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 2.257669] RTL8723BS: module init start
[ 2.261608] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 2.268746] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 2.275370] RTL8723BS: module init ret =0
ifconfig: SIOCGIFFLAGS: No such device
wpa_supplicant v2.6
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0'
ap_scan=1
Priority group 5
id=0 ssid='debugdump'
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=0 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
Could not read interface wlan0 flags: No such device
nl80211: Set mode ifindex 0 iftype 2 (STATION)
nl80211: Failed to set interface 0 to mode 2: -19 (No such device)
wlan0: Failed to initialize driver interface
Failed to add interface wlan0
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
udhcpc: SIOCGIFINDEX: No such device
Welcome to Buildroot
buildroot login:
那么现在我描述一下我的操作步骤和启动结果。
1、直接烧录你的整个固件,可以启动
sunxi-fel.exe -p spiflash-write 0 v3s-wifi-ok-w25q256.bin
1、在刚才的结果上烧录我自己的uboot固件,循环重启
sunxi-fel.exe -p spiflash-write 0 u-boot-sunxi-with-spl.bin
1、在刚才的基础上,直接烧录你的uboot,可以启动
sunxi-fel.exe -p spiflash-write 0 u-boot-sunxi-with-spl.bin
离线
bootcmd 里面的尺寸错了,应该是 8M 0x800000
感谢指导,找到原因了,看来我的烧写和编译都没问题,就是你说的我使用你是的那个内核的话,需要修改一下参数
离线