出错日志:
[33]HELLO! BOOT0 is starting!
[36]BOOT0 commit : 88480af
[38]set pll start
[40]periph0 has been enabled
[43]set pll end
[45][pmu]: bus read error
[47]board init ok
[49]ZQ value = 0x31
[51]get_pmu_exist() = -1
[53]ddr_efuse_type: 0xa
[55]trefi:7.8ms
[57][AUTO DEBUG] single rank and full DQ!
[61]ddr_efuse_type: 0xa
[63]trefi:7.8ms
[66][AUTO DEBUG] rank 0 row = 13
[69][AUTO DEBUG] rank 0 bank = 4
[72][AUTO DEBUG] rank 0 page size = 2 KB
[75]DRAM BOOT DRIVE INFO: V0.33
[78]DRAM CLK = 528 MHz
[80]DRAM Type = 2 (2:DDR2,3:DDR3)
[84]DRAMC read ODT off.
[86]DRAM ODT off.
[88]ddr_efuse_type: 0xa
[90]DRAM SIZE =64 M
[92]dram_tpr4:0x0
[94]PLL_DDR_CTRL_REG:0xf8002b00
[97]DRAM_CLK_REG:0xc0000000
[99][TIMING DEBUG] MR2= 0x0
[104]DRAM simple test OK.
[106]dram size =64
[108]card no is 0
[110]sdcard 0 line count 4
[112][mmc]: mmc driver ver 2021-04-2 16:45
[121][mmc]: Wrong media type 0x0
[124][mmc]: ***Try SD card 0***
[134][mmc]: HSSDR52/SDR25 4 bit
[137][mmc]: 50000000 Hz
[139][mmc]: 59607 MB
[141][mmc]: ***SD/MMC 0 init OK!!!***
[191]Loading boot-pkg Succeed(index=0).
[194]Entry_name = opensbi
[197]Entry_name = u-boot
[201]Entry_name = dtb
[204]mmc not para
[206]Jump to second Boot.
OpenSBI auto-t113-linux-V0.8-3-ge39e937
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs : 1
Current Hart : 0
Firmware Base : 0x41fc0400
Firmware Size : 75 KB
Runtime SBI Version : 0.2
MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0 : 0x0000000041fc0000-0�
U-Boot 2018.07-ge987def5 (Nov 07 2022 - 03:11:27 +0000) Allwinner Technology
[00.274]DRAM: 64 MiB
[00.276]Relocation Offset is: 01ee9000
[00.281]secure enable bit: 0
[00.284]CPU=720 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
sunxi flash map init
SPI ALL: ready
[00.295]flash init start
[00.297]workmode = 0,storage type = 1
[00.301][mmc]: mmc driver ver uboot2018:2021-12-20 13:35:00
[00.306][mmc]: get sdc_type fail and use default host:tm1.
FDT ERROR:fdt_get_all_pin:get property handle pinctrl-0 error:FDT_ERR_INTERNAL
[00.318][mmc]: get card0 default pin fail
[00.322][mmc]: can't find node "mmc0",will add new node
[00.327][mmc]: fdt err returned <no error>
[00.331][mmc]: Using default timing para
[00.334][mmc]: sunxi mmc pin set failed!
[00.338]error card no error
[00.341][mmc]: MMC Device -1 not found
fail to find one useful mmc card
initcall sequence 0000000043f91318 failed at call 000000004200df06 (err=-1)
### ERROR ### Please RESET the board ###
板子是开源的D1s nezha,我焊了便宜的F133B芯片。用虚拟机编译的固件发现sd卡无法启动,用了韦东山的D1s补丁发现sd启动正常。于是逐个文件对比,终于找到了问题。
/tina-d1-h/device/config/chips/d1s/configs/nezha/uboot-board.dts
在174行 pinctrl-0 = <&sdc0_pins_a>; 默认添加了注释,难怪找不到sd卡引脚,删除注释重新make 即可使用sd卡。一开始没看见,找了好几天问题