就是配置那个sun8i.h问题
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x400000; " \
"bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2"
"bootz 0x41000000 - 0x41800000"对于这里的这两个地址是否可以改变
因为我我zImage大于了8M所以我的配置文件是如下
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41A00000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x800000; " \
"bootz 0x41000000 - 0x41A00000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,8M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2"
我不知道这样是否有什么影响
最近编辑记录 无情一刀 (2018-09-11 17:17:08)
离线
可以这样改, 没有问题, 前提是不要 内核和设备树的内存地址不要被相互覆盖了。
我这里是zImage是8M 所以最后制作文件系统的时候是这样的
# 由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(8M)=0x6F0000
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x6F0000 -d root/ -o jffs2.img
dd if=jffs2.img of=yangsichao.bin bs=1K seek=9280 conv=notrunc
后面运行的时候就卡这样不动了 这里Uboot我是对着文档一步步操作的
U-Boot SPL 2017.01-rc2-00057-g32ab180-dirty (Sep 11 2018 - 02:03:51)
DRAM: 64 MiB
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
最近编辑记录 无情一刀 (2018-09-11 17:28:17)
离线
离线
按上面三楼,可以了吗?
不行
离线
不太可能,你是什么型号 flash?
MX25L12835EMI-10G 16M 的
离线
看下 u-boot 的 .config 有没有使能 MX 的flash.
已经使能了
离线
你确认没有弄错 git 仓库的分支?
我不是很明白你说的git仓库 是什么意思
我去下载uboot是通过这个命令git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current
离线
无情一刀 说:晕哥 说:你确认没有弄错 git 仓库的分支?
我不是很明白你说的git仓库 是什么意思
我去下载uboot是通过这个命令git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current试一试这个 git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
这有什么差别吗 两者
离线
看名字前面一个不支持 spi flash, 后面的支持 spi flash.
具体情况要看前面的分支有没有合并 spi falsh.
你说的那个合并分支 我的uboot里面有spi文件夹啊
离线
无情一刀 说:晕哥 说:看名字前面一个不支持 spi flash, 后面的支持 spi flash.
具体情况要看前面的分支有没有合并 spi falsh.你说的那个合并分支 我的uboot里面有spi文件夹啊
和spi文件夹没有关系, 你按16楼的先试一试。
我这没有没有那个全志的SPI驱动设置项
离线
你的意思下载这个版本
git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
离线
你的意思下载这个版本
git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
离线
无情一刀 说:你的意思下载这个版本
git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental对.
我编译了uboot 运行的时候出现了这个不动了
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: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: unrecognized JEDEC id bytes: c2, 20, 18
Failed to initialize SPI flash at 0:0 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
离线
我的flash芯片型号是MX25L128 那个列表中没有对应的这个型号是不是也要将刚才刚才楼上说屏蔽掉宏定义了
离线
要去menuconfig 里面 打开这个 宏定义: CONFIG_SPI_FLASH_MACRONIX
后者 .config 里面找到这个宏定义,直接修改开启也行。
开启了可以运行uboot 发现不断的启动 总是来回启动
[ 1.072101] Rebooting in 5 seconds..
离线
多贴一点启动信息
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 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-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 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: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 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 41a00000
Booting using the fdt blob at 0x41a00000
Loading Device Tree to 42dfb000, end 42dffc29 ... OK
Cannot setup simplefb: node not found
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.10.15-licheepi-zero+ (root@ubuntu) (gcc version 6.3.1 20170109 (Linaro GCC 6.3-2017.02) ) #25 SMP Mon Sep 10 21:04:16 PDT 2018
[ 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
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 14 pages/cpu @c3f64000 s24716 r8192 d24436 u57344
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,8M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
[ 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: 55160K/65536K available (6144K kernel code, 199K rwdata, 1412K rodata, 1024K init, 262K bss, 10376K 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 : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 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 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a31f00 ( 200 kB)
[ 0.000000] .bss : 0xc0a33000 - 0xc0a7484c ( 263 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] arm_arch_timer: Architected 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.000133] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000334] Console: colour dummy device 80x30
[ 0.000369] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000384] pid_max: default: 32768 minimum: 301
[ 0.000518] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000531] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001231] CPU: Testing write buffer coherency: ok
[ 0.001638] /cpus/cpu@0 missing clock-frequency property
[ 0.001661] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002022] Setting up static identity map for 0x40100000 - 0x40100058
[ 0.002773] smp: Bringing up secondary CPUs ...
[ 0.002791] smp: Brought up 1 node, 1 CPU
[ 0.002800] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002807] CPU: All CPU(s) started in SVC mode.
[ 0.003591] devtmpfs: initialized
[ 0.006074] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006348] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006377] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006529] pinctrl core: initialized pinctrl subsystem
[ 0.007534] NET: Registered protocol family 16
[ 0.008028] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009253] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009268] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.019932] SCSI subsystem initialized
[ 0.020365] usbcore: registered new interface driver usbfs
[ 0.020433] usbcore: registered new interface driver hub
[ 0.020522] usbcore: registered new device driver usb
[ 0.020734] pps_core: LinuxPPS API ver. 1 registered
[ 0.020741] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.020764] PTP clock support registered
[ 0.020987] Advanced Linux Sound Architecture Driver Initialized.
[ 0.022782] clocksource: Switched to clocksource arch_sys_counter
[ 0.033247] NET: Registered protocol family 2
[ 0.033870] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.033901] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.033925] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.034015] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.034062] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.034269] NET: Registered protocol family 1
[ 0.034888] RPC: Registered named UNIX socket transport module.
[ 0.034906] RPC: Registered udp transport module.
[ 0.034912] RPC: Registered tcp transport module.
[ 0.034917] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.037095] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.046135] NFS: Registering the id_resolver key type
[ 0.046183] Key type id_resolver registered
[ 0.046190] Key type id_legacy registered
[ 0.046245] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.050656] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.050678] io scheduler noop registered
[ 0.050686] io scheduler deadline registered
[ 0.050901] io scheduler cfq registered (default)
[ 0.055118] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.120964] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.124418] console [ttyS0] disabled
[ 0.144701] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 30, base_baud = 1500000) is a U6_16550A
[ 0.708670] console [ttyS0] enabled
[ 0.712924] [drm] Initialized
[ 0.717560] SPI driver: fifo=64
[ 0.718488] libphy: Fixed MDIO Bus: probed
[ 0.726059] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.732584] ehci-platform: EHCI generic platform driver
[ 0.737939] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.744170] ohci-platform: OHCI generic platform driver
[ 0.749844] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.759514] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.766394] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.770919] i2c /dev entries driver
[ 0.775193] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 0.842833] sunxi-mmc 1c0f000.mmc: base:0xc48aa000 irq:22
[ 0.849074] usbcore: registered new interface driver usbhid
[ 0.854734] usbhid: USB HID core driver
[ 0.860044] NET: Registered protocol family 17
[ 0.864756] Key type dns_resolver registered
[ 0.869180] Registering SWP/SWPB emulation handler
[ 0.880283] usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.888274] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 0.894128] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 0.905388] hub 1-0:1.0: USB hub found
[ 0.909249] hub 1-0:1.0: 1 port detected
[ 0.914046] using random self ethernet address
[ 0.918538] using random host ethernet address
[ 0.924094] usb0: HOST MAC 0a:69:ec:c1:12:12
[ 0.928415] usb0: MAC 16:d2:29:2c:49:ef
[ 0.932293] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 0.939881] g_cdc gadget: g_cdc ready
[ 0.943908] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:51:35 UTC (3095)
[ 0.952301] vcc3v0: disabling
[ 0.955347] vcc5v0: disabling
[ 0.958315] ALSA device list:
[ 0.961277] No soundcards found.
[ 0.965771] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[ 0.973475] Please append a correct "root=" boot option; here are the available partitions:
[ 0.981824] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 0.990168] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.15-licheepi-zero+ #25
[ 0.997550] Hardware name: Allwinner sun8i Family
[ 1.002287] [<c010e2fc>] (unwind_backtrace) from [<c010b098>] (show_stack+0x10/0x14)
[ 1.010028] [<c010b098>] (show_stack) from [<c03465c4>] (dump_stack+0x84/0x98)
[ 1.017248] [<c03465c4>] (dump_stack) from [<c01a6ccc>] (panic+0xdc/0x248)
[ 1.024126] [<c01a6ccc>] (panic) from [<c09011f0>] (mount_block_root+0x188/0x260)
[ 1.031604] [<c09011f0>] (mount_block_root) from [<c09013e8>] (mount_root+0x120/0x128)
[ 1.039514] [<c09013e8>] (mount_root) from [<c0901540>] (prepare_namespace+0x150/0x194)
[ 1.047513] [<c0901540>] (prepare_namespace) from [<c0900e40>] (kernel_init_freeable+0x1d4/0x1e4)
[ 1.056376] [<c0900e40>] (kernel_init_freeable) from [<c065d360>] (kernel_init+0x8/0x10c)
[ 1.064549] [<c065d360>] (kernel_init) from [<c0107638>] (ret_from_fork+0x14/0x3c)
[ 1.072118] Rebooting in 5 seconds..
U-Boot SPL 2017.01-rc2-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49)
DRAM: 64 MiB
Trying to boot from sunxi SPI
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 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-00073-gdd6e874-dirty (Sep 11 2018 - 23:39:49 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 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: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 1
离线
加载根文件系统出错, 系统5秒后自动重启.
你先用 TF 卡的第二个分区试一试.
sun8i.h 的 bootargs 改成对应的 TF 第二个分区.
我不是很明白你说的 我试了用自带的根文件系统也是一样的
最近编辑记录 无情一刀 (2018-09-12 18:31:11)
离线