Skip to content

Instantly share code, notes, and snippets.

@lucasw
Last active August 20, 2017 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasw/a56a084c5a3005f8af21b73cb5fd26d3 to your computer and use it in GitHub Desktop.
Save lucasw/a56a084c5a3005f8af21b73cb5fd26d3 to your computer and use it in GitHub Desktop.
Raspbian Jesse on QEMU under Ubuntu 16.04

Get last jesse image:

https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-07-05/

sudo apt-get install qemu

qemu-system-arm --version
QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), Copyright (c) 2003-2008 Fabrice Bellard

http://embedonix.com/articles/linux/emulating-raspberry-pi-on-linux/

git clone https://github.com/dhruvvyas90/qemu-rpi-kernel.git

qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda 2017*.img

WARNING: Image format was not specified for '2017-07-05-raspbian-jessie-lite.img' and probing guessed raw.
     Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
     Specify the 'raw' format explicitly to remove the restrictions.
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Uncompressing Linux... done, booting the kernel.

Need to have the kernel versions match- what is the kernel version inside the jessie image?

4.9, but no built version in https://github.com/dhruvvyas90/qemu-rpi-kernel , would have to build own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment