页次: 1
最近在搞全志H3从emmc启动,调了两天还是没搞懂,想请各位大佬给的建议。
我是用的buildroot-2022.05.1 + uboot-2022.01 + linux-5.19.3。
我现在修改了kernel里的dts,把mmc2打开了,用sd卡启动,能看到有/dev/mmcblk2,并且能够正常进行读写操作。
# dd if=./sdcard.img of=/dev/mmcblk2 bs=4M
77+1 records in
77+1 records out
uboot config里加上了CONFIG_MMC_SUNXI_SLOT_EXTRA=2,使用dd命令把镜像写到emmc,拔掉sd卡启动,能看到uboot
是我重新编译的,但是找不到emmc。
uboot配置:
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-duo2"
CONFIG_SPL=y
CONFIG_MACH_SUN8I_H3=y
CONFIG_DRAM_CLK=408
CONFIG_BOOTDELAY=5
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
在uboot里使用mmc list命令,发现两个mmc设备的寄存器分别是mmc0和mmc1,实际上emmc在mmc2上,寄存器是0x01c11000。
拔掉sd卡启动log如下:
U-Boot SPL 2022.01 (Jan 19 2024 - 14:18:40 +0800)
DRAM: 512 MiB
Trying to boot from MMC2
U-Boot 2022.01 (Jan 19 2024 - 14:18:40 +0800) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: FriendlyARM NanoPi Duo2
DRAM: 512 MiB
WDT: Not starting watchdog@1c20ca0
MMC: mmc@1c0f000: 0, mmc@1c10000: 2
Loading Environment from FAT... In: serial@1c28000
Out: serial@1c28000
Err: serial@1c28000
Net: No ethernet found.
Hit any key to stop autoboot: 0
=> mmc list
mmc@1c0f000: 0
mmc@1c10000: 2
=> mmc info
MMC: no card present
=> mmc dev 2
Card did not respond to voltage select! : -110
@unturned3
代码上传到 https://github.com/Lisy051/v3s_h264_udp 了
只在你的基础上做了一点点修改
hi unturned3,
我这边运行demo报错了,kernel-5.19.3,找不到/dev/media0,需要修改什么地方吗?
# ./h264enc_demo 1280 720 30 500
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : cedarc <LogVersionInfo:40>:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cedar Codec <<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag : createBranch_customize_sylix
branch: CedarC-v1.1.9
commit: 4a182bd42c931bea2f77b0ff9a531d233df8541e
date : Thu May 25 15:34:03 2017 +0800
author: jenkins8080
patch :
----------------------------------------------------------------------
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195)
debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210)
debug : cedarc <BitStreamCreate:102>: BitStreamCreate OK
Info: h264 encocder init OK
open /dev/media0: No such file or directory
Error: cam_media_init() failed
Error: cam_init() failed
debug : cedarc <VeRelease:1253>: ve release ok
页次: 1