These commands download, build, and run the Linux testbed for VarEMU.
wget https://github.com/nesl/varemu/archive/master.zip unzip master.zip cd varemu-master/ ./build_all.sh ./start_qemu.sh
- 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 ..
cd linux wget https://buildroot.org/downloads/buildroot-2017.02.2.tar.gz tar xzf buildroot-2017.02.2.tar.gz cd buildroot-2017.02.2/ make menuconfig
- Under Load Configuration, select "buildrootconfig" in the linux directory
- Select any additional apps needed under Package Selection for the Target
- Save an Alternate Configuration file -> "buildroot-2017.02.2/.config"
- Add your apps and custom files under the "fs" directory. Buildroot will run the "prepare_fs.sh" script to copy these files before preparing the filesystem image
make
- Pre-requisite: Download and install CodeBench for ARM (Linux version, tested with 2014.05-29)
- 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 ..
- 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-2017.02.2/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
- 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