-
Notifications
You must be signed in to change notification settings - Fork 39
Running on QEMU
Daniele Lacamera edited this page Jul 17, 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:
- Create a working directory for your synthetic frosted
mkdir frosted-qemu
cd frosted-qemu
- Clone frosted
git clone git@github.com:insane-adding-machines/frosted.git
cd frosted
git submodule init
git submodule update
cd frosted-userland
git submodule init
git submodule update
cd ../..
- get the latest toolchain
wget https://github.com/insane-adding-machines/crosstool-ng/releases/download/v16.07.003/arm-frosted-eabi-5.3.0_16.07.003.tar.bz2
tar xjf arm-frosted-eabi-5.3.0_16.07.003.tar.bz2
export PATH=`pwd`/arm-frosted-eabi/bin:$PATH
- Ensure that pre-requisites to compile qemu are in place. On a debian system this is:
apt-get build-dep qemu
- Get insane-adding-machines modified qemu (with lm3s_virtual target 1M Flash, 256K RAM)
git clone git@github.com:insane-adding-machines/qemu.git
cd qemu
./configure --prefix=`pwd`/../qemu-bin --target-list=arm-softmmu
make
make install
cd ..
export PATH=`pwd`/qemu-bin/bin:$PATH
-
Go back to the frosted directory
cd frosted
-
Download the example frosted kernel config to kconfig/.config
wget https://git.io/vKgD8 -O kconfig/.config
-
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 qemu2
- Debugging the kernel
-
start qemu in debug mode:
make qemu
-
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