So here I was watching video lectures on Open Security Training , I stumbled across the Intro to ARM course.
for all you windows users who want to setup ARM VM using qemu on Windows, follow these instructions as the one mentioned on Authors Blog didn’t work out for me.
Step 1:
Download qemu from
either w32 or w64 and install it.
Add the directory to your PATH variable, which in my case was
H:\Program Files (x86)\qemu
Step 2:
Get image:
wget http://releases.linaro.org/images/12.03/oneiric/nano/vexpress-a9-nano.img.gz
gunzip vexpress-a9-nano.img.gz
You can either download the attached vmlinuz , initrd.img
https://www.dropbox.com/s/u7l4nc09lyb0uqz/initrd.img?dl=0
https://www.dropbox.com/s/ftdqyu74uwfut5s/vmlinuz?dl=0
OR
extract them yourselves from the vexpress.img
Get image:
wget http://releases.linaro.org/images/12.03/oneiric/nano/vexpress-a9-nano.img.gz
gunzip vexpress-a9-nano.img.gzExtract kernel and initrd:
(IMG=vexpress.img ; if [ -e “$IMG” ] ; then sudo mount -o loop,offset=”$(file “$IMG” | awk ‘BEGIN { RS=”;”; } /partition 2/ { print $7*512; }’)” -t auto “$IMG” /mnt/mnt; else echo “$IMG not found”; fi )
sudo cp -vr /mnt/mnt/boot .
sudo chown -R youruser:youruser boot
sudo umount /mnt/mntYou end up with a number of images in .boot:
abi-3.3.0-1800-linaro-lt-vexpress-a9
config-3.3.0-1800-linaro-lt-vexpress-a9
initrd.img-3.3.0-1800-linaro-lt-vexpress-a9
System.map-3.3.0-1800-linaro-lt-vexpress-a9
vmlinuz-3.3.0-1800-linaro-lt-vexpress-a9Copy the original vexpress image, vmlinuz.* and initrd.* somewhere where you want to keep your VM.
It will end up looking something like this
Step 3:
open command windows inside the directory where you extracted vexpress.img , vmlinuz , initrd.img and run following command
qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -kernel ./vmlinuz -initrd ./initrd.img -redir tcp:5022::22 -m 1024 -append “root=/dev/mmcblk0p2 vga=normal mem=512M devtmpfs.mount=0 rw” -drive file=vexpress.img,if=sd,cache=writeback
you can create a batch file if you don’t want to do it everytime you want to run a VM.
https://www.dropbox.com/s/atleeoke4zzajer/launchemu.bat?dl=0