您尚未登录。

楼主 #1 2019-11-09 22:05:01

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

v536启动异常

根据全志提供的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中并无此现象 特此请教各位该解决思路,由衷感谢

离线

#2 2019-11-09 22:09:13

xgui
会员
注册时间: 2019-09-07
已发帖子: 224
积分: 224

Re: v536启动异常

这是全部的 log 吗?

离线

楼主 #3 2019-11-09 22:17:27

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

xgui 说:

这是全部的 log 吗?

不是的,全部的如下:
https://whycan.cn/files/members/2352/error.txt

离线

#4 2019-11-09 22:19:09

smartcar
会员
注册时间: 2018-02-19
已发帖子: 735
积分: 735

Re: v536启动异常

16M flash 是什么型号, w25q128?

理论上软件直接烧到 w25m512jv 不用做任何修改。

离线

楼主 #5 2019-11-09 22:24:20

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

smartcar 说:

16M flash 是什么型号, w25q128?

理论上软件直接烧到 w25m512jv 不用做任何修改。

对,是您说的这块,但很奇怪。我用512jv就出现这个问题,公司这边拿来的两块板子都这样。

另外这个key pressed 有办法关掉么? 我修改了在uboot中打印这句的key.c源码仍然无效

离线

#6 2019-11-09 22:27:57

jimmy
会员
注册时间: 2017-10-29
已发帖子: 316
积分: 315

Re: v536启动异常

key pressed是干嘛的,按键启动/关机吗?

离线

#7 2019-11-09 22:30:06

超级萌新
会员
注册时间: 2018-05-04
已发帖子: 408
积分: 407

Re: v536启动异常

[    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 加到驱动?

离线

楼主 #8 2019-11-09 22:42:27

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

jimmy 说:

key pressed是干嘛的,按键启动/关机吗?

这个我也很奇怪,据硬件工程师将原本的开发板上是有按键的,但他画的板子出现了这个情况。我也不太清楚问题到底出在哪,只能从代码角度去尝试屏蔽掉

离线

楼主 #9 2019-11-09 22:47:12

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

超级萌新 说:

[    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选项后 也是如此

离线

#10 2019-11-09 23:14:13

jimmy
会员
注册时间: 2017-10-29
已发帖子: 316
积分: 315

Re: v536启动异常

想办法 flash 读回来,和写进去的文件比较,看是否一致。

还有,你的 sec4k 在哪里修改的?

离线

楼主 #11 2019-11-10 00:01:39

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

jimmy 说:

想办法 flash 读回来,和写进去的文件比较,看是否一致。

还有,你的 sec4k 在哪里修改的?

spi-nor.c 中, 添加了ID号之后 写入了SEC4K | SPI_DUAL_READ | SPI_QUAD_READ
spi总线的时钟频率是16M

离线

#12 2019-11-10 07:10:40

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: v536启动异常

要去掉 SECT_4K, 而不是加上: https://whycan.cn/t_1635.html#p9757





离线

楼主 #13 2019-11-10 13:57:27

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

晕哥 说:

要去掉 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编译异常,所以觉得这里面坑太大没有进一步往下探究。
请问之前帖子中提到的问题您有解决思路吗

离线

#14 2019-11-10 14:06:20

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: v536启动异常

精华帖: 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芯片也无需重新修改内核。





离线

楼主 #15 2019-11-10 15:10:50

postmaek
会员
注册时间: 2019-11-08
已发帖子: 13
积分: 13

Re: v536启动异常

晕哥 说:

精华帖: 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

离线

#16 2019-11-10 16:54:44

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: v536启动异常

[    1.333273] m25p80 spi0.0: found w25m512jv, expected m25p80
[    1.339623] m25p80 spi0.0: w25m512jv (64896 Kbytes)
[    1.350761] 7 sunxipart partitions found on MTD device spi0.0
[    1.357248] Creating 7 MTD partitions on "spi0.0":
[    1.362639] 0x000000000000-0x000000100000 : "uboot"
[    1.368156] mtd: partition "uboot" doesn't end on an erase block -- force read-only
[    1.378263] 0x000000100000-0x0000003c0000 : "boot"
[    1.383655] mtd: partition "boot" doesn't start on an erase block boundary -- force read-only
[    1.394790] 0x0000003c0000-0x000000b40000 : "rootfs"
[    1.400406] mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
[    1.411686] 0x000000b40000-0x000000bc0000 : "overlay"
[    1.417448] mtd: partition "overlay" doesn't start on an erase block boundary -- force read-only
[    1.428820] 0x000000bc0000-0x000000be0000 : "env"
[    1.434115] mtd: partition "env" doesn't start on an erase block boundary -- force read-only
[    1.444978] 0x000000be0000-0x000000c20000 : "bootlogo"
[    1.450821] mtd: partition "bootlogo" doesn't start on an erase block boundary -- force read-only
[    1.462206] 0x000000c20000-0x000003f60000 : "UDISK"
[    1.467751] mtd: partition "UDISK" doesn't start on an erase block boundary -- force read-only

提示你的分区界线有问题?但是单看第一个就没有问题0x000000000000-0x000000100000 : "uboot",

你手边有 w25q256 吗?建议烧到这个芯片看下结果.





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn