HTTPS SSH

rpi-emulator

This repository contains tools for setting up an emulation of a Raspberry-Pi using QEMU.

The script downloads a standard "Raspbian Light" image from the Raspberry Pi Foundation's website, and a patched kernel (based on various contributions, collected by Dhruv Vyas).

Then, the image is unpacked, resized and patched, to make it usable for QEMU.

Finally, commandline for running the image is printed to the terminal (in upcoming versions, we might include a launch command as well).

For details about the tradeoffs and choices that were involved in setting up a working emulation, please refer to the Wiki.

Current image uses the following resources:

How do I get set up?

The script assumes a Gnu/Linux system, and has various dependencies. To list some: bash, Python, zip, libguestfs/guestfish, patch, mercurial (for getting the script and code) and qemu-system-arm (for running the emulation).

  • Install the dependencies (TODO: write up apt-get commands for Debian/Ubuntu).

  • Get the code:

    hg clone https://bitbucket.org/amitar/rpi-emulator
    
  • Run the script:

    cd rpi-emulator
    ./prepare_img.sh
    

    This creates a 3G image. Alternatively, you can specify the desired image size in the commandline, like so:

    ./prepare_img.sh 10G
    

    (use "-" to specify the minimal possible size, which is about 1.5G)

  • After the image is prepared, the command for launching it should be displayed. paste it to the command line to start the emulation.

Contributing

Feel free to fork the repository from Bitbucket, send feedback, report issues, and submit pull requests.

Who do I talk to?