U-Boot Boot(1)

U-Boot 載入 Kernel 時會初始化 UART console

U-Boot

Start Kernel 後造成亂碼可能是 UART console 初始化失敗

可以檢查:

1
2
board\company\model\xxx.S
nand_spl\board\company\model\xxx.S

使用 assembly code init

組語紀錄

1
2
3
4
5
6
7
loop:
LDR R1, =CPU_REGISTER ; R1 = CPU_REGISTER
LDR R3, [R2], #4 ; R3 = [R2]; R2 = R2+4;
ADD R0, R0, R3 ; R0 = R0 + R3
SUBS R1, R1, #1 ; R1 = R1 – 1; if (R1 > 0)
BGT loop ; goto Loop;
STR R0, sum ; sum = R0