Skip to main content

Installing QEMU

Installing QEMU

note

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.

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
note

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