Skip to content

Instantly share code, notes, and snippets.

@FrankSpierings
Last active October 15, 2022 12:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save FrankSpierings/3cdee52d4e942062e3214e70fd05ef55 to your computer and use it in GitHub Desktop.
Save FrankSpierings/3cdee52d4e942062e3214e70fd05ef55 to your computer and use it in GitHub Desktop.
Run Raspberry Pi in qemu-system-arm using versatilepb 'hardware'
#!/bin/sh
#https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.13-jessie
KERNEL=kernel-qemu-4.4.13-jessie
#https://downloads.raspberrypi.org/raspbian_lite_latest + https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
IMAGE=2016-05-27-raspbian-jessie-lite.img
export QEMU_AUDIO_DRV="none"
qemu-system-arm -kernel ${KERNEL} \
-cpu arm1176 \
-m 256 \
-M versatilepb \
-append "root=/dev/sda2 console=ttyAMA0,115200 rootfstype=ext4 rw" \
-drive "file=${IMAGE},format=raw" \
-nographic -serial stdio -monitor none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment