Page 1 of 1

Emulating the pi in Windows

Posted: Tue Feb 18, 2014 10:14 pm
by Calumcb
Recently I have been trying to emulate the raspberry pi in windows for various reasons. I have been trying to use QEMU because it was recommended to me by lots of people. I keep getting an error which I cant seem to overcome despite lots of things I have been trying. the error does not say it is an error, but it gets stuck on 'Freeing init memory: 132K' for ever until I force close QEMU. It seemed to work in an older version of raspbian (can't remember which one), but now on the 2014-01-07 distro it just gets stuck. Please if anyone has any ideas I would much appreciate them.

Re: Emulating the pi in Windows

Posted: Wed Feb 19, 2014 10:54 pm
by DougieLawson
Here's the qemu.bat file I created for my system.

Code: Select all

"C:\Users\Dougie\Qemu\qemu-system-armw" -kernel kernel-qemu.new ^
-cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio ^
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" ^
 -hda c:\Users\Dougie\Qemu\Raspbbian-Freddy.resized.img ^
-net nic  -net tap,ifname=OpenVPN
you MUST use "-m 256" or qemu won't start.

I'm using the tap interface (installed with OpenVPN) to get connectivity to my qemu system.

Re: Emulating the pi in Windows

Posted: Tue May 20, 2014 8:16 am
by docwyatt2001
Have you managed to get this working with other distro's besides Raspian?

Re: Emulating the pi in Windows

Posted: Tue May 20, 2014 1:50 pm
by DougieLawson
docwyatt2001 wrote:Have you managed to get this working with other distro's besides Raspian?
No, because it needs a special kernel built for Qemu and I don't know how to do that.

Re: Emulating the pi in Windows

Posted: Tue May 20, 2014 1:58 pm
by bmarkus
You can run the latest piCore-5.3 in QEMU, see article

http://forum.tinycorelinux.net/index.ph ... 080.0.html

Re: Emulating the pi in Windows

Posted: Wed May 21, 2014 8:39 am
by ruphert
Thanks for QEMU link.

Re: Emulating the pi in Windows

Posted: Thu May 22, 2014 5:22 am
by docwyatt2001
I have previously gotten Raspian working fine. But I am doing some work under ArchLinux (and Arkos), and after some research, there was mention that Arch needed some additional changes to the kernel to work. Using the script located here (https://github.com/johnlane/rpi-utils), I created the kernel as supposed to. But as shown on the attached image, it kernel panics...
QEMU-Windows-ARM-Arch Linux.png
QEMU-Windows-ARM-Arch Linux.png (62.64 KiB) Viewed 2625 times
The more frustrating thing is, using the same files under Ubuntu - works happily - just not Windows.