两个问题:
1. 单独EMMC启动, 经常卡死。
U-Boot SPL 2021.07 (Aug 11 2021 - 17:35:12 +0800)
DRAM: 1024 MiB
Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
2. 偶尔可以通过, 但是无法读取zImage文件。 .dtb文件可以读取。
U-Boot SPL 2021.07 (Aug 11 2021 - 17:35:12 +0800)
DRAM: 1024 MiB
Trying to boot from MMC2
U-Boot 2021.07 (Aug 11 2021 - 17:35:12 +0800) Allwinner Technology
CPU: Allwinner A33 (SUN8I 1667)
Model: Sinlinx SinA33
DRAM: 1 GiB
MMC: mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc1:1... Setting up a 1024x600 lcd console (overscan 0x0)
In: serial
Out: vidconsole
Err: vidconsole
Allwinner mUSB OTG (Peripheral)
Net: eth0: usb_ether
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 3 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
310 bytes read in 1 ms (302.7 KiB/s)
## Executing script at 43100000
Error reading cluster
** Unable to read file /boot/zImage **
Failed to load '/boot/zImage'
23164 bytes read in 3 ms (7.4 MiB/s)
Kernel image @ 0x46000000 [ 0x000000 - 0x49e820 ]
## Flattened Device Tree blob at 49000000
Booting using the fdt blob at 0x49000000
Using Device Tree in place at 49000000, end 49008a7b
Starting kernel ...
使用TF启动,在SPL里面,手动加载EMMC的zImage也只是偶尔成功。
===================dtb文件每次都可以。
=> fatload mmc 1 0x49000000 /boot/sun8i-a33-sinlinx-sina33.dtb
23164 bytes read in 2 ms (11 MiB/s)
=> fatload mmc 1 0x49000000 /boot/sun8i-a33-sinlinx-sina33.dtb
23164 bytes read in 2 ms (11 MiB/s)
=> fatload mmc 1 0x49000000 /boot/sun8i-a33-sinlinx-sina33.dtb
23164 bytes read in 3 ms (7.4 MiB/s)
=> fatload mmc 1 0x49000000 /boot/sun8i-a33-sinlinx-sina33.dtb
23164 bytes read in 3 ms (7.4 MiB/s)
=> fatload mmc 1 0x49000000 /boot/sun8i-a33-sinlinx-sina33.dtb
23164 bytes read in 2 ms (11 MiB/s)
====================zImage经常不成功
=> fatload mmc 1 0x46000000 /boot/zImage
Error reading cluster
** Unable to read file /boot/zImage **
Failed to load '/boot/zImage'
=> fatload mmc 1 0x46000000 /boot/zImage
4843552 bytes read in 222 ms (20.8 MiB/s)
=> fatload mmc 1 0x46000000 /boot/zImage
4843552 bytes read in 222 ms (20.8 MiB/s)
=> fatload mmc 1 0x46000000 /boot/zImage
Error reading cluster
** Unable to read file /boot/zImage **
Failed to load '/boot/zImage'
=> fatload mmc 1 0x46000000 /boot/zImage
Error reading cluster
** Unable to read file /boot/zImage **
Failed to load '/boot/zImage'
=> fatload mmc 1 0x46000000 /boot/zImage
4843552 bytes read in 221 ms (20.9 MiB/s)
=>
验证过:
uboot里面调整EMMC的驱动能力。 从40改成30。 没效果。
EMMC感觉不可靠。核心板是买的, 烧录SDK可以正常运行。 所以这里不怀疑板子硬件。
请各位高手指点一下。
谢谢。
离线
降低内存的频率试下
离线
CPU和DRAM都降了。
离线
找到一些线索, 还的清大神们帮忙看看; 读取文件大了就会出错。 不知道哪里毛病。
# ls /dev/mmcblk
mmcblk0 mmcblk0p2 mmcblk1boot0
mmcblk0p1 mmcblk1 mmcblk1boot1
# dd if=/dev/mmcblk1 of=/dev/null bs=16k count=6
6+0 records in
6+0 records out
# dd if=/dev/mmcblk1 of=/dev/null bs=16k count=65
65+0 records in
65+0 records out
# dd if=/dev/mmcblk1 of=/dev/null bs=16k count=650
[ 3673.752201] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 3674.710698] sched: RT throttling activated
[ 3674.750700] sunxi-mmc 1c11000.mmc: send stop command failed
。。。挂机了
离线
换了另外一家的板子就可以了。 看来PET33的EMMC部分有问题。
离线
你用的主线驱动吧,这个问题我遇到过,他们BSP是有个失败重试机制,重置一下控制器就好了,主线的驱动缺少了这部分就会卡在这。
将重试逻辑移植到主线上也能解决这个问题的。
离线
感谢解惑。
我用的是主线。 那就是用软件弥补硬件的不可靠。 先记录下来。还在折腾OpenGL. 头大。
离线