simulate ( board vexpress_ca9x4) arm in qemu

reference:  http://www.cnblogs.com/pengdonglin137/p/5023704.html

1 )u-boot build(version:2017.05):

u-boot>make vexpress_ca9x4_defconfig ARCH=arm

u-boot>make menufonfig ARCH=arm

u-boot>make ARCH=arm CROSS_COMPILE=/arm/arm-2014.05/bin/arm-linux-none-gnueabi-

2) tap bridge install

root#>yum install bridge-util

root#>brctl addbr br0

root#>tunctl -u $USER -t tap0

root#>ifconfig tap 0 0.0.0 promisc up

root#> ifconfig br0 192.168.11.20 up

root#> brctl addif br0 tap0


3) tftp install

troot#>yum install tftp tftp-server xinetd

> vi /etc/xinetd.d/tftp

service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot -c   // default is /var/lib/tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

4) make  file system

  1. dd if=/dev/zero of=a9rootfs.ext3 bs=1M count=32 //创建一个32M的空文件
  2. mkfs.ext3 a9rootfs.ext3 //格式化为EXT3
  3. sudo mount -t ext3 a9rootfs.ext3 a9rootdir/ -o loop //挂载到a9rootdir目录
  4. cp path/to/your/rootfs/* a9rootdir/ -Rf //拷贝文件到该目录,相对于放到a9rootfs.ext3里面
  5. sudo umount a9rootdir/

5)start qemu

a)

qemu-system-arm -nographic -m 512M -M vexpress-a9 -kernel u-boot -sd /arm/tftboot/a9rootfs.ext3 -net nic,vlan=0,macaddr=52:54:00:12:34:22,addr=08 -net tap,ifname=tap0,script=no,downscript=no

b) qemu-system-arm -kernel zImage -serial stdio -M vexpress-a9 -append "root=/dev/mmcblk0 console=ttyAMA0 console=tty0" -sd a9rootfs.ext3


note :

if uboot>tftp uImage is blocked ,try

sudo /sbin/iptables -I INPUT -p udp --dport 69 -j ACCEPT


6) linux3.3.7 build

[root@mo-cn-491 linux-3.3.7]# make ARCH=arm vexpress_defconfig

[root@mo-cn-491 linux-3.3.7]#make ARCH=arm menuconfig

[root@mo-cn-491 linux-3.3.7]#make ARCH=arm CROSS_COMPILE=/arm/arm-2014.05/bin/arm-none-linux-gnueabi-


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值