2013年8月30日 星期五

Emulate VersatilePB board on QEMU

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- versatile_defconfig
$> make ARCH=arm menuconfig
------------------------------------------------------------------------------------------------------------

Kernel Features  --->
     [*] Use the ARM EABI to compile the kernel                                          
     [*]   Allow old ABI binaries to run with this kernel (EXPERIMENTAL) (NEW)

------------------------------------------------------------------------------------------------------------
Now we can build zImage:
$> make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zImage
Emulate:
$> qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/zImage -initrd ../rootfs.img.gz -append "root=/dev/ram rdinit=/sbin/init"



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"

沒有留言:

張貼留言