capslock118
Posts: 43
Joined: Wed Mar 21, 2012 6:25 pm
Location: New Haven, CT
Contact: Website

Re: Emulating Raspberry Pi in Windows the easy way

Fri Jun 01, 2012 12:34 am

@mjlally,

I already had the GEMU installation and already downloaded a copy of debian sqeeze from rasppi. I could not get the thing to work with the different kernels and initrds i tried.

I'm not sure what my problem was but your batch script and zImage_3.1.9 did the trick. Thank you for your efforts!

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jun 04, 2012 2:11 pm

I have been trying to get networking running in the latest versions of qemu for windows but I'm afraid I've had no luck yet and there is a limit to how much time I can spend on this.

If the colour/screen size/resolution problem in the older version of qemu is a problem the solution would seem to be to use vnc to remote desktop into the virtual raspberry pi.

It may prove easier to put up simple instructions + download for this work around. Will see what I can do. I will see whether I can cobble something together. Hopefully the real pi will be shipping in sufficient quantities for this not to be much of an issue for very long!

capslock118
Posts: 43
Joined: Wed Mar 21, 2012 6:25 pm
Location: New Haven, CT
Contact: Website

Re: Emulating Raspberry Pi in Windows the easy way

Fri Jun 08, 2012 5:59 pm

this should be a simple question.

if I do work on a given image, create/save files, install programs, etc. these files persist in the image; meaning that if I shutdown qemu and boot it back up, the data is still there.

Can I still use this 'modified' image on my raspberry pi or should I consider whatever work I do in qemu practice and I would have to install a clean image onto the pi?

I could try this out myself but I do not have a pi yet :).

-joel

User avatar
Vindicator
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
Contact: Website

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jun 09, 2012 6:02 am

Found this solution for the keymap hangs during boot up so I thought I would share the link.
http://www.raspberrypi.org/phpBB3/viewt ... 249#p79249
sudo setupcon
This command stops the keymap hanging while the emulator is starting up.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.

User avatar
g1uup
Posts: 6
Joined: Thu Jan 12, 2012 6:48 am
Location: Deep South (Of England)

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jun 09, 2012 6:21 am

Sorry if I'm being particularly dense here guys but where exactly is the download link for this?
I looked through all the posts and can't seem to see it anywhere.

Am I missing something?

Yours Confused but Hopeful :?

G1UUP (AKA Andy R)
In a world without walls or fences you don't need windows or gates :)

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jun 09, 2012 9:05 am

g1uup wrote:Sorry if I'm being particularly dense here guys but where exactly is the download link for this?
I looked through all the posts and can't seem to see it anywhere.

Am I missing something?

Yours Confused but Hopeful :?

G1UUP (AKA Andy R)

Hi there,

link is here

http://sourceforge.net/projects/rpiqemuwindows/

User avatar
truehl
Posts: 642
Joined: Sun Mar 04, 2012 6:47 pm
Contact: Website

Re: Emulating Raspberry Pi in Windows the easy way

Sun Jun 10, 2012 7:08 am

Hi,
I tried to get it running on AMD Windows 7 64 Bit. A Dos box opens for 1ms and nothing else happens. I can not see the message showing in the Dos box, because of the very short display time.

Any suggestion?

Thanks a lot,
Thomas
truehl
http://www.squeezeplug.de

ferrymanr
Posts: 61
Joined: Fri Mar 16, 2012 11:09 pm

Re: Emulating Raspberry Pi in Windows the easy way

Fri Jun 22, 2012 10:12 am

I am wondering if it is possible to use the emulator as is for the wheezy beta image. I could add the wheezy image to the RPi Emulation\quemu directory and alter the run.bat in that directory to use the new image but not sure about the zImage_3.1.9. I hear wheezy is a real improvement over squeezy.
Richard

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jun 23, 2012 10:55 pm

ferrymanr wrote:I am wondering if it is possible to use the emulator as is for the wheezy beta image. I could add the wheezy image to the RPi Emulation\quemu directory and alter the run.bat in that directory to use the new image but not sure about the zImage_3.1.9. I hear wheezy is a real improvement over squeezy.
Richard
I think it should work if you put the new debian image in the same folder and just change the debian image name in the run.bat file. Will test when I can.

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jun 23, 2012 11:01 pm

capslock118 wrote:this should be a simple question.

if I do work on a given image, create/save files, install programs, etc. these files persist in the image; meaning that if I shutdown qemu and boot it back up, the data is still there.

Can I still use this 'modified' image on my raspberry pi or should I consider whatever work I do in qemu practice and I would have to install a clean image onto the pi?

I could try this out myself but I do not have a pi yet :).

-joel
Not sure if you got your pi yet. I got mine today so will test an image with several changes made to it on a real R Pi and tell you how it goes. It should work, however, proof is in the pudding.

I plan to set up a vnc server inside the image to start automatically on boot up. Then I will load this on the sd card, plug pi with card into the network, power up headless and see if I can access the pi through vnc from another computer.

Will let you know how it goes.

ferrymanr
Posts: 61
Joined: Fri Mar 16, 2012 11:09 pm

Re: Emulating Raspberry Pi in Windows the easy way

Wed Jun 27, 2012 9:46 pm

mjlally wrote:
ferrymanr wrote:I am wondering if it is possible to use the emulator as is for the wheezy beta image. I could add the wheezy image to the RPi Emulation\quemu directory and alter the run.bat in that directory to use the new image but not sure about the zImage_3.1.9. I hear wheezy is a real improvement over squeezy.
Richard
I think it should work if you put the new debian image in the same folder and just change the debian image name in the run.bat file. Will test when I can.
I can confirm that the wheezy beta image is working by simply adding the wheezy image and changing the run.bat to point to the wheezy image. I made no other changes.

Got an e-mail from Farnell today to say that I will get my RPi a monthe earlier than predicted :-)

Richard (Dick) G4BBH

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Thu Jun 28, 2012 1:37 pm

ferrymanr wrote:
mjlally wrote:
ferrymanr wrote:I am wondering if it is possible to use the emulator as is for the wheezy beta image. I could add the wheezy image to the RPi Emulation\quemu directory and alter the run.bat in that directory to use the new image but not sure about the zImage_3.1.9. I hear wheezy is a real improvement over squeezy.
Richard
I think it should work if you put the new debian image in the same folder and just change the debian image name in the run.bat file. Will test when I can.
I can confirm that the wheezy beta image is working by simply adding the wheezy image and changing the run.bat to point to the wheezy image. I made no other changes.

Got an e-mail from Farnell today to say that I will get my RPi a monthe earlier than predicted :-)

Richard (Dick) G4BBH

Thanks. Just testing that now myself. So far it shows a config screen which allows various options to be set up before login, keyboard, locales, ssh on or off etc.

Will upload a wheezy version to source forge shortly.

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Thu Jun 28, 2012 1:55 pm

Zipped and uploading.

A quick look here on windows xp, networking is working.

ferrymanr
Posts: 61
Joined: Fri Mar 16, 2012 11:09 pm

Re: Emulating Raspberry Pi in Windows the easy way

Thu Jun 28, 2012 3:03 pm

Networking seemed ok on Win7. Tried to install synaptic package manager but it failed. Support for wheezy is a bit limited until the full release. Sysbench installed OK and get about the same cpu benchmark as the RPi squeezy emulation.
Richard

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Thu Jun 28, 2012 3:17 pm

I've just uploaded a zip folder containing the Wheezy beta release http://sourceforge.net/projects/rpiqemuwindows/.

The Debian Squeeze version is still there in other files.

mjlally
Posts: 49
Joined: Thu May 10, 2012 9:08 pm
Location: Reading, UK

Re: Emulating Raspberry Pi in Windows the easy way

Sun Jul 01, 2012 10:45 am

capslock118 wrote:this should be a simple question.

if I do work on a given image, create/save files, install programs, etc. these files persist in the image; meaning that if I shutdown qemu and boot it back up, the data is still there.

Can I still use this 'modified' image on my raspberry pi or should I consider whatever work I do in qemu practice and I would have to install a clean image onto the pi?

I could try this out myself but I do not have a pi yet :).

-joel
Yes, modified image works on sd card.

Sorry for the delay replying to this. In theory it should be no problem but I didn't want to say it works or it should work until I had actually done it.

Now my pi has arrived and I've made it past issues with various sd cards etc., I have had a chance to test this.

It definitely works for me. I have no usb keyboard or mouse and access to the television is limited and awkward so headless boot seemed the best option. I installed tightvncserver on debian squeeze inside qemu, wrote the image to sd card and enabled ssh by renaming the boot_enable_ssh.rc to boot.rc .

To test the setup I plugged the pi into my router, found the pi ip address in the router, used putty to ssh into the pi (because setting up vncserver to run on boot seemed like too much of a faff), once logged in to the pi in putty, I ran tightvncserver from the command line, took note of the display number (1) assigned, and finally ran vnc viewer from windows, connecting to the pi's ip address and port(5900+1 for display number.. example ip and port for my pi with display 1, 192.168.1.45:5901).

The result? Success. Login was successful, I was able to access the pi desktop remotely from windows. Checking midori, my internet history from using it inside qemu was all still there. Changes I'd made were all there as were some applications I'd installed and a few files I'd downloaded.

Sorry if I have gone into the details too much for the more experienced of you, I just thought it better to include for those who are completely new to all this.

unclejed613
Posts: 55
Joined: Sun Jan 15, 2012 10:49 pm

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jul 02, 2012 12:06 am

well.... just to let you know, i tried this on my linux box and it works on linux as well. copied the .img file and the zimage to a directory called ~/rpi opened a terminal, cd'ed to ~/rpi, and ran this command line (i copy-pasted the options from the windows batch file):
qemu-system-arm -M versatilepb -cpu arm1136-r2 -hda 2012-06-18-wheezy-beta.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2"

this assumes you already have qemu installed of course.

unclejed613
Posts: 55
Joined: Sun Jan 15, 2012 10:49 pm

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jul 02, 2012 4:10 am

one question, how do i get the audio working? alsactl init returns a "no soundcards installed" error.
also, omxplayer seems to be broken. it returns an "illegal instruction" error.

same thing running midori... illegal instruction.... does this have anything to do with running qemu emulating 186M of memory instead of 256M?

ferrymanr
Posts: 61
Joined: Fri Mar 16, 2012 11:09 pm

Re: Emulating Raspberry Pi in Windows the easy way

Sat Jul 07, 2012 10:24 pm

Having worked with the emulator and wheezy sor some time I now find that I am running out of space in my image file which is 1.8GB. I will probably be writing the image to a 4GB or 8GB card for the RPI when it arrives but would like to get it all configured as far as possible in advance. Is there any way to expand an image file - bearing in mind that I have to do this on my present Win7/emulator setup.
.

gunflame
Posts: 35
Joined: Mon May 14, 2012 2:15 am

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jul 09, 2012 12:06 am

I have been trying to compile and make a NEW kernel for my emulated Raspberry PI for a while, but my QEMU doesn't boot. Can someone give me some simple instructions?

mjally I have been using your files for Windows XP, Windows Vista, Windows 7 and Ubuntu 12.04. Can you help me out a bit?

I have tried using these 2 tutorials and I haven't been sucessful yet. Maybe I just don't know where to put my files. I get to the point where I make a kernel.img file, I replace the "zImage" and when I try running QEMU modifying -kernel zImage to -kernel kernel.img it just doesn't boot. It stays blank

These are the tutorials I followed to generate the kernel:

- http://elinux.org/Rpi_kernel_compilation#Ubuntu_Linux .
****** I stop here where it says: "If you just copied the "Image" file to "kernel.img" in the boot partition of your SD card and the Raspberry Pi doesn't boot (black screen, only red powerled on), then this might help: " (note that this is my problem)

- http://mitchtech.net/raspberry-pi-kernel-compile/
****** I stop where it says "This creates a kernel.img in the current directory. "

In both cases I take the kernel.img and copy it to my QEMU directory. Using the correct name of the file to start the emulation

raymohi
Posts: 5
Joined: Fri Jun 29, 2012 5:53 pm

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jul 09, 2012 11:11 pm

Could we get a faster mirror for this download, downloading at 50kb/s

dteel
Posts: 1
Joined: Sun Jul 01, 2012 8:16 pm

Re: Emulating Raspberry Pi in Windows the easy way

Mon Jul 09, 2012 11:27 pm

raymohi wrote:Could we get a faster mirror for this download, downloading at 50kb/s
Indeed, its going to take me 6 hours to download.

raymohi
Posts: 5
Joined: Fri Jun 29, 2012 5:53 pm

Re: Emulating Raspberry Pi in Windows the easy way

Tue Jul 10, 2012 12:42 am

I will host a mirror if I get approval from the author or forum moderator to post the link
(And yes I will let you check the MD5 Hash of it before I post)

sundansx
Posts: 3
Joined: Wed Jul 11, 2012 7:28 am

Re: Emulating Raspberry Pi in Windows the easy way

Wed Jul 11, 2012 7:35 am

I have the emulator up and working with the vnc server running (have not been able to connect) and the US keyboard change. However I have some questions:
From above, to run the tightvnc server:
Note that for this to work, you have to have networking installed and running with a real ip address on your local network.
I have followed the tightvnc directions, but how does one install networking?
Also, at ifconfig eth0, it tells me that the emulator is using ip 10.0.2.15. This looks like a static ip. how can I configure the emulator to use DHCP to get an ip from my router?
If I am stuck with this ip, how do I connect to the emu via vnc server from the windows box it is running on. I have already tried to connect with ultravnc viewer at 10.0.2.15:1 without luck. thanks.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Emulating Raspberry Pi in Windows the easy way

Wed Jul 11, 2012 12:13 pm

sundansx wrote:I have the emulator up and working with the vnc server running (have not been able to connect) and the US keyboard change.
Heh heh - I would argue that if you are not able to (I.e., have not yet done) connect to the VNC server, then it's not really the case that you have it "up and working" (yet).

Anyway, regarding your question about IP addresses (and why you have a 10.x.y.z address that seems to be inaccessible from the outside), on 6/21, I wrote the following in a thread titled "SSH setup for Qemulated Pi":

by Joe Schmoe » Thu Jun 21, 2012 1:15 pm
Note that what's really going on in this thread is the difference between setting up a private network vs. "bridging" to the outside (next up enclosing) network. Generally, when setting up virtual machines (regardless of which emulator software you are using), you have a choice between setting up the virtual machine on its own private network vs. bridging out to (usually) your home LAN. In the former case, you (usually) end up with an IP address like 10.x.y.z; in the later, you (usually) end up with an IP address like 192.168.x.y.

The basic difference is that with a private network, you can go out, but they can't come in. That's how your home LAN is setup - so that you can go out to the Internet, but they (the bad guys) can't come in. So, in this instance, when you tell QEMU to setup a 10.x.y.z network, you are setting up a network that, without special "hacks" (e.g., the "-redir" command line option), you can't get into it in from outside.

The easiest (though, perhaps not best) solution is to do whatever is needed to setup the QEMU emulated machine with a "bridged" network - which should get it on IP address in the 192.168.x.y range, and will be directly accessible from the other machines on your LAN.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “Beginners”