還是模擬 VEXPRESS-A9.
起初,我用的還是qemu官網(wǎng)里的最新代碼編出的qemu程序。
u-boot從下面的網(wǎng)址獲得:
http://ftp.denx.de/pub/u-boot/
取得是最新的代碼。解壓后,配置,編譯:
make vexpress_ca9x4_config
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
make vexpress_ca9x4_config
make
然后,用 qemu運(yùn)行 u-boot:
qemu-system-arm -M vexpress-a9 -serial stdio -kernel u-boot
結(jié)果,qemu的窗口出來了,但卻沒有任何輸出,程序好像是deadlock 在某一個(gè)地方了。
根據(jù)網(wǎng)上建議的方法調(diào)試如下:
1. 先運(yùn)行
qemu-system-arm -M vexpress-a9 -serial stdio -kernel u-boot -s -S
然后,在另一個(gè)虛擬終端窗口執(zhí)行:
arm-linux-gnueabi-gdb u-boot
.....
(gdb) target remote localhost:1234
最終發(fā)現(xiàn),程序執(zhí)行了下面的匯編執(zhí)行后就 stuck 那里了
mcr p15, 0, r0, c12, c0, 0 @Set VBAR
(在文件 u-boot-2013.10/arch/arm/cpu/armv7/start.S里)
現(xiàn)在對(duì)arm的匯編還不熟悉,這個(gè)錯(cuò)誤不知道如何解決。。
所以,就換了另一個(gè)對(duì)arm支持較好的qemu版本: qemu-linaro??梢杂胓it拿到源碼。
git clone git://git.linaro.org/qemu/qemu-linaro.git
用編譯 qemu一樣的方法編譯 qemu-linaro.
然后,再嘗試運(yùn)行u-boot:
-
Linux
+關(guān)注
關(guān)注
87文章
11511瀏覽量
213843 -
u-boot
+關(guān)注
關(guān)注
0文章
122瀏覽量
38839 -
qemu
+關(guān)注
關(guān)注
0文章
57瀏覽量
5675
發(fā)布評(píng)論請(qǐng)先 登錄
U-Boot介紹
U-boot的基本介紹

Porting U-Boot to the Control
NIOS軟核處理器的Linux引導(dǎo)程序U-boot設(shè)計(jì)

u-boot的Makefile分析
U-Boot結(jié)構(gòu)功能介紹

嵌入式U-BOOT的啟動(dòng)流程及移植
u-boot簡介
U-Boot架構(gòu)淺析

Linux U-Boot開發(fā)指南

評(píng)論