之后第一次启动Linux,登陆系统后,Linux不再有响应。后续启动Linux,有时在打印分配网络地址信息后,Linux不再有响应;有时打印emmc的错误信息后,,Linux不再有响应。后来更是没法从SD卡启动。
下面是emmc的错误信息:
```
[ 19.055784] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[ 19.071676] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 29.163776] mmc0: Timeout waiting for hardware cmd interrupt.
[ 29.169512] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 29.175944] mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00001002
[ 29.182376] mmc0: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 29.188809] mmc0: sdhci: Argument: 0x00000c00 | Trn mode: 0x00000000
[ 29.195241] mmc0: sdhci: Present: 0x01ff0000 | Host ctl: 0x00000001
[ 29.201674] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000080
[ 29.208106] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x0000fa07
[ 29.214539] mmc0: sdhci: Timeout: 0x00000000 | Int stat: 0x00018000
[ 29.220972] mmc0: sdhci: Int enab: 0x00ff0083 | Sig enab: 0x00ff0083
[ 29.227404] mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000001
[ 29.233837] mmc0: sdhci: Caps: 0x35ecc881 | Caps_1: 0x00002007
[ 29.240269] mmc0: sdhci: Cmd: 0x0000341a | Max curr: 0x00000000
[ 29.246701] mmc0: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000
[ 29.253134] mmc0: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000
[ 29.259566] mmc0: sdhci: Host ctl2: 0x00000000
[ 29.264002] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x0000000000000000
[ 29.271129] mmc0: sdhci: ============================================
```
在SDK里创建一个FSBL, 在文件的开始处添加“#define FSBL_DEBUG_DETAILED”,编译后运行,得到如下信息:
```
Xilinx Zynq MP First Stage Boot Loader
Release 2018.3 Oct 30 2019 - 15:19:20
Reset Mode : System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZU7EV
FMC VADJ Configuration Successful
Board Configuration successful
Processor Initialization Done
================= In Stage 2 ============
eMMC Boot Mode
XFSBL_ERROR_UNSUPPORTED_BOOT_MODE
Boot Device Initialization failed 0x6
================= In Stage Err ============
Fsbl Error Status: 0x0
```
FSBL检查到启动模式是eMMC, 对应值是0110。原来的启动模式是SD1, 对应值是1110。比较发现,启动模式的第四位发生了改变。重新设置拨码开关为SD1,也就是把sw6.4设置为off,再启动Linux,登陆系统后,Linux工作正常。
之前原因可能是sw6.4被碰到了一个中间位置。