QEMU simulation backend and baremetal testsuite for the anagRAM attack family
Open a devshell with the QEMU requirements and build custom QEMU:
nix-shell -E 'let pkgs = import <nixpkgs> {}; in pkgs.mkShell { inputsFrom = [ pkgs.qemu ]; }'
cd qemu
# Configure QEMU to the desired target
./configure --target-list=x86_64-softmmu --prefix=$(pwd)
# build
make -j 4
This makes the qemu binary available at qemu/build/qemu-system-x86_64
.
Install the QEMU build-time dependencies. Then do
cd qemu
# Configure QEMU to the desired target
./configure --target-list=x86_64-softmmu --prefix=$(pwd)
# build
make -j 4
# Open main dev shell
nix develop
cd baremetal
nix-build
# Run
../qemu/build/qemu-system-x86_64 -cdrom result/bos.iso -m 32M
Have a decently recent enough version of i686-elf-gcc
and do
cd baremetal
make
# Run
../qemu/build/qemu-system-x86_64 -cdrom build/bos.iso -m 32M