WhyCan Forum

人过留名,雁过留声,感谢各位朋友不离不弃地支持。 QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#1 2019-09-18 16:07:34

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

小白一枚,参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux,求助!
log如下:

[14-29-23.735]U-Boot SPL 2018.01-05679-g013ca45 (Sep 18 2019 - 14:25:01)
[14-29-23.749]DRAM: 32 MiB
[14-29-23.750]Trying to boot from MMC1
[14-29-23.774]Card did not respond to voltage select!
[14-29-23.775]mmc_init: -95, time 22
[14-29-23.776]spl: mmc init failed with error: -95
[14-29-23.782]Trying to boot from sunxi SPI
[14-29-24.300]
[14-29-24.300]
[14-29-24.300]U-Boot 2018.01-05679-g013ca45 (Sep 18 2019 - 14:25:01 +0800) Allwinner Technology
[14-29-24.300]
[14-29-24.301]CPU:   Allwinner F Series (SUNIV)
[14-29-24.308]Model: Lichee Pi Nano
[14-29-24.309]DRAM:  32 MiB
[14-29-24.843]MMC:   SUNXI SD/MMC: 0
[14-29-24.844]SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
[14-29-27.590]*** Warning - bad CRC, using default environment
[14-29-27.590]
[14-29-27.591]Setting up a 800x480 lcd console (overscan 0x0)
[14-29-27.692]In:    serial@1c25000
[14-29-27.692]Out:   serial@1c25000
[14-29-27.692]Err:   serial@1c25000
[14-29-27.693]Net:   No ethernet found.
[14-29-27.694]starting USB...
[14-29-27.702]No controllers found
[14-29-29.703]Hit any key to stop autoboot:  0 
[14-29-29.731]Card did not respond to voltage select!
[14-29-29.731]mmc_init: -95, time 23
[14-29-29.731]starting USB...
[14-29-29.732]No controllers found
[14-29-29.742]USB is stopped. Please issue 'usb start' first.
[14-29-29.742]starting USB...
[14-29-29.742]No controllers found
[14-29-29.742]No ethernet found.
[14-29-29.743]missing environment variable: pxeuuid
[14-29-29.753]missing environment variable: bootfile
[14-29-29.753]Retrieving file: pxelinux.cfg/00000000
[14-29-29.753]No ethernet found.
[14-29-29.765]missing environment variable: bootfile
[14-29-29.765]Retrieving file: pxelinux.cfg/0000000
[14-29-29.765]No ethernet found.
[14-29-29.766]missing environment variable: bootfile
[14-29-29.775]Retrieving file: pxelinux.cfg/000000
[14-29-29.775]No ethernet found.
[14-29-29.775]missing environment variable: bootfile
[14-29-29.775]Retrieving file: pxelinux.cfg/00000
[14-29-29.786]No ethernet found.
[14-29-29.786]missing environment variable: bootfile
[14-29-29.786]Retrieving file: pxelinux.cfg/0000
[14-29-29.787]No ethernet found.
[14-29-29.799]missing environment variable: bootfile
[14-29-29.799]Retrieving file: pxelinux.cfg/000
[14-29-29.799]No ethernet found.
[14-29-29.800]missing environment variable: bootfile
[14-29-29.807]Retrieving file: pxelinux.cfg/00
[14-29-29.808]No ethernet found.
[14-29-29.808]missing environment variable: bootfile
[14-29-29.808]Retrieving file: pxelinux.cfg/0
[14-29-29.809]No ethernet found.
[14-29-29.818]missing environment variable: bootfile
[14-29-29.818]Retrieving file: pxelinux.cfg/default-arm-sunxi
[14-29-29.819]No ethernet found.
[14-29-29.832]missing environment variable: bootfile
[14-29-29.832]Retrieving file: pxelinux.cfg/default-arm
[14-29-29.833]No ethernet found.
[14-29-29.833]missing environment variable: bootfile
[14-29-29.841]Retrieving file: pxelinux.cfg/default
[14-29-29.842]No ethernet found.
[14-29-29.842]Config file not found
[14-29-29.842]starting USB...
[14-29-29.842]No controllers found
[14-29-29.849]No ethernet found.
[14-29-29.849]No ethernet found.
[14-29-30.712]=> 
[14-29-31.152]=> 
[14-29-31.541]=> 
[14-29-33.411]=> 
[14-39-31.957]=> 
[14-43-33.817]=> 

离线

#2 2019-09-18 16:10:47

firstman
会员
注册时间: 2019-04-06
累计积分: 174

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

https://whycan.cn/t_2179.html

仔细看: U-Boot的编译和填坑

离线

#3 2019-09-18 16:12:28

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 7,826

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

firstman 说:

https://whycan.cn/t_2179.html

仔细看: U-Boot的编译和填坑

对, 这个教程不错.

也可以烧这个固件体验一下: https://whycan.cn/t_2689.html

离线

#4 2019-09-18 16:43:05

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

晕哥 说:
firstman 说:

https://whycan.cn/t_2179.html

仔细看: U-Boot的编译和填坑

对, 这个教程不错.

也可以烧这个固件体验一下: https://whycan.cn/t_2689.html

烧过这个固件,可以开进去的。

离线

#5 2019-09-18 16:44:50

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

firstman 说:

https://whycan.cn/t_2179.html

仔细看: U-Boot的编译和填坑

看过还是不行,我是纯小白没差了:(

离线

#6 2019-09-19 09:53:05

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

参考https://whycan.cn/t_2689.html这个固件烧写,是可以启动的到kernel的:
sunxi-fel -p spiflash-write 0x000000 u-boot-sunxi-with-spl.bin
sunxi-fel -p spiflash-write 0x060000 whycan.bmp.gz
sunxi-fel -p spiflash-write 0x110000 zImage
sunxi-fel -p spiflash-write 0x100000 suniv-f1c100s-licheepi-nano-800480.dtb
sunxi-fel -p spiflash-write 0x510000 jffs2.bin

接着把自己编译的uboot烧写进去
uboot启动了,在uboot中执行如下命令,进入了kernel,最后在报错:VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
是文件系统分区找不到?

sf probe 0 60000000; sf read 0x80c00000 0x100000 0x10000; sf read 0x80008000 0x110000 0x400000; bootz 0x80008000 - 0x80c00000

[09-47-08.523]=> sf probe 0 60000000; sf read 0x80c00000 0x100000 0x10000; sf read 0x80008000 0x110000 0x400000; bootz 0x80008000 - 0x80c00000
[09-47-08.524]SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
[09-47-08.524]device 0 offset 0x100000, size 0x10000
[09-47-08.548]SF: 65536 bytes @ 0x100000 Read: OK
[09-47-08.549]device 0 offset 0x110000, size 0x400000
[09-47-09.660]SF: 4194304 bytes @ 0x110000 Read: OK
[09-47-09.660]## Flattened Device Tree blob at 80c00000
[09-47-09.661]   Booting using the fdt blob at 0x80c00000
[09-47-09.669]   Loading Device Tree to 816fb000, end 816fff2a ... OK
[09-47-09.677]
[09-47-09.678]Starting kernel ...
[09-47-09.678]
[09-47-10.859][    0.000000] Booting Linux on physical CPU 0x0
[09-47-10.870][    0.000000] Linux version 4.15.0-licheepi-nano+ (root@ubuntu) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #41 Sun Jul 21 21:25:38 EDT 2019
[09-47-10.890][    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[09-47-10.896][    0.000000] CPU: VIVT data cache, VIVT instruction cache
[09-47-10.897][    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[09-47-10.905][    0.000000] Memory policy: Data cache writeback
[09-47-10.910][    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[09-47-10.916][    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs
[09-47-10.928][    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[09-47-10.929][    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[09-47-10.936][    0.000000] Memory: 22676K/32768K available (6144K kernel code, 235K rwdata, 1404K rodata, 1024K init, 245K bss, 10092K reserved, 0K cma-reserved, 0K highmem)
[09-47-10.950][    0.000000] Virtual kernel memory layout:
[09-47-10.951][    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[09-47-10.961][    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[09-47-10.962][    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[09-47-10.971][    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[09-47-10.972][    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[09-47-10.983][    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[09-47-10.984][    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[09-47-11.002][    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[09-47-11.003][    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 236 kB)
[09-47-11.009][    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 246 kB)
[09-47-11.009][    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[09-47-11.017][    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[09-47-11.026][    0.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[09-47-11.038][    0.000109] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[09-47-11.038][    0.000629] Console: colour dummy device 80x30
[09-47-11.039][    0.001527] console [tty0] enabled
[09-47-11.050][    0.001627] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[09-47-11.054][    0.070279] pid_max: default: 32768 minimum: 301
[09-47-11.061][    0.070613] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[09-47-11.062][    0.070698] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[09-47-11.072][    0.072162] CPU: Testing write buffer coherency: ok
[09-47-11.072][    0.073868] Setting up static identity map for 0x80100000 - 0x80100058
[09-47-11.081][    0.076428] devtmpfs: initialized
[09-47-11.094][    0.082786] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[09-47-11.094][    0.082952] futex hash table entries: 256 (order: -1, 3072 bytes)
[09-47-11.111][    0.083255] pinctrl core: initialized pinctrl subsystem
[09-47-11.112][    0.085130] random: get_random_u32 called from bucket_table_alloc+0x80/0x1a4 with crng_init=0
[09-47-11.121][    0.085457] NET: Registered protocol family 16
[09-47-11.122][    0.086790] DMA: preallocated 256 KiB pool for atomic coherent allocations
[09-47-11.129][    0.088628] cpuidle: using governor menu
[09-47-11.130][    0.113062] SCSI subsystem initialized
[09-47-11.138][    0.113464] usbcore: registered new interface driver usbfs
[09-47-11.138][    0.113700] usbcore: registered new interface driver hub
[09-47-11.149][    0.113948] usbcore: registered new device driver usb
[09-47-11.150][    0.114423] pps_core: LinuxPPS API ver. 1 registered
[09-47-11.161][    0.114501] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[09-47-11.162][    0.114626] PTP clock support registered
[09-47-11.171][    0.115128] Advanced Linux Sound Architecture Driver Initialized.
[09-47-11.171][    0.116047] random: fast init done
[09-47-11.171][    0.116709] clocksource: Switched to clocksource timer
[09-47-11.183][    0.142694] NET: Registered protocol family 2
[09-47-11.183][    0.144157] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[09-47-11.193][    0.144308] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[09-47-11.207][    0.144393] TCP: Hash tables configured (established 1024 bind 1024)
[09-47-11.216][    0.144704] UDP hash table entries: 256 (order: 0, 4096 bytes)
[09-47-11.222][    0.144810] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[09-47-11.222][    0.145324] NET: Registered protocol family 1
[09-47-11.227][    0.146576] RPC: Registered named UNIX socket transport module.
[09-47-11.227][    0.146811] RPC: Registered udp transport module.
[09-47-11.228][    0.146877] RPC: Registered tcp transport module.
[09-47-11.240][    0.146922] RPC: Registered tcp NFSv4.1 backchannel transport module.
[09-47-11.251][    0.149045] NetWinder Floating Point Emulator V0.97 (double precision)
[09-47-11.252][    0.150940] Initialise system trusted keyrings
[09-47-11.264][    0.151588] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[09-47-11.264][    0.168960] NFS: Registering the id_resolver key type
[09-47-11.265][    0.169111] Key type id_resolver registered
[09-47-11.274][    0.169166] Key type id_legacy registered
[09-47-11.275][    0.169317] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[09-47-11.282][    0.183352] Key type asymmetric registered
[09-47-11.282][    0.183456] Asymmetric key parser 'x509' registered
[09-47-11.297][    0.183699] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[09-47-11.298][    0.183794] io scheduler noop registered
[09-47-11.307][    0.183839] io scheduler deadline registered
[09-47-11.307][    0.184676] io scheduler cfq registered (default)
[09-47-11.307][    0.184772] io scheduler mq-deadline registered
[09-47-11.316][    0.184823] io scheduler kyber registered
[09-47-11.326][    0.185962] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[09-47-11.331][    0.195711] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[09-47-11.332][    0.363277] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[09-47-11.337][    0.390205] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[09-47-11.343][    0.876366] console [ttyS0] enabled
[09-47-11.360][    0.886975] panel-simple panel: panel supply power not found, using dummy regulator
[09-47-11.373][    0.896348] SCSI Media Changer driver v0.25 
[09-47-11.374][    0.904189] m25p80 spi0.0: w25q128 (16384 Kbytes)
[09-47-11.377][    0.910128] 4 ofpart partitions found on MTD device spi0.0
[09-47-11.388][    0.915693] Creating 4 MTD partitions on "spi0.0":
[09-47-11.389][    0.920642] 0x000000000000-0x000000100000 : "u-boot"
[09-47-11.405][    0.928256] 0x000000100000-0x000000110000 : "dtb"
[09-47-11.406][    0.935462] 0x000000110000-0x000000510000 : "kernel"
[09-47-11.419][    0.943041] 0x000000510000-0x000001000000 : "rootfs"
[09-47-11.420][    0.951203] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[09-47-11.431][    0.957936] ehci-platform: EHCI generic platform driver
[09-47-11.432][    0.963504] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[09-47-11.444][    0.969870] ohci-platform: OHCI generic platform driver
[09-47-11.445][    0.975551] usbcore: registered new interface driver usb-storage
[09-47-11.449][    0.982648] i2c /dev entries driver
[09-47-11.522][    1.046832] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:19
[09-47-11.523][    1.054345] usbcore: registered new interface driver usbhid
[09-47-11.526][    1.060110] usbhid: USB HID core driver
[09-47-11.560][    1.081924] NET: Registered protocol family 17
[09-47-11.561][    1.086817] Key type dns_resolver registered
[09-47-11.565][    1.093406] Loading compiled-in X.509 certificates
[09-47-11.579][    1.109424] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739cb8)
[09-47-11.604][    1.118437] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f9c)
[09-47-11.605][    1.126201] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[09-47-11.609][    1.132969] [drm] No driver support for vblank timestamp query.
[09-47-11.842][    1.182338] mmc0: host does not support reading read-only switch, assuming write-enable
[09-47-11.856][    1.182702] mmc0: new SDHC card at address 0001
[09-47-11.872][    1.183930] mmcblk0: mmc0:0001 00000 14.9 GiB 
[09-47-11.883][    1.186309]  mmcblk0: p1 p2
[09-47-11.901][    1.334685] Console: switching to colour frame buffer device 100x30
[09-47-11.923][    1.450559] sun4i-drm display-engine: fb0:  frame buffer device
[09-47-11.939][    1.469397] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[09-47-11.964][    1.490601] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[09-47-11.994][    1.526687] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[09-47-12.015][    1.545650] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[09-47-12.038][    1.569240] hub 1-0:1.0: USB hub found
[09-47-12.052][    1.586363] hub 1-0:1.0: 1 port detected
[09-47-12.075][    1.605660] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[09-47-12.107][    1.636443] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[09-47-12.124][    1.656412] ALSA device list:
[09-47-12.140][    1.672274]   #0: Loopback 1
[09-47-12.164][    1.688575] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[09-47-12.177][    1.710671] cfg80211: failed to load regulatory.db
[09-47-12.203][    1.730755] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[09-47-12.222][    1.752425] Please append a correct "root=" boot option; here are the available partitions:
[09-47-12.241][    1.774822] 1f00            1024 mtdblock0 
[09-47-12.257][    1.774836]  (driver?)
[09-47-12.276][    1.809089] 1f01              64 mtdblock1 
[09-47-12.291][    1.809104]  (driver?)
[09-47-12.308][    1.842259] 1f02            4096 mtdblock2 
[09-47-12.324][    1.842273]  (driver?)
[09-47-12.341][    1.874145] 1f03           11200 mtdblock3 
[09-47-12.355][    1.874157]  (driver?)
[09-47-12.370][    1.904968] b300        15605760 mmcblk0 
[09-47-12.385][    1.904984]  driver: mmcblk
[09-47-12.403][    1.935018]   b301           32768 mmcblk0p1 000a709e-01
[09-47-12.416][    1.935031] 
[09-47-12.432][    1.964760]   b302        15571968 mmcblk0p2 000a709e-02
[09-47-12.445][    1.964773] 
[09-47-12.465][    1.994141] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[09-47-12.483][    2.014014] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-licheepi-nano+ #41
[09-47-12.499][    2.032509] Hardware name: Allwinner suniv Family
[09-47-12.518][    2.048297] [<c010e584>] (unwind_backtrace) from [<c010b6cc>] (show_stack+0x10/0x14)
[09-47-12.536][    2.067481] [<c010b6cc>] (show_stack) from [<c0116880>] (panic+0xb8/0x230)
[09-47-12.555][    2.085819] [<c0116880>] (panic) from [<c0901190>] (mount_block_root+0x170/0x250)
[09-47-12.574][    2.104742] [<c0901190>] (mount_block_root) from [<c0901364>] (mount_root+0xf4/0x120)
[09-47-12.594][    2.124359] [<c0901364>] (mount_root) from [<c09014b8>] (prepare_namespace+0x128/0x188)
[09-47-12.615][    2.144090] [<c09014b8>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x174/0x1b8)
[09-47-12.634][    2.164839] [<c0900dc0>] (kernel_init_freeable) from [<c065c6b0>] (kernel_init+0x8/0x10c)
[09-47-12.654][    2.184996] [<c065c6b0>] (kernel_init) from [<c0107de0>] (ret_from_fork+0x14/0x34)
[09-47-12.670][    2.204726] Rebooting in 5 seconds..
[09-47-36.848][    8.195697] Reboot failed -- System halted

离线

#7 2019-09-19 10:02:59

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 7,826

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

只是换了吗u-boot?

离线

#8 2019-09-19 14:42:04

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

晕哥 说:

只是换了吗u-boot?

只是换了uboot

重新做一遍,报错如下:

=> sf probe 0 60000000
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=> sf read 0x80c00000 0x100000 0x1000
device 0 offset 0x100000, size 0x1000
SF: 4096 bytes @ 0x100000 Read: OK
=> sf read 0x80008000 0x110000 0x4000
device 0 offset 0x110000, size 0x4000
SF: 16384 bytes @ 0x110000 Read: OK
=> bootz 0x80008000 - 0x80c00000
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f2a ... OK
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
ERROR: /chosen node create failed
- must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

离线

#9 2019-09-19 15:15:33

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

luckymist 说:
晕哥 说:

只是换了吗u-boot?

只是换了uboot

重新做一遍,报错如下:

=> sf probe 0 60000000
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=> sf read 0x80c00000 0x100000 0x1000
device 0 offset 0x100000, size 0x1000
SF: 4096 bytes @ 0x100000 Read: OK
=> sf read 0x80008000 0x110000 0x4000
device 0 offset 0x110000, size 0x4000
SF: 16384 bytes @ 0x110000 Read: OK
=> bootz 0x80008000 - 0x80c00000
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f2a ... OK
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE
ERROR: /chosen node create failed
- must RESET the board to recover.

FDT creation failed! hanging...### ERROR ### Please RESET the board ###

长度不对
sf read 0x80c00000 0x100000 0x1000
sf read 0x80008000 0x110000 0x4000
复制粘贴进去后烧了个0
应该是:
sf read 0x80c00000 0x100000 0x10000
sf read 0x80008000 0x110000 0x40000

离线

#10 2019-09-19 15:16:34

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

=> sf probe 0 60000000
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
=> sf read 0x80c00000 0x100000 0x10000
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
=> sf read 0x80008000 0x110000 0x40000
device 0 offset 0x110000, size 0x40000
SF: 262144 bytes @ 0x110000 Read: OK
=> bootz 0x80008000 - 0x80c00000
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f2a ... OK

Starting kernel ...




一直卡在这里又是什么问题。。。

离线

#11 2019-09-19 15:25:26

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

只是换了自己编译的uboot,启动后报错 :
[    1.884551] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)

log如下:

U-Boot SPL 2018.01-05679-g013ca45 (Sep 19 2019 - 15:20:53)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI


U-Boot 2018.01-05679-g013ca45 (Sep 19 2019 - 15:20:53 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
sf - SPI flash sub-system

Usage:
sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
                                  and chip select
sf read addr offset|partition len       - read `len' bytes starting at
                                          `offset' or from start of mtd
                                          `partition'to memory at `addr'
sf write addr offset|partition len      - write `len' bytes from memory
                                          at `addr' to flash at `offset'
                                          or to start of mtd `partition'
sf erase offset|partition [+]len        - erase `len' bytes from `offset'
                                          or from start of mtd `partition'
                                         `+len' round up `len' to block size
sf update addr offset|partition len     - erase and write `len' bytes from memory
                                          at `addr' to flash at `offset'
                                          or to start of mtd `partition'
sf protect lock/unlock sector len       - protect/unprotect 'len' bytes starting
                                          at address 'sector'

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 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e5f000, end 80e63f2a ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-licheepi-nano+ (root@ubuntu) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #41 Sun Jul 21 21:25:38 EDT 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22676K/32768K available (6144K kernel code, 235K rwdata, 1404K rodata, 1024K init, 245K bss, 10092K 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 : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 236 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 246 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000109] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000642] Console: colour dummy device 80x30
[    0.001547] console [tty0] enabled
[    0.001656] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070286] pid_max: default: 32768 minimum: 301
[    0.070656] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070754] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072429] CPU: Testing write buffer coherency: ok
[    0.074230] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076995] devtmpfs: initialized
[    0.083749] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083932] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.084278] pinctrl core: initialized pinctrl subsystem
[    0.086461] random: get_random_u32 called from bucket_table_alloc+0x80/0x1a4 with crng_init=0
[    0.086853] NET: Registered protocol family 16
[    0.088492] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.090656] cpuidle: using governor menu
[    0.117704] SCSI subsystem initialized
[    0.118103] usbcore: registered new interface driver usbfs
[    0.118357] usbcore: registered new interface driver hub
[    0.118603] usbcore: registered new device driver usb
[    0.119133] pps_core: LinuxPPS API ver. 1 registered
[    0.119212] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.119345] PTP clock support registered
[    0.119914] Advanced Linux Sound Architecture Driver Initialized.
[    0.121101] random: fast init done
[    0.121852] clocksource: Switched to clocksource timer
[    0.151098] NET: Registered protocol family 2
[    0.152869] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.153034] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.153139] TCP: Hash tables configured (established 1024 bind 1024)
[    0.153554] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.153673] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.154276] NET: Registered protocol family 1
[    0.155721] RPC: Registered named UNIX socket transport module.
[    0.155838] RPC: Registered udp transport module.
[    0.155889] RPC: Registered tcp transport module.
[    0.155932] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.158226] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.160386] Initialise system trusted keyrings
[    0.161128] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.179640] NFS: Registering the id_resolver key type
[    0.179811] Key type id_resolver registered
[    0.179874] Key type id_legacy registered
[    0.180045] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.195447] Key type asymmetric registered
[    0.195565] Asymmetric key parser 'x509' registered
[    0.195842] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.195948] io scheduler noop registered
[    0.195997] io scheduler deadline registered
[    0.196906] io scheduler cfq registered (default)
[    0.197006] io scheduler mq-deadline registered
[    0.197064] io scheduler kyber registered
[    0.198306] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.208739] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.396955] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.424521] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.910778] console [ttyS0] enabled
[    0.921692] panel-simple panel: panel supply power not found, using dummy regulator
[    0.931296] SCSI Media Changer driver v0.25 
[    0.939583] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.945545] 4 ofpart partitions found on MTD device spi0.0
[    0.951119] Creating 4 MTD partitions on "spi0.0":
[    0.956095] 0x000000000000-0x000000100000 : "u-boot"
[    0.964053] 0x000000100000-0x000000110000 : "dtb"
[    0.971582] 0x000000110000-0x000000510000 : "kernel"
[    0.979485] 0x000000510000-0x000001000000 : "rootfs"
[    0.988089] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.994845] ehci-platform: EHCI generic platform driver
[    1.000444] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.006833] ohci-platform: OHCI generic platform driver
[    1.012650] usbcore: registered new interface driver usb-storage
[    1.019689] i2c /dev entries driver
[    1.081995] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:19
[    1.089774] usbcore: registered new interface driver usbhid
[    1.095569] usbhid: USB HID core driver
[    1.118772] NET: Registered protocol family 17
[    1.123740] Key type dns_resolver registered
[    1.130559] Loading compiled-in X.509 certificates
[    1.147245] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739cb8)
[    1.156301] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f9c)
[    1.164195] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.170853] [drm] No driver support for vblank timestamp query.
[    1.370428] Console: switching to colour frame buffer device 100x30
[    1.420800] sun4i-drm display-engine: fb0:  frame buffer device
[    1.439547] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.460508] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.496086] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.514282] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.536872] hub 1-0:1.0: USB hub found
[    1.553278] hub 1-0:1.0: 1 port detected
[    1.572248] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.602882] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.622963] vcc3v3: disabling
[    1.638945] ALSA device list:
[    1.654603]   #0: Loopback 1
[    1.670855] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.692670] cfg80211: failed to load regulatory.db
[    1.712634] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[    1.734090] Please append a correct "root=" boot option; here are the available partitions:
[    1.755939] 1f00            1024 mtdblock0 
[    1.755952]  (driver?)
[    1.788966] 1f01              64 mtdblock1 
[    1.788980]  (driver?)
[    1.821633] 1f02            4096 mtdblock2 
[    1.821645]  (driver?)
[    1.853700] 1f03           11200 mtdblock3 
[    1.853712]  (driver?)
[    1.884551] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[    1.905264] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-licheepi-nano+ #41
[    1.924698] Hardware name: Allwinner suniv Family
[    1.941683] [<c010e584>] (unwind_backtrace) from [<c010b6cc>] (show_stack+0x10/0x14)
[    1.962074] [<c010b6cc>] (show_stack) from [<c0116880>] (panic+0xb8/0x230)
[    1.981569] [<c0116880>] (panic) from [<c0901190>] (mount_block_root+0x170/0x250)
[    2.001632] [<c0901190>] (mount_block_root) from [<c0901364>] (mount_root+0xf4/0x120)
[    2.021957] [<c0901364>] (mount_root) from [<c09014b8>] (prepare_namespace+0x128/0x188)
[    2.042237] [<c09014b8>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x174/0x1b8)
[    2.063562] [<c0900dc0>] (kernel_init_freeable) from [<c065c6b0>] (kernel_init+0x8/0x10c)
[    2.084368] [<c065c6b0>] (kernel_init) from [<c0107de0>] (ret_from_fork+0x14/0x34)
[    2.104387] Rebooting in 5 seconds..
[    8.096110] Reboot failed -- System halted

离线

#12 2019-09-19 15:36:14

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 7,826

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

如果只改了 u-boot, 那 bootargs 不对吧: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs

应该是这样:

panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2

离线

#13 2019-09-19 15:41:56

luckymist
会员
注册时间: 2019-09-18
累计积分: 50

Re: 参考http://nano.lichee.pro的步骤编译uboot烧写后开机进不了linux

晕哥 说:

如果只改了 u-boot, 那 bootargs 不对吧: panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=squashfs

应该是这样:

panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2


这样可以了
终于跑进去了

离线

页脚