页次: 1
https://whycan.com/t_3994.html
你可以在右上角搜索一下。
Lichee nano, lvgl 8.1, RGB 1024*600, Linux5.4.92(使用到了aodzip的buildroot包),使能触摸屏ns2009.
运行了20多分钟就死机了。 这个会是哪里问题?谢谢。
主频设定: cpu 768, RAM 200
# ./Ui_widgets
The framebuffer device was opened successfully.
1024x600, 32bpp
The framebuffer device was mapped to memory successfully.
[ 283.924994] input input0: Poll touch data failed: -22
[ 457.284939] input input0: Poll touch data failed: -22
[ 580.724974] input input0: Poll touch data failed: -22
[ 1319.445066] input input0: Poll touch data failed: -22
[ 1503.725011] input input0: Poll touch data failed: -22
[ 1860.685013] input input0: Poll touch data failed: -22
[ 2165.845118] input input0: Poll touch data failed: -22
[ 2292.244920] input input0: Poll touch data failed: -22
[ 2503.299110] 8<--- cut here ---
[ 2503.302191] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 2503.310261] pgd = f4c3d10b
[ 2503.312961] [00000004] *pgd=00000000
[ 2503.316535] Internal error: Oops: 817 [#1] ARM
[ 2503.320960] Modules linked in:
[ 2503.324017] CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.92 #5
[ 2503.329738] Hardware name: Allwinner suniv Family
[ 2503.334452] PC is at callchain_trace+0x44/0x64
[ 2503.338899] LR is at generic_handle_irq+0x20/0x34
[ 2503.343586] pc : [<c010e51c>] lr : [<c014a254>] psr: a0000093
[ 2503.349826] sp : c0a01ee8 ip : c17f1184 fp : 00000001
[ 2503.355029] r10: c0a0329c r9 : c0a00000 r8 : c17f3200
[ 2503.360232] r7 : 00000000 r6 : 00000001 r5 : c0a38768 r4 : 00000080
[ 2503.366733] r3 : c010e518 r2 : 00000000 r1 : 00000010 r0 : c17e5000
[ 2503.373235] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 2503.380428] Control: 0005317f Table: 80028000 DAC: 00000051
[ 2503.386154] Process swapper (pid: 0, stack limit = 0x9f80f19e)
[ 2503.391964] Stack: (0xc0a01ee8 to 0xc0a02000)
[ 2503.396313] 1ee0: 00000010 c014a7e0 c0a6d0dc c0a01f18 ffffffff c0a01f4c
[ 2503.404466] 1f00: c0a2e508 c0353e44 c01095e8 60000013 ffffffff c0102188 00000000 0005317f
[ 2503.412618] 1f20: 0005217f 60000013 ffffe000 00000000 c0a03288 00000000 c0a2e508 c0a03228
[ 2503.420769] 1f40: c0a0329c 00000001 600000d3 c0a01f68 c01095f0 c01095e8 60000013 ffffffff
[ 2503.428921] 1f60: 00000053 00000000 ffffe000 c01397e0 c0a03220 c0a3f000 00000000 477d485f
[ 2503.437071] 1f80: 00000001 c0a3f048 c0a03228 c0a03220 c0a3f000 00000000 c1d59420 00000001
[ 2503.445223] 1fa0: c0925a30 c0139b18 c0a3f048 c0900ccc ffffffff ffffffff 00000000 c0900580
[ 2503.453374] 1fc0: 00000000 c0925a30 47784c03 00000000 00000000 c0900330 00000053 00003135
[ 2503.461525] 1fe0: 00000000 817f9000 41069265 00053177 00000000 00000000 00000000 00000000
[ 2503.469699] [<c010e51c>] (callchain_trace) from [<c014a7e0>] (__handle_domain_irq+0x48/0xa8)
[ 2503.478126] [<c014a7e0>] (__handle_domain_irq) from [<c0353e44>] (sun4i_handle_irq+0x3c/0x58)
[ 2503.486632] [<c0353e44>] (sun4i_handle_irq) from [<c0102188>] (__irq_svc+0x68/0x84)
[ 2503.494256] Exception stack(0xc0a01f18 to 0xc0a01f60)
[ 2503.499288] 1f00: 00000000 0005317f
[ 2503.507439] 1f20: 0005217f 60000013 ffffe000 00000000 c0a03288 00000000 c0a2e508 c0a03228
[ 2503.515591] 1f40: c0a0329c 00000001 600000d3 c0a01f68 c01095f0 c01095e8 60000013 ffffffff
[ 2503.523754] [<c0102188>] (__irq_svc) from [<c01095e8>] (arch_cpu_idle+0x24/0x34)
[ 2503.531156] [<c01095e8>] (arch_cpu_idle) from [<c01397e0>] (do_idle+0x164/0x200)
[ 2503.538539] [<c01397e0>] (do_idle) from [<c0139b18>] (cpu_startup_entry+0xc/0x10)
[ 2503.546005] [<c0139b18>] (cpu_startup_entry) from [<c0900ccc>] (start_kernel+0x39c/0x444)
[ 2503.554158] Code: e1a03004 e5824000 e2a00000 e0824184 (e5820004)
[ 2503.560232] ---[ end trace 0b8c5897efa10081 ]---
[ 2503.564834] Kernel panic - not syncing: Fatal exception in interrupt
[ 2503.571166] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
使用aodzip的buildroot-tiny200
屏幕是1024*600, RGB的(Sinlinx的7寸RBG).
修改了uboot_deconfig.
make sippeed_lichee_nano_deconfig
make
下载到spiflash运行。 如果uboot打印到屏幕,显示正常的。
进入linux, fbset发现是480x272的。
修改linux的dts里面的pannel.(“etron-dy,e231732"看这个分辨率一样,rgb666), 编译,写入flash,运行:
panel: panel {
compatible = "netron-dy,e231732", "simple-panel";
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
panel_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
运行的有错误。
[ 1.235407] fb0: switching to sun4i-drm-fb from simple
[ 1.243647] [drm] Initialized sun4i-drm 1.0.0 20150629 for soc:display-engine on minor 0
[ 1.252675] [drm] kms: can't enable cloning when we probably wanted to.
[ 1.260758] sun4i-drm soc:display-engine: [drm:drm_fbdev_client_hotplug] *ERROR* fbdev: Failed to setup generic emulation (ret=-12)
请问哪里还需要修改?
谢谢。
好几天没搞好,郁闷。 过来求一个。也不知道自己哪里设置不对。
测试同一个QT的opengl例子:
使用全志库,失败信息如下:
...
Got keys from plugin meta data ("webp")
QFactoryLoader::QFactoryLoader() checking directory path "/boot/imageformats" ...
loaded library "/usr/lib/qt/plugins/imageformats/libqgif.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqicns.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqico.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqjpeg.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqsvg.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqtga.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqtiff.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqwbmp.so"
loaded library "/usr/lib/qt/plugins/imageformats/libqwebp.so"
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/boot/styles" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/accessiblebridge" ...
QFactoryLoader::QFactoryLoader() checking directory path "/boot/accessiblebridge" ...
EGL Error : Could not create the egl surface: error = 0x3003
Aborted
转用主线开源lima+mesa3d.测试同样的qt例子。
...
Got keys from plugin meta data ("eglfs_kms")
QFactoryLoader::QFactoryLoader() checking directory path "/boot/egldeviceintegrations" ...
loaded library "/usr/lib/qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so"
MESA-LOADER: failed to open lima: /usr/lib/dri/lima_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
failed to load driver: lima
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri)
failed to load swrast driver
Could not create GBM device (No such file or directory)
Could not open DRM device
Aborted
目标板的rootfs根本就没有这个目录。 是虚拟机上的ubuntu的, 它怎么去那里找。
运行的程序也没有opengl的调用啊。
执行个非OPENGL的代码怎么都要去找opengl库。 下面这个analogclock经典程序也是这个问题。
# /boot/analogclock -platform linuxfb
/boot/analogclock: error while loading shared libraries: /home/gzpeite/buildroot-2019.11.3/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libGLESv2.so: cannot open shared object file: No such file or directory
使用buildroot2019生成的kenerl 和 rootfs。
执行一个qt的程序, 之搜索编译路径,确认usr/lib下面那些库都在的,竟然没去搜索。
不知道哪里需要设定,谢谢。 (同样的xxx_defconfig文件, buildroot2020.8 版本我没碰到这个问题)
# /boot/dynamicspline -platform linuxfb
/boot/dynamicspline: error while loading shared libraries: /home/gzpeite/buildroot-2019.11.3/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libGLESv2.so: cannot open shared object file: No such file or directory
# export
export EDITOR='/bin/vi'
export HOME='/root'
export LD_LIBRARY_PATH='/lib:/usr/lib/'
export LOGNAME='root'
export PATH='/bin:/sbin:/usr/bin:/usr/sbin'
export PS1='# '
export PWD='/root'
export QT_PLUGIN_PATH='/usr/lib/qt/plugins/'
export QT_QPA_FONTDIR='/usr/share/fonts/liberation/'
export SHELL='/bin/sh'
export SHLVL='1'
export TERM='vt100'
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE='/dev/input/event1'
export USER='root'
使用buildroot生成的img。
make xxx_defconfig
make linux-menuconfig (设定DRM_FBDEV_LEAK_PHYS_SMEM 需要的依赖,修改overalloc=400)
make生成img,在tf卡上运行测试的。
由于不会编译mali/test. 所以编译了qt的2dpainting测试。结果如何。
内核: 5.4.142
下面是引用大神的总结。(第四条是自己加的:))
1. Must enable DRM_FBDEV_LEAK_PHYS_SMEM from kernel 确认已选择
2. set drm_leak_fbdev_smem on compile time (for some reason, passing in command line did not help) in drm_fb_helper.c 确认已设定true(有两个地方)
3. use latest r8p1 使用buildroot生成的mali.ko.
4. CONFIG_DRM_FBDEV_OVERALLOC=400 从100修改到了400。
insmod /lib/modules/5.4.142/extra/mali.ko
[ 62.494686] mali: loading out-of-tree module taints kernel.
[ 62.511242] Allwinner sunXi mali glue initialized
[ 62.516464] Mali:
[ 62.516469] Found Mali GPU Mali-400 MP r1p1
[ 62.523508] Mali:
[ 62.523512] 2+0 PP cores initialized
[ 62.529704] Mali:
[ 62.529707] Mali device driver loaded
[ 62.535946] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
# ./2dpainting -platform eglfs linuxfb
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL Error : Could not create the egl surface: error = 0x3003
Aborted
感谢。
参考地址:
https://github.com/linux-sunxi/sunxi-mali/
在vmware的ubuntu 18.4下面执行。make test 提示如下:
gzpeite@PET:~/sunxi-mali$ make test
make -f Makefile.config
make[1]: Entering directory '/home/gzpeite/sunxi-mali'
ABI="" (Detected)
Makefile.config:37: Unknown/unhandled ABI ""
Makefile.config:38: Use ABI=armel or ABI=armhf instead
Makefile.config:39: *** Unknown/unhandled ABI "". Stop.
make[1]: Leaving directory '/home/gzpeite/sunxi-mali'
Makefile:12: recipe for target 'config.mk' failed
make: *** [config.mk] Error 2
请问这个是arm库没配置好吗?如何配置呢?
谢谢
找到一些线索, 还的清大神们帮忙看看; 读取文件大了就会出错。 不知道哪里毛病。
# 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
。。。挂机了
两个问题:
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可以正常运行。 所以这里不怀疑板子硬件。
请各位高手指点一下。
谢谢。
楼主,这个问题我已经解决了,在你进行了分区后,之后进入uboot界面,手动输入boot.cmd中的各个命令,看是否能够让系统跑起来,能够跑起来的话,你这样的分区就没有问题,你的boot.cmd应该通过这个指令生成boot.src
mkimage -C none -A arm -T script -d boot.cmd boot.src
看看是否能够从emmc启动。
前几个礼拜忙别的。 今天回来继续折腾。
很高兴看到同路的。 你讲的不够详细。 你的意思是我分区有问题?
我在tf卡启动后的系统里面做的。 拿掉tf卡就卡在主题描述的位置。
那你是在哪里输入boot.cmd呢? 用tf卡启动进入uboot?
我的uboot是buildroot里面编译的,准备单独去下载编译一个看看。
谢谢。
这里顺便问一下: boot0里面会打印信息的吗?
同样的uboot,在tf卡上启动到uboot里面。可以看到emmc的。 还有哪里需要检查。 感谢。
U-Boot SPL 2020.07 (Jul 28 2020 - 21:14:53 +0800)
DRAM: 1024 MiB
Trying to boot from MMC1
U-Boot 2020.07 (Jul 28 2020 - 21:14:53 +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... *** Warning - bad CRC, using default environment
Setting up a 1024x600 lcd console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Net:
Warning: usb_ether using MAC address from ROM
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... 2 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
=>
mms list
Unknown command 'mms' - try 'help'
=> mmc list
mmc@1c0f000: 0
mmc@1c11000: 1 (eMMC)
=> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
=> mmc party
mmc - MMC sub system
Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc wp - power on write protect boot partitions
mmc hwpartition [args...] - does hardware partitioning
arguments (sizes in 512-byte blocks):
[user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
[gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
[check|set|complete] - mode, complete set partitioning completed
WARNING: Partitioning is a write-once setting once it is set to complete.
Power cycling is required to initialize partitions after set to complete.
mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
- Set the BOOT_BUS_WIDTH field of the specified device
mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
- Change sizes of boot and RPMB partitions of specified device
mmc partconf dev [boot_ack boot_partition partition_access]
- Show or change the bits of the PARTITION_CONFIG field of the specified device
mmc rst-function dev value
- Change the RST_n_FUNCTION field of the specified device
WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
mmc setdsr <value> - set DSR register value
=> mmc part
Partition Map for MMC device 1 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 2048 38913 00000000-01 0c
2 40961 15228927 00000000-02 83
=>
那这个SPL也在emmc里面,为什么可以运行的?
列出来uboot的.config的所有MMC关键字信息。帮我看看。谢谢。
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_MMC0_CD_PIN="PB4"
CONFIG_MMC1_CD_PIN=""
CONFIG_MMC2_CD_PIN=""
CONFIG_MMC3_CD_PIN=""
CONFIG_MMC1_PINS=""
CONFIG_MMC2_PINS=""
CONFIG_MMC3_PINS=""
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x50
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x0
# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is not set
# CONFIG_SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG is not set
# CONFIG_SPL_MMC_TINY is not set
# CONFIG_SPL_MMC_WRITE is not set
CONFIG_CMD_MMC=y
# CONFIG_CMD_MMC_SWRITE is not set
# CONFIG_ENV_IS_IN_MMC is not set
# CONFIG_DFU_MMC is not set
CONFIG_FASTBOOT_FLASH_MMC=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=1
# MMC Host controller Support
CONFIG_MMC=y
CONFIG_MMC_WRITE=y
# CONFIG_MMC_BROKEN_CD is not set
CONFIG_DM_MMC=y
# CONFIG_ARM_PL180_MMCI is not set
CONFIG_MMC_QUIRKS=y
CONFIG_MMC_HW_PARTITIONING=y
# CONFIG_SUPPORT_EMMC_RPMB is not set
CONFIG_SUPPORT_EMMC_BOOT=y
# CONFIG_MMC_IO_VOLTAGE is not set
# CONFIG_SPL_MMC_IO_VOLTAGE is not set
# CONFIG_MMC_HS400_ES_SUPPORT is not set
# CONFIG_SPL_MMC_HS400_ES_SUPPORT is not set
# CONFIG_MMC_HS400_SUPPORT is not set
# CONFIG_SPL_MMC_HS400_SUPPORT is not set
# CONFIG_MMC_HS200_SUPPORT is not set
# CONFIG_SPL_MMC_HS200_SUPPORT is not set
CONFIG_MMC_VERBOSE=y
# CONFIG_MMC_TRACE is not set
# CONFIG_MMC_DW is not set
# CONFIG_MMC_MXC is not set
# CONFIG_MMC_PCI is not set
# CONFIG_MMC_OMAP_HS is not set
# CONFIG_MMC_SDHCI is not set
CONFIG_MMC_SUNXI=y
# CONFIG_STM32_SDMMC2 is not set
参考这里(感谢):
https://whycan.cn/t_3633.html
ums无法设别成sdx之类的。也不清楚哪里问题。
我的步骤:
1. 使用TF卡启动。 将板载的emmc格式化,分区如下:
Disk /dev/mmcblk1: 7456 MB, 7818182656 bytes, 15269888 sectors
238592 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk1p1 32,0,1 640,0,1 2048 40960 38913 19.0M c Win95 FAT32 (LBA)
/dev/mmcblk1p2 640,0,2 1023,3,16 40961 15269887 15228927 7435M 83 Linux
2. 拷贝zImage, boot.scr, sunxi**.dtb到 mmcblk1p1. mmcblk1p2先空着。
boot.cmd内容如下:
fatload mmc 1:1 0x46000000 zImage
fatload mmc 1:1 0x49000000 sun8i-a33-sinlinx-sina33.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p2 rootwait panic=10
bootz 0x46000000 - 0x49000000
3. dd命令把 u-boot-sunxi-with-spl.bin写入mmcblk1。
4. tf开启动到uboot,修改过启动:
mmc partconf 1 0 7 0
5. 拿到tf卡,启动信息如下:
U-Boot SPL 2020.07 (Jul 28 2020 - 18:22:48 +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 ###
同样的 u-boot-sunxi-with-spl.bin写入tf卡的,启动没问题,可以进入系统的。
请大家帮忙分析一下。 谢谢了。
下面是正常启动系统的信息:
[mmc]: mmc driver ver 2014-8-11 15:06:39
[mmc]: ***Try SD card 2***
[mmc]: mmc 2 cmd 8 timeout, err 00000100
[mmc]: mmc 2 cmd 8 err 00000100
[mmc]: mmc 2 send if cond failed
[mmc]: mmc 2 cmd 55 timeout, err 00000100
[mmc]: mmc 2 cmd 55 err 00000100
[mmc]: mmc 2 send app cmd failed
[mmc]: ***Try MMC card 2***
[mmc]: MMC ver 5.0
[mmc]: SD/MMC Card: 4bit, capacity: 7456MB
[mmc]: vendor: Man 00110100 Snr 0079dbcc
[mmc]: product: 008G7
[mmc]: revision: 3.0
[mmc]: ***SD/MMC 2 init OK!!!***
sdcard 2 init ok
The size of uboot is 000c8000.
sum=142c7960
src_sum=142c7960
set_mmc_para,sdly 50M 0
set_mmc_para,sdly 25M 0
Succeed in loading uboot from sdmmc flash.
这个eMMC不是8bit的吗?
dts里面的配置:
&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
vmmc-supply = <®_dcdc1>;
bus-width = <4>;
cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>;
status = "okay";
};
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <®_dcdc1>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};
&mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
drive-strength = <40>;
/* eMMC is missing pull-ups */
bias-pull-up;
};
另外一个问题就是: 这个板子插上TF卡就无法启动。(串口没有任何信息)
又碰到新问题。折腾半天了。
进入fel,然后通过sunxi-fel uboot下载自己编译的uboot到目标板,运行的结果。
信息如下:
U-Boot SPL 2019.01-rc3-g829407b58f-dirty (Jul 26 2020 - 15:20:41 +0800)
DRAM: 1024 MiB
Trying to boot from FEL
U-Boot 2019.01-rc3-g829407b58f-dirty (Jul 26 2020 - 15:20:41 +0800) Allwinner Technology
CPU: Allwinner A33 (SUN8I 1667)
Model: Sinlinx SinA33
DRAM: setup_dest_addr1 GiB
MMC: MMC0: 01c20060 = 0x1004140, 01c20088 = 0x0, 01c202c0 = 0x1004140
MMC2: 01c20060 = 0x1004540, 01c20090 = 0x0, 01c202c0 = 0x1004540
mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
Setting up a 1280x720 lcd console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Net:
Warning: usb_ether using MAC address from ROM
eth0: usb_ether
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
scanning bus 0 for devices... 2 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
=>
=>
=> mmc rescan
MMC: no card present
=> mmc info
MMC: no card present
=> mmc dev 1
Card did not respond to voltage select!
=> mmc list
mmc@1c0f000: 0
mmc@1c11000: 1
=> mmc dev 1
Card did not respond to voltage select!
板子自己运行可以从emmc启动系统。 系统是通过phoenixUSBpro写入的。
emmc的电压也从3.0改到3.3还是上面提示。
有碰到给个建议。 估计boot里面没搞对。
谢谢。
谁能在这里发我一个boot.scr文件? 读取zImage即可。 测试看看到底哪里问题, boot.scr可以读取。证明mmc没问题。 手动加载可以,证明文件也没问题。 就是出在boot.scr文件自身了。 非常感谢。 下面是boot.cmd。
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=5
fatload mmc 0:1 0x46000000 zImage
fatload mmc 0:1 0x49000000 sun8i-a33-sinlinx-sina33.dtb
bootz 0x46000000 - 0x49000000
Scanning mmc 0:1...
Found U-Boot script /boot.scr
286 bytes read@in 1 ms (279.3 KiB/s)
## Executing script at 43100000
Un
' - try 'help' '
**Unable to read file zImage
**Unable to read file sun8i-a33-sinlinx-sina33.dtb
' - try 'help'd '
SCRIPT FAILED: co`tinuing...
22856 bytes read in 2 ms (10.9 MiB/s)
switch to partitions #0, OK
mmc1(part 0) is current device
** Unrecognized filesystem type **
上面是信息部分内容。感谢。
手动执行可以。 boot.cmd如下:
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=5
fatload mmc 0:1 0x46000000 zImage
fatload mmc 0:1 0x49000000 sun8i-a33-sinlinx-sina33.dtb
bootz 0x46000000 - 0x49000000
下载地址 : git clone https://github.com/linux-sunxi/u-boot-sunxi u-boot-sunxi
使用configs/Sinlinx_SinA33_defconfig
编辑对应的.dts文件。主要是TF-CD不同。
emmc硬件连接相同。 配置1G+8G.
编译通过,通过dd写入后启动的信息如下。
u-boot运行两次。第二次DRAM是0了? 帮忙分析一下。谢谢了。
=========================以下输出信息。
U-Boot SPL 2019.01-rc3-g829407b-dirty (Jun 14 2020 - 17:00:38 +0800)
DRAM: 1024 MiB
U-Boot SPL 2019.01-rc3-g829407b-dirty (Jun 14 2020 - 17:00:38 +0800)
DRAM: 0 MiB
### ERROR ### Please RESET the board ###
有空继续折腾中。 今天碰到新问题,还请大侠帮忙分析:
1. 用最新的kernel(5.7)替换原先的3.4的kernel。
2. 改了sunxi_defconfig。 编译顺利完成。 也可以按照厂家的方法打包成功。生成的img文件烧录后。卡在starting kernel。。。
百度后怀疑是设备树。 但是我在厂家提供的SDK方式的包里面没看到有对应的设备树文件。大家给点思路。
新问题: 只是升级kernel部省级uboot可以吗?
下面是uboot信息:
U-Boot 2011.09-rc1-00000-g1030d04-dirty (Jun 05 2020 - 19:41:27) Allwinner Technology
谢谢。
目前购买了PET-A33-P01, 看中他们提供QT5.8+Linux和Android 6.0。 目前Android运行没问题。
Linux+QT 想折腾一下OPENGL。 搜索到这个网站,需要入主线。有几个问提请教一下大侠(有点小白)。
以下都在ubuntu的虚拟机完成的。
1. 按照 https://whycan.cn/t_3643.html 这个里面说明,是通过外部TF卡启动的。我还是想保留原有的EMMC方式。前三步已完成。
2. 生成的u-boot-sunxi-with-spl.bin, 是通过sunxi-fel把这个uboot二进制文件写入eMMC的吗? 硬件是OTG口吗?
3. 如果写入新的uboot之后还能回去厂家提供的SDK方式吗? 如果uboot有错误,如果救砖?
4. 厂家给的SDK编译步骤:a)编译内核,b)编译uboot, c)编译Rootfs:最后是pack成一个img文件,在windows下面通过PhoenixSuit写入的。这里的b)步骤有编译uboot,不知道是不是我得第二步编译的一样呢(当然有硬件管脚问题,这个已经修改)?就是说每次通过windows软件写入的image包含了uboot+linux内核+。。。。 那第二步的问题是可以通过windows软件PhoenixSuit写uboot,只不过这个软件只认img文件。
5. 可否偷梁换柱的方式,把内核换掉而已呢?
谢谢回复。
页次: 1