qemu可以模拟很多开发板,这儿选定了一款vexpress-a9,建立以下工作目录
mkdir ~/qemu cd ~/qemu mkdir vexpress-a9 cd vexpress-a9
以后,所有基于vexpress-a9板子的实验都会在该目录进行
首先,去ftp://ftp.denx.de/pub/u-boot/下载最新版本U-Boot,u-boot-2015.10.tar.bz2
解压:tar zxvf u-boot-2015.10.tar.bz2
cd u-boot-2015.10
由于使用了gcc-arm-linux-gnu编译器,需要在Makefile中指定ARCH及CROSS_COMPILE
vi Makefile
增加以下两行
ARCH ?= arm CROSS_COMPILE ?= arm-none-eabi-
保存,然后编译
make vexpress_ca9x4_defconfig make
ls的结果如下:
[llp@llp u-boot-2015.10]$ ls api disk include MAKEALL snapshot.commit u-boot.cfg arch doc Kbuild Makefile System.map u-boot.lds board drivers Kconfig net test u-boot.map common dts lib post tools u-boot.srec config.mk examples Licenses README u-boot configs fs MAINTAINERS scripts u-boot.bin
此时,直接执行这条命令就能跑u-boot了
qemu-system-arm -M vexpress-a9 -m 256M -nographic -kernel u-boot
利用qemu学习嵌入式linux(二)—— Debug U-Boot
原文:http://www.cnblogs.com/leop/p/5109347.html