Installing QEMU
Installing QEMU
More detailed (and specific to more systems) instructions for installing QEMU can be found on the Download QEMU page on the QEMU website and for setting up networking on the Networking with QEMU page on the Zephyr docs website.
- Linux
- MacOS
- Windows
Install QEMU
sudo apt install qemu
Setup Networking Support
Install the necessary tooling:
sudo apt install libpcap-dev autoconf automake libtool socat net-tools libglib2.0-dev
Then, compile the zephyr fork of net-tools:
git clone https://github.com/zephyrproject-rtos/net-tools
cd net-tools
make
We're working hard to improve the user-experience here
Now, open two additional terminals (three in total).
In terminals 2 and 3, cd
to the net-tools
directory that you just cloned.
In terminal 2, run:
./loop-socat.sh
In terminal 3, run:
sudo ./loop-slip-tap.sh
In terminal 1, run:
sudo iptables -t nat -A POSTROUTING -j MASQUERADE -s 192.0.2.1
sudo sysctl -w net.ipv4.ip_forward=1
Install QEMU
brew install qemu
Setup Networking Support
QEMU on MacOS does not current support the necessary networking features for simulating a network-based Zephyr application. See this issue for more information.
While Windows is supported by Zephyr and QEMU, Golioth does not yet have instructions for Windows.