2013年8月30日 星期五

Emulate Vexpress-a15 board on QEMU .............. (using Device Tree)

Download Linux Kernel 3.45 first:
$> wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.45.tar.bz2
$> tar xvf linux-3.4.45.tar.bz2

Configure:
$> make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- vexpress_defconfig
$> make ARCH=arm menuconfig
------------------------------------------------------------------------------------------------------------
System Type  --->
     Versatile Express platform type  --->
          [*] Device Tree support for Versatile Express platforms
------------------------------------------------------------------------------------------------------------
Now we can build zImage:
$> make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage
Build dtb:
$> make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- vexpress-v2p-ca15-tc1.dtb
Emulate:
$> qemu-system-arm -M vexpress-a15 -serial stdio -dtb ./vexpress-v2p-ca15-tc1.dtb -kernel zImage -initrd rootfs.img -append "root=/dev/ram rdinit=/sbin/init  console=ttyAMA0"



PS:
1 You can install QEMU in UBUNTU by:
$> sudo apt-get install qemu qmeu-kvm-extras
2 "CROSS_COMPILE=arm-none-linux-gnueabi-" depends on your toolchain.
3 rootfs.img.gz can be found in my old post named "Build Rootfs by Busybox for ARM on QEMU"
4 You can see vexpress-v2p-ca15-tc1.dts in path arch/arm/boot/dts

1 則留言: