根据全志提供的v536芯片手册选用了w25m512jv nor flash后,发现源码中没有对应的ID,自行添加启动异常。并且出现了奇怪的按键打印现象。
按键答应异常如下:
[53]HELLO! BOOT0 is starting!
[56]boot0 commit : d62be0e6d8bce06823670773a769cddd0a95c626
[73]rsb_send_initseq: rsb clk 400Khz -> 3Mhz
[77]PMU: AXP2101
[79]set pll start
[82]set pll end
[84]key pressed value=0x00000039
[87]key pressed value=0x00000039
[130]key pressed value=0x00000039
[174]key pressed value=0x00000039
[217]key pressed value=0x00000039
[260]key pressed value=0x00000039
[304]key pressed value=0x00000039
[347]key pressed value=0x00000039
……
[8768]key pressed value=0x00000039
[8811]time out
[8812]DRAM BOOT DRIVE INFO: V0.32
[8816]DRAM_VCC set to 1500 mv
[8819]DRAM CLK =792 MHZ
[8821]DRAM Type =3 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4)
[8859]Training result is = 00000007
[8863]Actual DRAM SIZE =256 M
[8866]DRAM SIZE =256 MBytes, para1 = 000030ea, para2 = 01000001, dram_tpr13 = 08006843
[8882]DRAM simple test OK.
[8885]dram size =256
[8889]sunxi spinor is initing...ok
[8892]spinor id is 001971ef
[8895]Succeed in reading toc file head.
[8899]The size of toc is 00084000.
[9010]Entry_name = scp
[9021]set arisc reset to de-assert state
[9024]Entry_name = optee
[9028]Entry_name = u-boot
[9034]Entry_name = soc-cfg
[9038]Entry_name = dtb
[9042]Ready to disable icache.
[9045]Jump to sece[ 2.719630] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.728929] CPU1: stopping
[ 2.731973] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.9.118 #248
[ 2.738919] Hardware name: sun8iw16
[ 2.742863] [<c0012521>] (unwind_backtrace) from [<c000ff37>] (show_stack+0xb/0xc)
[ 2.751384] [<c000ff37>] (show_stack) from [<c01014e3>] (dump_stack+0x5b/0x70)
[ 2.759510] [<c01014e3>] (dump_stack) from [<c0011b41>] (handle_IPI+0x8d/0x104)
[ 2.767734] [<c0011b41>] (handle_IPI) from [<c000930b>] (gic_handle_irq+0x4b/0x54)
[ 2.776249] [<c000930b>] (gic_handle_irq) from [<c00105e5>] (__irq_svc+0x65/0xac)
[ 2.784662] Exception stack(0xc3071f78 to 0xc3071fc0)
[ 2.790340] 1f60: 00000000 c354f400
[ 2.799538] 1f80: 00000001 00000000 c2874800 00000001 a2a8125a 00000000 a22632f5 00000000
[ 2.808736] 1fa0: 00000001 00000000 00000000 c3071fc8 c0055a31 c01c1740 40000133 ffffffff
[ 2.817939] [<c00105e5>] (__irq_svc) from [<c01c1740>] (cpuidle_enter_state+0xa6/0x15e)
[ 2.826948] [<c01c1740>] (cpuidle_enter_state) from [<c003cd6f>] (cpu_startup_entry+0x10f/0x128)
[ 2.836833] [<c003cd6f>] (cpu_startup_entry) from [<400094f1>] (0x400094f1)
[ 2.844666] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 15.767429] random: crng init done
nd Boot.
MESSAGE: [0x0] TEE-CORE: OP-TEE version: sun8iw15p1_a50_8.1.0_v1.0-102-ga90d1c9 #2 2019骞05鏈27鏃鏄熸湡涓€ 02:20:12 UTC arm
MESSAGE: [0x0] TEE-CORE: arisc commit: bb7ad809514f677e6bbc711c7050ce8a095defe8
U-Boot 2014.07 (May 27 2019 - 19:31:28) Allwinner Technology
uboot commit : b1c1c5fb19667b71b0df55c0968121310132e2bd
然后是启动到最后无法找到rootfs :
[ 2.719630] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.728929] CPU1: stopping
[ 2.731973] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.9.118 #248
[ 2.738919] Hardware name: sun8iw16
[ 2.742863] [<c0012521>] (unwind_backtrace) from [<c000ff37>] (show_stack+0xb/0xc)
[ 2.751384] [<c000ff37>] (show_stack) from [<c01014e3>] (dump_stack+0x5b/0x70)
[ 2.759510] [<c01014e3>] (dump_stack) from [<c0011b41>] (handle_IPI+0x8d/0x104)
[ 2.767734] [<c0011b41>] (handle_IPI) from [<c000930b>] (gic_handle_irq+0x4b/0x54)
[ 2.776249] [<c000930b>] (gic_handle_irq) from [<c00105e5>] (__irq_svc+0x65/0xac)
[ 2.784662] Exception stack(0xc3071f78 to 0xc3071fc0)
[ 2.790340] 1f60: 00000000 c354f400
[ 2.799538] 1f80: 00000001 00000000 c2874800 00000001 a2a8125a 00000000 a22632f5 00000000
[ 2.808736] 1fa0: 00000001 00000000 00000000 c3071fc8 c0055a31 c01c1740 40000133 ffffffff
[ 2.817939] [<c00105e5>] (__irq_svc) from [<c01c1740>] (cpuidle_enter_state+0xa6/0x15e)
[ 2.826948] [<c01c1740>] (cpuidle_enter_state) from [<c003cd6f>] (cpu_startup_entry+0x10f/0x128)
[ 2.836833] [<c003cd6f>] (cpu_startup_entry) from [<400094f1>] (0x400094f1)
[ 2.844666] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 15.767429] random: crng init done
之前在另一块源码中提到的16m FLASH中并无此现象 特此请教各位该解决思路,由衷感谢
离线
这是全部的 log 吗?
离线
16M flash 是什么型号, w25q128?
理论上软件直接烧到 w25m512jv 不用做任何修改。
对,是您说的这块,但很奇怪。我用512jv就出现这个问题,公司这边拿来的两块板子都这样。
另外这个key pressed 有办法关掉么? 我修改了在uboot中打印这句的key.c源码仍然无效
离线
key pressed是干嘛的,按键启动/关机吗?
这个我也很奇怪,据硬件工程师将原本的开发板上是有按键的,但他画的板子出现了这个情况。我也不太清楚问题到底出在哪,只能从代码角度去尝试屏蔽掉
离线
[ 1.367291] sunxi-wlan wlan: Missing wakeup_source!
[ 1.373496] m25p80 spi0.0: unrecognized JEDEC id bytes: ef, 71, 19
[ 1.380641] usb_serial_number:20080411有没有把这个 flash id 加到驱动?
之前有在公司电脑上加过,这个是在我自己电脑未添加ID出现的情况,添加后的情况如下:
https://whycan.cn/files/members/2352/201911071042.txt
可以看到出现了大量jffs2 擦除flash的情况。打开SECT4K选项后 也是如此
离线
想办法 flash 读回来,和写进去的文件比较,看是否一致。
还有,你的 sec4k 在哪里修改的?
spi-nor.c 中, 添加了ID号之后 写入了SEC4K | SPI_DUAL_READ | SPI_QUAD_READ
spi总线的时钟频率是16M
离线
要去掉 SECT_4K, 而不是加上: https://whycan.cn/t_1635.html#p9757
晕哥你好,我就是看了你的贴子后开始尝试解决这个问题的,感谢你的回复
是这样,我尝试按照这篇帖子:
https://whycan.cn/t_1570.html
提到的方式修改,可以成功进入系统了,但是出现了这篇帖子
https://whycan.cn/t_1108.html
提到的jffs2大量擦除警告的消息
我尝试过打开4B选项,但目前的spi-nor.c驱动不支持,这个
更换为最新的后又发现m25p80编译异常,所以觉得这里面坑太大没有进一步往下探究。
请问之前帖子中提到的问题您有解决思路吗
离线
精华帖: 17. lichee nano官方linux config文件踩坑与填坑(常见配置误区)
0x03: 开机后报大量JFFS2 erase size错误
这个lichee官方和论坛里很多人的帖子都有提到,修复方法是patch掉内核里对应flash型号的SECT_4K参数。但是实际上内核配置文件中为我们预留了关闭4K erase size 的选项,无需侵入内核代码修改。
禁用:Memory Technology Device (MTD) support ---> SPI-NOR device support ---> Use small 4096 B erase sectors
这样以后更换其他的flash芯片也无需重新修改内核。
晕哥,我在内核中已经关闭了此选项但依然这样,麻烦您看看串口的输出日志,给小弟一点思路:
https://whycan.cn/files/members/2352/201911101503.txt
离线