Coder Social home page Coder Social logo

macos-qemu-rpi-m1's Introduction

macos-qemu-rpi

Bash scripts to run Raspbian (ARM architecture) on macOS Catalina using QEMU

Note on Native Emulation Alternative

As of October 2020, consider leveraging QEMU's native emulation of the Raspi2/3 that became available instead of running the scripts in this directory. Navigate to the native-emulation/ directory to try native emulation. QEMU version 5.1 or higher is required.

See https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-emuation for background information on the use of QEMU's native emulation.

Installation

Install homebrew, if you haven't already. Next, run the following script:

./install.sh

Running Raspbian in QEMU

./run.sh

This script doesn't require macOS, but the Raspbian image/kernel and QEMU are required.

Note that this scripts forwards port TCP/5022 on the host (e.g., macOS) to port TCP/22 on the Raspbian guest where Raspbian's SSH server is listening. To run Raspbian in QEMU, no other application including Raspbian may listen on port TCP/5022 on the host.

Logging into Raspbian

Either log in via the QEMU console or use SSH:

ssh -F /dev/null -o "PreferredAuthentications password" -o "PasswordAuthentication yes" -p 5022 [email protected]

If you can't connect, sshd probably failed to start in QEMU. In this case, log in via the QEMU console, and then run sudo service ssh restart to restart sshd in QEMU.

To get a root shell, run the following:

sudo bash

Note that no desktop manager is running, as the "Lite" image is used. See https://www.raspberrypi.org/software/operating-systems/ for pointers to other images.

Shutting Down Raspbian

Log into Raspbian, and then execute sudo halt in the Raspbian shell.

Tutorials

Advanced configuration instructions under Raspbian are provided at https://azeria-labs.com/emulate-raspberry-pi-with-qemu/

Acknowledgements

Scripts in this repository are based on https://gist.github.com/hfreire/5846b7aa4ac9209699ba#gistcomment-3075728 . Credit goes to @janwillemCA, @tinjaw, and the other contributors to that GitHub gist.

macos-qemu-rpi-m1's People

Contributors

faf0 avatar mountain-wg avatar nateww avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.