Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for M1-based silicon in QEMU emulation #530

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _posts/2023-06-21-emulating-raspberry-pi-in-qemu.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This article dives into QEMU, a popular open-source emulator, and how to use it

## Environment setup

Since I'm on a Mac, and the purpose is to get a working Docker image, I set up an Ubuntu 20.04 Virtual Machine in Parallels. If you want to follow along, I recommend you to do the same and get onto a fresh Ubuntu 20.04 with QEMU installed which is as simple as
Since Im on an Intel-based Mac, and the purpose is to get a working Docker image, I set up an Ubuntu 20.04 Virtual Machine in Parallels. If you want to follow along, I recommend you to do the same and get onto a fresh Ubuntu 20.04 with QEMU installed which is as simple as
```bash
apt-get install -y qemu-system-aarch64
```
Expand Down
9 changes: 9 additions & 0 deletions example/emulating-raspberry-pi-in-qemu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ RUN mkdir -p /tmp && \
RUN mcopy /tmp/ssh x:/ && \
mcopy /tmp/userconf x:/

# Unmount the image
RUN sudo umount /mnt/image

# Comment specifying the type of Mac CPU architecture used
# This Dockerfile is designed for an Intel-based Mac

# Add support for M1-based silicon
RUN apt-get install -y qemu-system-arm

EXPOSE 2222

# Start qemu with SSH port forwarding
Expand Down