An experimental runtime based on asychronous components
Currently there are four platforms that sadie test/applications runs on:
All files, unless otherwise indicated, are licensed under the Apache 2.0 license. That and any other licenses are available under the LICENSES directory.
Get the sources for this project from github.
NOTE: this git repo uses submodules so use git clone --recursive
mkdir -p ~/prgs
cd ~/prgs
git clone --recursive https://github.com/winksaville/sadie.git
cd sadie
vendor-install-tools/install.py all
To be able to things like power/perf/apic I needed to enable and configure kvm. If you look at the meson.build for Posix and pc_x86_64 platform you'll see that -enable-kvm and -cpu host is being passed to qemu-system-x86_64.runner.sh. On my Arch Linux system I need to install the kvm, kvm_intel and virtio modules, see.
I'll need to see what happens for testing on circleci!!
To load the modules I added cpupower.conf and kvm-virtio.conf to /etc/modules-load.d:
$ cat /etc/modules-load.d/cpupower.conf
msr
cpuid
$ cat /etc/modules-load.d/kvm-virtio.conf
kvm
kvm_intel
virtio
$ cat /etc/modprobe.d/kvm-virtio.conf
options kvm ignore_msrs=1
After rebooting so the modules are loaded we see the ignore_msrs is set to Y:
$ sudo cat /sys/module/kvm/parameters/ignore_msrs
Y
mkdir -p ~/prgs/sadie/build-VersatilePB
cd ~/prgs/sadie/build-VersatilePB
meson -D Platform=VersatilePB --cross-file ../cross-file-VersatilePB --buildtype plain ..
ninja
mkdir -p ~/prgs/sadie/build-Posix
cd ~/prgs/sadie/build-Posix
meson -D Platform=Posix ..
ninja
mkdir -p ~/prgs/sadie/build-pc_x86_64
cd ~/prgs/sadie/build-pc_x86_64
meson -D Platform=pc_x86_64 --cross-file ../cross-file-x86_64 ..
ninja
ninja run-test-ac_putchar
CircleCi is used for testing sadie
For some x86_64 I also test on reapplications like test-ac_putchar you can test using qemu by doing:
ninja run-test-ac_putchar
X86_64 tests can be run on real hardware, in my case a i5 with an
MSI B85M-E45 motherboard. The way I test the image on real hardware
is to write the image to a usb stick using dd and then insert the
usb stick into the test PC which is configured to boot from a usb stick.
The dd command I use is below, note the sync
command to besure
everything is written:
WARNING: Using dd can wipe out your Hard Drive WARNING
sudo dd bs=4M if=tests/test-ac_putchar/test_ac_putchar.img of=/dev/sdb ; sync
I'm using grub2 as the bootloader and I've configured it to route its terminal input/output to the serial port 0 and buad rate is 115200. See tests/test-ac_putchar/grub.cfg for details.
On my MSI B85M-E45 test system I'm using a USB to serial adapter with has a PL2303 chip. I plug it into a USB port on my dev system and connect it to the serial port test system via a NULL modem cable.
On my dev system I use screen to connect to /dev/ttyUSB0 to see the grub and putchar output, I use the following command:
screen /dev/ttyUSB0 115200,cs8