首页 > 系统服务 > 详细

利用qemu学习嵌入式linux(二)—— Debug U-Boot

时间:2016-01-07 13:17:10      阅读:227      评论:0      收藏:0      [点我收藏+]

一,编译并运行

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

二,CodeBlocks图形调试环境

 

利用qemu学习嵌入式linux(二)—— Debug U-Boot

原文:http://www.cnblogs.com/leop/p/5109347.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!