geeus
Posts: 39
Joined: Fri Oct 21, 2011 7:03 pm
Contact: Website

Re: Simulator/Emulator for Raspberry Pi?

Fri Oct 21, 2011 9:12 pm

Quote from ffuentes on October 16, 2011, 02:31
qemu-system-arm -M versatilepb -cpu arm1176 -hda hda.img -kernel kernel-raspi -no-reboot -append "console=tty0 root=/dev/sda1 rw panic=5" -initrd initrd-raspi.gz

Unable to find CPU definition

I had this problem you need to have the lasted version of qemu and qemu-system I think it

found it

qemu-system-arm --version
QEMU emulator version 0.15.50 (Debian 0.15.50-2011.08-0ubuntu4~ppa11.04.1), Copyright (c) 2003-2008 Fabrice Bellard

If you follow the beginning of the tutorial on prerequisites that should do it
Gee The Rabid Inventor :)

bluepin
Posts: 4
Joined: Mon Aug 08, 2011 6:22 pm

Re: Simulator/Emulator for Raspberry Pi?

Tue Oct 25, 2011 8:30 pm

I was looking for

manfreed
Posts: 3
Joined: Tue Sep 27, 2011 1:27 pm

Re: Simulator/Emulator for Raspberry Pi?

Fri Oct 28, 2011 10:18 am

on ubuntu qemu emulates only x86 machines, you need to use qemu-arm (or qemu-armeb). Strangely qemu-arm has no -M switch.

(Oh, i see this has been answered before, I should really quit write only mode)

Bumsfallera
Posts: 16
Joined: Mon Aug 22, 2011 1:15 am

Re: Simulator/Emulator for Raspberry Pi?

Fri Oct 28, 2011 7:29 pm

Anyone has a clue on how to compile Navit for our "virtual" Raspberry Pi?^^

User avatar
clausmuus
Posts: 50
Joined: Thu Nov 10, 2011 1:54 pm
Location: Germany, Lübeck
Contact: Website

Re: Simulator/Emulator for Raspberry Pi?

Thu Nov 10, 2011 2:38 pm

I have create a simple script that help you to set up a Debian on a QEMU-ARM (R-PI) emulation.
Simple run this script http://www.minidvblinux.dyndns.....-debian.sh and follow the instructions.
After that, this script http://www.minidvblinux.dyndns.....-debian.sh help you to start the installed system.

Claus
MLD - a distribution also for the Raspberry-Pi

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Simulator/Emulator for Raspberry Pi?

Thu Nov 10, 2011 4:13 pm

Quote from clausmuus on November 10, 2011, 14:38
After that, this script http://www.minidvblinux.dyndns.....-debian.sh help you to start the installed system.


Nice script, but it might be worth defaulting to not running qemu-system-arm as root. The standard user-mode networking works pretty well for most basic uses (apt-get etc), it just doesn't support ICMP (ping).

User avatar
clausmuus
Posts: 50
Joined: Thu Nov 10, 2011 1:54 pm
Location: Germany, Lübeck
Contact: Website

Re: Simulator/Emulator for Raspberry Pi?

Thu Nov 10, 2011 5:56 pm

Thank you for this hint. I forgot to remove this. Now there is no more sudo in the script.

Claus
MLD - a distribution also for the Raspberry-Pi

yoonsikp
Posts: 22
Joined: Wed Aug 31, 2011 3:07 pm

Re: Simulator/Emulator for Raspberry Pi?

Sun Nov 20, 2011 9:39 pm

Hey I've tried using qemu, but I keep getting an error in the Debian install, saying it can't detect any drives. Anybody got any ideas?

Bumsfallera
Posts: 16
Joined: Mon Aug 22, 2011 1:15 am

Re: Simulator/Emulator for Raspberry Pi?

Wed Nov 30, 2011 5:39 pm



JDownloader on the R-Pi :D
...using open Java runtime

jmarsden
Posts: 4
Joined: Sun Dec 11, 2011 9:22 am

Re: Simulator/Emulator for Raspberry Pi?

Mon Dec 12, 2011 2:58 am

Quote from yoonsikp on November 20, 2011, 21:39
I've tried using qemu, but I keep getting an error in the Debian install, saying it can't detect any drives.

You need to provide specifics on exactly what you tried -- version of qemu, host OS, guest images. I'd guess that you tried using a netinst image from Debian testing (wheezy)? I had that issue too when I tried that (qemu 0.12.3 under Ubuntu 10.04.3 amd64). Using Debian stable (squeeze) netinst works fine for me here, I wrote a scripted install process for doing that. If I want ARM 1176 CPU emulation, I'll need to backport a newer qemu package, of course.

My own question is more "now what?". How are people actually using these ARM-under-qemu Debian/LXDE installations to do anything useful for Raspberry Pi development? You end up with an emulator that lacks all the fancy video and audio capabilities of the Raspberry Pi, and lacks all the GPIO stuff too.

What actual value do these emulated ARM Debian/LXDE environments offer for working on application software for the Raspberry Pi ? They run (slowly)... but so what? How does that help? All we seem to be doing is wasting the CPU power of a high end PC by emulating a low end embedded CPU :)

Jonathan

Bumsfallera
Posts: 16
Joined: Mon Aug 22, 2011 1:15 am

Re: Simulator/Emulator for Raspberry Pi?

Wed Dec 28, 2011 1:38 am

People learn what software they are able to run on that kind of hardware. What software is available via the package manager etc...

Of course the virtual hardware is slower etc...

but it's useful to test some stuff for people who never used an arm cpu before =)

And it helps to overcome impatience

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Simulator/Emulator for Raspberry Pi?

Wed Dec 28, 2011 2:46 am

jmarsden said:

My own question is more "now what?". How are people actually using these ARM-under-qemu Debian/LXDE installations to do anything useful for Raspberry Pi development? You end up with an emulator that lacks all the fancy video and audio capabilities of the Raspberry Pi, and lacks all the GPIO stuff too.
What actual value do these emulated ARM Debian/LXDE environments offer for working on application software for the Raspberry Pi ? They run (slowly)... but so what? How does that help? All we seem to be doing is wasting the CPU power of a high end PC by emulating a low end embedded CPU


If you have software running on x86, you can already try to cross-compile it for ARM and run it in the emulator. So once you get the real hardware, you will already have sorted out a few problems and you can get it working faster.

kingneutron
Posts: 17
Joined: Wed Dec 28, 2011 6:42 pm

Re: Simulator/Emulator for Raspberry Pi?

Fri Dec 30, 2011 7:55 am

--I'ma just leave this riiight here:

http://www.raspberrypi.org/for.....neutron-v1

/ does not currently have an RPI

// impatiently waiting for the time when I can actually buy a board

/// proof of concept FTW!

jmarsden said:


My own question is more "now what?". How are people actually using these ARM-under-qemu Debian/LXDE installations to do anything useful for Raspberry Pi development? You end up with an emulator that lacks all the fancy video and audio capabilities of the Raspberry Pi, and lacks all the GPIO stuff too.

What actual value do these emulated ARM Debian/LXDE environments offer for working on application software for the Raspberry Pi ? They run (slowly)... but so what? How does that help? All we seem to be doing is wasting the CPU power of a high end PC by emulating a low end embedded CPU

Jonathan


tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Simulator/Emulator for Raspberry Pi?

Fri Dec 30, 2011 2:25 pm


jmarsden said:

My own question is more "now what?". How are people actually using these ARM-under-qemu Debian/LXDE installations to do anything useful for Raspberry Pi development? You end up with an emulator that lacks all the fancy video and audio capabilities of the Raspberry Pi, and lacks all the GPIO stuff too.


Personally, I'm using qemu as a "raw" host for OS development, targetting the Pi.  The machine-specific bits are being done twice (once for qemu, once for the pi, not that this is an issue – it means I get to keep my code relatively easily portable to other hosts) but it gives me an easily-debuggable target platform.  And, as I don't actually have a Pi in my hands, it means I can do *something*.

Simon

Krisbee
Posts: 4
Joined: Sat Dec 24, 2011 3:11 pm

Re: Simulator/Emulator for Raspberry Pi?

Sat Dec 31, 2011 12:35 pm

I need an idiot's guide on how to get sound out of a QEMU arm emulation. I am not ( a coder, or advanced Linux user).

My own idea was to use my external USB DAC for audio playback. My host is 64bit aptosid install (based on debian unstable) which is configured to use ALSA.

 I've only just found this thread, and so have only previously followed this guide using the most recent kernel/initrd files:

 http://www.aurel32.net/info/debian_arm_qemu.php



The final QEMU command I ended up using was:



QEMU_AUDIO_DRV=alsa qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda debian_squeeze_armel_standard.qcow2 -append "root=/dev/sda1" -redir tcp:5022::22 -usb -usbdevice host:08bb:2902 -nographic



This allows me to ssh into the arm emulation.



I soon found you get USB errors unless you use the latest version of QEMU, which I compiled from source with this config.



./configure --target-list="arm-softmmu" --enable-sdl --audio-drv-list=alsa,oss



qemu-system-arm --version

QEMU emulator version 1.0.50, Copyright (c) 2003-2008 Fabrice Bellard



(Hopefully, there was no error there. I checked QEMU ALSA driver was made with: qemu-system-arm -audio-help.)



I did an apt-get for alsa-base, alsa-utils, linux-sound-base and mplayer. Added a normal user and added that user to the audio group. The external USB DAC is recognised.



dmesg | grep usb

[ 10.748371] usbcore: registered new interface driver usbfs

[ 10.801411] usbcore: registered new interface driver hub

[ 10.815537] usbcore: registered new device driver usb

[ 11.531914] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001

[ 11.536095] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[ 11.544624] usb usb1: Product: OHCI Host Controller

[ 11.549129] usb usb1: Manufacturer: Linux 2.6.32-5-versatile ohci_hcd

[ 11.553912] usb usb1: SerialNumber: 0000:00:0c.0

[ 11.562799] usb usb1: configuration #1 chosen from 1 choice

[ 12.581601] usb 1-1: new full speed USB device using ohci_hcd and address 2

[ 13.306081] usb 1-1: New USB device found, idVendor=08bb, idProduct=2902

[ 13.324955] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[ 13.330912] usb 1-1: Product: USB Audio CODEC

[ 13.335381] usb 1-1: Manufacturer: Burr-Brown from TI

[ 13.405726] usb 1-1: configuration #1 chosen from 1 choice

[ 14.156187] usbcore: registered new interface driver hiddev

[ 24.255536] generic-usb 0003:08BB:2902.0001: timeout initializing reports

[ 24.310340] input: Burr-Brown from TI USB Audio CODEC as /devices/pci0000:00/0000:00:0c.0/usb1/1-1/1-1:1.3/input/input2

[ 24.421463] generic-usb 0003:08BB:2902.0001: input,hidraw0: USB HID v1.00 Device [Burr-Brown from TI USB Audio CODEC ] on usb-0000:00:0c.0-1/input3

[ 24.591342] usbcore: registered new interface driver usbhid

[ 24.700441] usbhid: v2.6:USB HID core driver

[ 75.451474] usbcore: registered new interface driver snd-usb-audio



And the correct snd modules appear to be loaded:



I copied a working asound.state for the USB DAC file from my host. The commands alsactl init, and aslactl -f /var/lib/alsa/asound.state restore return no errors. But mplayer fails with:



mplayer -ao alsa:device=hw=1.0 test.wav

MPlayer 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team

mplayer: could not connect to socket

mplayer: No such file or directory

Failed to open LIRC support. You will not be able to use your remote control.



Playing test.wav.

Audio only file format detected.

==========================================================================

Opening audio decoder: [pcm] Uncompressed PCM audio decoder

AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)

Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

==========================================================================

[AO_ALSA] alsa-lib: pcm_hw.c:326:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-5): Input/output error

[AO_ALSA] Unable to set hw-parameters: Input/output error

Failed to initialize audio driver 'alsa:device=hw=1.0'



and aplay fails with the same type of error. The USB error is reported in dmesg as:



[ 282.158010] 2:1:1: usb_set_interface failed



It's a pity, I would like to have heard some Bach from the arm emulation ...



This lead me to think (a) QEMU may have some USB limitation, and/or (b) my ALSA config is incorrect in some way ( is a speical /etc/asound.conf or ~/.asoundrc needed?), and/or (c) there is something wrong/missing with the kernel and hd file I'm using. I think the correct sound devices have been created.

 A trawl of the web didn't show up much, so any help would be much appreciated.













paulie
Posts: 263
Joined: Thu Jan 19, 2012 6:51 pm

Re: Simulator/Emulator for Raspberry Pi?

Tue Jan 31, 2012 10:31 pm

All,

I'm trying to get qemu running on a Debian system ( 2.6.26-2-amd64 #1 SMP )

Have dusted it down (it's mostly Lenny) and  have tried the following:

First tried to download and patch a kernel but realised that was not a good idea

(I'm using a tethered connection to my Debian Box ??!!)

so yesterday  did this:

wget http://dl.dropbox.com/u/45842273/zImage

wget http://dl.dropbox.com/u/458422.....fs.ext2.gz

ran apt-get install qemu from source http://ftp.uk.debian.org (lenny)

qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append "root=/dev/sda" -serial stdio

and got some framebuffer errors (can't remember exactly)

qemu -cpu ? just returned x86 (which  I assume are standard PC hardware)

so changed etc/apt/sources.list to point to squeeze, and did apt-get install qemu

which eventually worked after I sorted out some dependencies.

qemu -cpu ? now returns:

x86           qemu32
x86          coreduo
x86              486
x86          pentium
x86         pentium2
x86         pentium3
x86           athlon
x86             n270

no sign of ARM

now I get :

qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append "root=/dev/sda" -serial stdio
Unable to find CPU definition

and without the cpu flag:

qemu-system-arm -M versatilepb  -m 256 -hda rootfs.ext2 -kernel zImage -append "root=/dev/sda" -serial stdio

=======================|  DirectFB 1.0.1  |=======================
(c) 2001-2007  The DirectFB Organization (directfb.org)
(c) 2000-2004  Convergence (integrated media) GmbH
------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2008-08-17 14:50)
(*) Direct/Memcpy: Using Generic 64bit memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
--> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
--> Initialization error!
Could not initialize SDL - exiting

qemu -version
QEMU PC emulator version 0.12.5 (Debian 0.12.5+dfsg-3squeeze1), Copyright (c) 2003-2008 Fabrice Bellard

Without downloading more HUGE files, I'm a bit out of my depth
It has been my custom to use Xeyes

Mik1313
Posts: 1
Joined: Wed Feb 01, 2012 7:43 pm

Re: Simulator/Emulator for Raspberry Pi?

Thu Feb 02, 2012 8:51 pm

Bumsfallera said:




JDownloader on the R-Pi
...using open Java runtime



Yes! That's exactly what I'm planning.

But will GUI + Java (never heard about an "open Java runtime" tho) + JDownloader really work. are 256/128MB of RAM really enough?

paulie
Posts: 263
Joined: Thu Jan 19, 2012 6:51 pm

Re: Simulator/Emulator for Raspberry Pi?

Thu Feb 02, 2012 9:47 pm

paulie said:


All,

I'm trying to get qemu running on a Debian system ( 2.6.26-2-amd64 #1 SMP )

snip.......
Could not initialize SDL - exiting

qemu -version
QEMU PC emulator version 0.12.5 (Debian 0.12.5+dfsg-3squeeze1), Copyright (c) 2003-2008 Fabrice Bellard

Without downloading more HUGE files, I'm a bit out of my depth


Still no good, so tried VirtualBox ( which runs) but will not boot the

debian-6.0.4-armel-netinst.iso image. ( which took hours to download)

I can change boot sequence etc, ( but nowhere does it specify Arm processor in the settings.........) I did download the extension pack or whatever it is called...
It has been my custom to use Xeyes

Return to “Other projects”