-
Notifications
You must be signed in to change notification settings - Fork 39
Running on QEMU
brabo edited this page Dec 1, 2016
·
16 revisions
#Running on QEMU#
The requirements to test frosted on synthetic target are:
- a Linux distribution, or a POSIX-compliant OS which supports the tools described below
How to run the QEMU example synthetic target:
- Clone frosted
git clone git://github.com/insane-adding-machines/frosted.git
- Run QEMU environment setup script by sourcing it, required to have changes to $PATH apply after termination of the script (will install dependencies to ~/frosted-qemu)
. scripts/frosted-qemu-setup
- Use the example frosted kernel pre-defined config for qemu, included in defconfig:
make defconfig TARGET=qemunet
- Download the example frosted-userland config to frosted-userland/kconfig/.config
wget https://git.io/vKgDR -O frosted-userland/kconfig/.config
- Compile frosted
make
- Run the frosted image on qemu
make qemu
- If you want to enable tun/tap connectivity, run the "net" version
make qemunet
- Host networking setup example using bridge-utils (if you just want host-qemu networking you do not need to add eth0 (or any other interface) to br0)
brctl addbr br0
brctl addif br0 eth0
ifconfig br0 192.168.20.1 netmask 255.255.255.0 broadcast 192.168.20.255
- Debugging the kernel
- start qemu in debug mode:
make qemudbg
or, for the net version:
make qemunetdbg
- start the debugger:
From another console run
arm-frosted-eabi-gdb
orarm-none-eabi-gdb
and attach to localhost:3333 to start debugging. You can use the following settings in your local .gdbinit script:
tar ext :3333
layout src
file kernel.elf
stepi
focus c