使用Qemu模拟Cortex-A9运行U-boot和Linux
转载: http://blog.chinaunix.net/uid-20273473-id-3267337.html
sudo apt-get insatll gcc-arm-linux-gnueabi sudo apt-get insatll g++-arm-linux-gnueabi
- arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
- Copyright (C) 2011 Free Software Foundation, Inc.
-
sudo apt-get install qemu qemu-system qemu-utils
- qemu-system-arm --version
- QEMU emulator version 1.0.50 (Debian 1.0.50-2012.03-0ubuntu2), Copyright (c) 2003-2008 Fabrice Bellard
- ARCH ?= arm
- CROSS_COMPILE ?= arm-linux-gnueabi-
- make ca9x4_ct_vxp_config
- make
- qemu-system-arm -M vexpress-a9 -m 256M -nographic -kernel u-boot
- qemu-system-arm -M vexpress-a9 -m 256M -serial stdio -kernel u-boot
#qemu-system-arm -M ? Supported machines are: beagle Beagle board (OMAP3530) beaglexm Beagle board XM (OMAP3630) ............ versatilepb ARM Versatile/PB (ARM926EJ-S) versatileab ARM Versatile/AB (ARM926EJ-S) vexpress-a9 ARM Versatile Express for Cortex-A9 vexpress-a15 ARM Versatile Express for Cortex-A15
- qemu-system-arm -M vexpress-a9 -m 256M -nographic -kernel u-boot
- U-Boot 2012.04 (Jul 08 2012 - 00:14:08)
- DRAM: 256 MiB
- WARNING: Caches not enabled
- Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB
- ## Unknown flash on Bank 2 - Size = 0x00000000 = 0 MB
- *** failed ***
- MMC: MMC: 0
- *** Warning - bad CRC, using default environment
- In: serial
- Out: serial
- Err: serial
- Net: smc911x-0
- Hit any key to stop autoboot: 0
- VExpress#
- VExpress# printenv
- baudrate=38400
- bootcmd=run bootflash;
- bootdelay=2
- bootflash=run flashargs; cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; bootm ${kernel_addr} ${ramdisk_addr_r}
- console=ttyAMA0,38400n8
- 。。。。。
- make vexpress_defconfig
- dd if=/dev/zero of=a9rootfs.ext3 bs=1M count=32 //创建一个32M的空文件
- mkfs.ext3 a9rootfs.ext3 //格式化为EXT3
- sudo mount -t ext3 a9rootfs.ext3 a9rootdir/ -o loop //挂载到a9rootdir目录
- cp path/to/your/rootfs/* a9rootdir/ -Rf //拷贝文件到该目录,相对于放到a9rootfs.ext3里面
- sudo umount a9rootdir/
- qemu-system-arm -kernel zImage -serial stdio -M vexpress-a9 -append "root=/dev/mmcblk0 console=ttyAMA0 console=tty0" -sd a9rootfs.ext3
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。