Skip to content
/ simonpi Public

A quick & dirty script to emulate Raspberry PI family devices on your laptop.

License

Notifications You must be signed in to change notification settings

M0Rf30/simonpi

Repository files navigation

SimOnPI

simonpi-logo

Description

A quick & dirty script to emulate Raspberry family devices on your laptop. It generates a valid sdcard image that can be deployed on real hardware and used as virtual storage for QEMU.

Some features

  • Preliminary support for custom images generated by third parties, adopting the classic Raspberry Pi partition table.
  • Use OVMF UEFI images for rpi-2, rpi-3 & rpi-4
  • Almost full KVM acceleration for aarch64
  • Latest stable Linux kernels for every supported platform
  • Basic Networking support
  • Docker image and example docker-compose file for quick deploy
  • SSH guest access

Powered with ❤️ by Arch Linux Arm images

Instructions

Required runtime dependencies

  • coreutils
  • dnsmasq
  • dosfstools
  • e2fsprogs
  • file
  • grep
  • iproute2
  • iptables
  • libarchive
  • procps-ng
  • qemu-arch-extra
  • sudo
  • util-linux
  • curl

From sources

  1. Download the sources and go into the simonpi directory

    git clone https://github.com/M0Rf30/simonpi.git

    cd simonpi

  2. Set permissions for QEMU bridge interface

    sudo echo "allow rasp-br0 >> /etc/qemu/bridge.conf

  3. Download the required EDK2-AVMF images:

    and place them respectively in the follow path:

    /usr/share/edk2-armvirt/aarch64/QEMU_EFI.fd

  4. Type:

    ./simonpi -h for details

and follow the help guidelines

For Arch Linux users

You can find sim-on-pi on AUR

Type:

yaourt -S simonpi

or

yaourt -S simonpi-git

for latest development changes

and that's all!

Docker image

See the How to into docker folder

Deployment

All the assets (disk images, downloaded archives..) are saved in ~/.simonpi by default.

You can transfer your sd img on a valid sdcard using programs like Etcher or this simple command:

dd if=sd-arch-MODEL-qemu.img of=/dev/sdX bs=4M

where MODEL could be:

  • rpi
  • rpi-2
  • rpi-3
  • rpi-4 and theorically next upgrades and X could be mmcblk0 or other block devices

PR

  • Fork it
  • Modify it
  • TEST it
  • Do a Pull Request

Any suggestions are welcome

Used Kernels

Take a look here for adopted Kernel images: