Hot answers tagged

19

To set up an emulated environment of the Raspberry Pi software on OSX one will need: A Cross-Compiling Tool for the CPU architecture of RPi. ( eg. ARM EABI Toolchain ) The RPi Kernel. The RPi root filesystem. The Emulator (QEMU). The Cross-Compiling Tool for the ARM architecture. Assuming one already have the latest Xcode and command line tools from Apple ...


10

Here is a link for that file I have uploaded it to dropbox. https://www.dropbox.com/s/g8u93xblz1v1ly0/kernel-qemu?dl=0 Also, it's been made available on github. Link --> https://github.com/dhruvvyas90/qemu-rpi-kernel


6

After hours of testing different configs I found that the CPU only worked when it was set to 486. In the end I can run it using "qemu-system-i386 -cpu 486 -m 256" ect.


5

Ok, so I figured it out: I needed to comment out one line in /etc/ld.so.preload file by adding # at the line beginning before starting Raspbian (problems with booting disappeared) and use: qemu-system-armw.exe -M versatilepb -m 256 -cpu arm1176 -no-reboot -serial stdio -kernel kernel-qemu -hda rpi_disk.vmdk -append "root=/dev/sda2 panic=1" command to ...


5

This is an old question, but: You won't be able to use KVM to run an x86 guest on the Raspberry Pi (any version), as the Raspberry Pi uses an ARM CPU core. Now, this doesn't mean that you can't run an x86 guest at all, but performance will be quite slow. (The link above is likely about using KVM to run an ARM guest, not an x86 guest). Before the KVM ...


5

This works for me on MacOS Mojave, Create a file called qemu_script.sh and copy-paste the code below nano qemu_script.sh give execution perms and execute, $ chmod +x qemu_script.sh $ ./qemu_script.sh Code: #!/bin/sh brew install qemu export QEMU=$(which qemu-system-arm) export TMP_DIR=~/tmp/qemu-rpi export RPI_KERNEL=${TMP_DIR}/kernel-qemu-4.14.79-...


4

As @dastaan said, the kernel version needs to match the img file. I was trying to use a 4.1 kernel version image file with a 3.18 kernel. Now that I am using the proper image, it works. Thanks! Edit: Getting this to work is pretty straightforward: Grab the image from https://github.com/dhruvvyas90/qemu-rpi-kernel/, then download the corresponding Raspian ...


4

The error message makes clear that Minecraft can't find the Pi GPU since it's not there. I'm pretty sure there is no way around that requirement either. If you are looking to use the Pi edition Python API, plugins for Desktop Minecraft exist to emulate this API : http://dev.bukkit.org/bukkit-plugins/raspberryjuice/


3

The above link does appear dead, however this one is good.


3

If you were looking to go mobile, SSH or VNC are the best options for working without a separate monitor. Both of these require the Mac and the Pi to be connected to the same WIFI/Ethernet network, however I have read somewhere you can directly attach them with an Ethernet cable. Something worth looking up. SSH is the best option if you are only using the ...


3

QEMU does not emulate the Videocore hardware; programs that try to interface with it through VCHIQ will fail. It looks like this QEMU fork might get you closer to proper emulation, but I wouldn't get my hopes up.


3

When booting first time you should use bash as init application and change /etc/ld.so.preload. Please note -append parameter: qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash console=ttyAMA0,115200" -hda 2014-12-24-wheezy-raspbian.img Kudos for ...


3

There is a ready to run paid option that runs over QEMU: https://snorfi.us/raspiemu/ If you don't want to pay for it you can also download the alpha version in https://sourceforge.net/projects/raspberrypiemulator/


3

The append line adds extra options to the kernel command line in UNIX derivatives. You can add many extra options such as root device (/dev/sda2 in your example) initrd file debugging options such as 'quiet' hdd emaulation (ide-scsi) boot type (single, rescue etc.) VGA mode You can find which options you can pass to append line in QEMU kernel options ...


3

While brought up your guest OS, If you didn't specify any nic interface, by default QEMU will create one and assign the IP 10.0.2.15. but it will not have any connectivity. so guest OS will not able to ping host OS. (For more details about QEMU networking refer http://wiki.qemu.org/Documentation/Networking). Better way I would suggest is bridge->tap ...


3

Older versions of QEMU did not emulate the Raspberry Pi but a "Versatile PB" board. Therefore a custom "Versatile" kernel is running inside QEMU , the userland of Raspberry Pi images works somewhat fine on top of it (YMMV) - as the whole point of the Linux kernel is to provide this very abstraction. See here on how to really emulate the Raspberry Pi 2 with ...


3

You are still using "versatilepb". If you want to emulate a Raspberry Pi, use "raspi" The precompiled DTB files can be downloaded from the foundation firmware github. Direct link for the Pi Zero DTB here.


2

I know this is an old question but since it comes up in Google searches and I was looking for the same information, I'll post what I've found. There's a solution for Linux based qemu here and there's Windows based information here.


2

There is blog post about how to boot RiscOS in QEMU. The trick is that you have to use custom QEMU (not the upstream one). For sure it should work using blog author's tree, but it was't updated for quite some time. I think it can also work on Torlus tree. It also means that you have to go through painful compilation process under Windows or use Linux. I ...


2

Can qemu give USB interface for guest? Yes, QEMU can pass USB devices to a guest. See this document. Is raspberry pi performance suitable for the task? No, the Rasperry Pi has a very limited processor. Instead of virtualizing another Linux guest, consider directly installing CUPS.


2

Try installing qemu version 1.7.1 (the version prior to 2.0.0). I had very similar problems with qemu 2.0.0 (installed via macports in my case), and switching back to the prior version made everything work. I do not use homebrew, but this response at Stackoverflow has detailed instructions to revert to an earlier version of any package using Homebrew.


2

How did you resize your image? I resized as follows, it works fine for me. (I'm on Ubuntu 12.04 and trying with raspbian): root@unknown:~# qemu-img info 2014-09-09-wheezy-raspbian.img image: 2014-09-09-wheezy-raspbian.img file format: raw virtual size: 3.1G (3276800000 bytes) disk size: 3.1G root@unknown:~# qemu-img resize 2014-09-09-wheezy-raspbian.img +...


2

I had similar issues and I finally got this working last night, on OS X 10.8.5 with QEMU v2.2.0, after working on/off for two weeks. Preamble I was prompted by the question, Can I program for Arduino without having a real board?, to try to use a real emulator, such as QEMU, as suggested by zmo, in a comment to Anindo Ghosh's answer. I thought that I would ...


2

I had the exact same issue using bash as init. This will get you access to the system, but as you've seen login and some other stuff won't work. Per the instructions at http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ you need to comment out a line in /etc/ld.so.preload. After this a normal boot without a custom init will work mostly (I have ...


2

Defining what a decent speed is is not possible. Perhaps for the type of development and for the need when testing the developed software, a qemu VM is perfect for you. Just try it and see for yourself if the time it takes is acceptable or not. Then depending on the type of development you want to do, portability might be an issue or not. What is your ...


2

Adobe flash is proprietary software, and there is no version compiled for ARMv6. Since it is not open source, that is the end of that. Running an x86 version through Wine or QEMU, to the extent that it is even possible, will be dreadful. There is an open source .swf player, gnash, which is in Raspbian and even looks to use openGL bindings, meaning it ...


2

Install Qemu for Windows 32-bit, 64-Bit Doesn't Work Add C:\Program Files(x86)\Qemu to your PATH (Here's How) Download the Raspbian Jessie Img(Unzip it after) and This Jessie Kernel* Put Them In Their own folder, say %userprofile%\Qemu Open CMD Prompt in that folder Run: qemu-system-arm.exe -kernel <your-kernel-file> -append "root=/dev/sda2 panic=...


2

Ubuntu 16.04, QEMU 2.9.0 -M raspi2, Raspbian 2016-05-27, vanilla kernel Steps: Compile QEMU 2.9.0 from source: sudo apt-get build-dep qemu-system-arm git clone --recursive git://git.qemu-project.org/qemu.git cd qemu git checkout v2.9.0 ./configure make `nproc` Download image and extract the kernel and dts from it: Download the image and unzip it: wget ...


2

Yes and no. It is not possible to run the official kano IMG in Qemu but you can run Raspbian and add the kano repositories to the sources.list file. Install Raspbian Jessie on Qemu (This is for windows, just remove the .exe and stuff): Do this Add this to /etc/apt/sources.list.d/kano.list: deb http://repo.kano.me/archive-jessie/ release main deb http://repo....


2

seam be this is wrong: root=/dev/sda2 Try replace by (waitroot will give time to read the error): -append "root=/dev/sda2 waitroot rootfstype=ext4 rw init=/bin/bash" -append "root=/dev/vda2 waitroot rootfstype=ext4 rw init=/bin/bash" -append "root=/dev/hda2 waitroot rootfstype=ext4 rw init=/bin/bash" 2016-03-18-raspbian-jessie-lite.img is realy ext4 on ...


Only top voted, non community-wiki answers of a minimum length are eligible