Skip to content
forked from nesl/varemu

VarEMU: An emulation testbed for Variability-Aware Software

Notifications You must be signed in to change notification settings

liangzhen-lai/varemu

 
 

Repository files navigation

VarEMU: An emulation testbed for Variability-Aware Software

Build instructions

VarEMU

  • Download VarEMU source code.
  • Extract QEMU Linaro snapshot
  • Copy VarEMU extensions into QEMU
  • Configure QEMU
  • Build QEMU with VarEMU extensions
wget https://github.com/nesl/varemu/archive/master.zip
unzip master.zip
cd varemu-master/
tar xjf qemu-linaro-13-03.28.tar.bz2
cp -r varemu/* qemu-linaro/
cd qemu-linaro
./configure --disable-kvm --enable-debug --enable-debug-tcg --target-list=arm-softmmu
make CFLAGS=-DVEMU
cd ..

Linux kernel for versatilepb

  • Pre-requisite: Download and install CodeBench for ARM (Linux version, tested with 2011.09-70)
  • Download and extract Linux kernel version 3.6.3
  • Apply VarEMU kernel extensions to kernel source tree
  • Configure Linux kernel for versatilepb platform
cd linux
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.3.tar.bz2
tar xjf linux-3.6.3.tar.bz2
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
cp -r linux-3.6.3-variability/* linux-3.6.3/
cd linux-3.6.3/
make versatile_defconfig
make menuconfig
  • Load an alternate config file, select ../linuxconfig
  • Save an alternate config file: .config
make
cd ..

Buildroot

cd linux
wget http://buildroot.uclibc.org/downloads/buildroot-2012.11.tar.bz2
tar xjf buildroot-2012.11.tar.bz2 
cd buildroot-2012.11
make menuconfig
  • Under Load an Alternate Configuration File, select "buildrootconfig" in the linux directory
  • Select any additional apps needed under Package Selection for the Target
  • Save an Alternate Configuration file -> "buildroot-2012.11/.config"
  • Add your apps and custom configuration files under the "fs" directory. Buildroot will run the "prepare_fs.sh" script to copy these files before preparing the filesystem image
make

Running VarEMU

  • From the main varemu directory, start QEMU with VarEMU options
qemu-linaro/arm-softmmu/qemu-system-arm -M versatilepb -m 256M -kernel linux/linux-3.6.3/arch/arm/boot/zImage -initrd linux/buildroot-2012.11/output/images/rootfs.cpio.gz -append "root=/dev/ram rdinit=/sbin/init" -singlestep -variability power_model_data/45nm_nc.txt -net nic -net user  -nographic

VarEMU Power Monitor

  • Start QEMU with a monitor socket by adding -qmp unix:qmp-sock_01,server to the command line
  • Start the VarEMU Python Monitor
python qemu-linaro/QMP/vemu-power.py qmp-sock_01

About

VarEMU: An emulation testbed for Variability-Aware Software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 90.6%
  • Haxe 6.6%
  • C++ 1.1%
  • Python 0.9%
  • Assembly 0.6%
  • Makefile 0.1%
  • Shell 0.1%