1:BUILD_BY[name] student0 1:BUILD_ENVIRONMENT[operating system 32 vs 64] 1:END_BUILD_ENVIRONMENT 1:DEPENDENCIES[list of dependencies with where to get them] https://s2e.epfl.ch/embedded/s2e/BuildingS2E.html s2e, which in it's 1:END_DEPENDENCIES 1:NOTES[notes on attempted build] All pre-reqs for S2E install correctly. Error while trying to build s2e platform. make[2]: *** [/home/student/s2e/build/llvm-native/lib/Support/Release/DeltaAlgorithm.o] Error 1 make[2]: Leaving directory `/home/student/s2e/build/llvm-native/lib/Support' make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/student/s2e/build/llvm-native' make: *** [stamps/llvm-native-make] Error 2 student@ubuntu:~/s2e/build$ 1:END_NOTES 2:BUILD_BY[name] student8 2:BUILD_ENVIRONMENT[operating system 32 vs 64] Ubuntu 12.04.5 64-bit 2:END_BUILD_ENVIRONMENT 2:DEPENDENCIES[list of dependencies with where to get them] sudo apt-get install git sudo apt-get install build-essential sudo apt-get install subversion sudo apt-get install gettext sudo apt-get install liblua5.1-0-dev sudo apt-get install libsdl1.2-dev sudo apt-get install libsigc++-2.0-dev sudo apt-get install binutils-dev sudo apt-get install python-docutils sudo apt-get install python-pygments sudo apt-get install nasm sudo apt-get install libiberty-dev sudo apt-get install libc6-dev-i386 sudo apt-get build-dep llvm-3.3 sudo apt-get build-dep qemu libiberty-dev from http://mirrors.kernel.org/ubuntu/pool/main/libi/libiberty/libiberty-dev_20131116-1_amd64.deb sudo apt-get install debootstrap 2:END_DEPENDENCIES 2:NOTES[notes on attempted build] $ mkdir s2e $ sudo apt-get install git $ cd s2e $ mkdir build $ git clone git://github.com/dslab-epfl/s2e.git $ cd s2e $ git checkout -b SymDrive b5cfd33051c3be3ab254a5d3e9f4376861188c77 $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/symdrive.patch $ git apply symdrive.patch $ sudo apt-get install build-essential $ sudo apt-get install subversion $ sudo apt-get install gettext $ sudo apt-get install liblua5.1-0-dev $ sudo apt-get install libsdl1.2-dev $ sudo apt-get install libsigc++-2.0-dev $ sudo apt-get install binutils-dev $ sudo apt-get install python-docutils $ sudo apt-get install python-pygments $ sudo apt-get install nasm $ sudo apt-get install libiberty-dev $ sudo apt-get install libc6-dev-i386 $ sudo apt-get build-dep llvm-3.3 $ sudo apt-get build-dep qemu $ cd $ wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libiberty/libiberty-dev_20131116-1_amd64.deb $ sudo dpkg -i libiberty-dev_20131116-1_amd64.deb $ cd s2e/build $ make -f ../s2e/Makefile $ sudo apt-get install debootstrap $ cd .. $ mkdir symdrive $ mkdir symdrive/debian32 $ cd symdrive $ sudo debootstrap --arch i386 squeeze debian32/ http://mirror.switch.ch/ftp/mirror/debian/ $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/qemu.tbz $ tar xvjf qemu.tbz $ cd qemu $ ./debian32.sh $ cd root $ mkdir cil test gtf $ apt-get install build-essential kernel-package locales libncurses-dev $ mkdir /root/kernel $ cd /root/kernel $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/kernel_files.tbz $ tar xvjf kernel_files.tbz $ wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.1.1.tar.bz2 $ tar xvjf linux-3.1.1.tar.bz2 $ patch -p1 < ./linux_311.patch $ cd /root/kernel/linux-3.1.1 $ chmod +x *.sh $ ./1_menuconfig.sh I needed to add the following line to line two of my /etc/hosts: 127.0.1.1 student-pc Otherwise, I will get the following error from 2_make.sh INSTALL include (0 file) INSTALL include/asm (56 files) hostname: Name or service not known make[1]: *** [deb-pkg] Error 1 make: *** [deb-pkg] Error 2 $ ./2_make.sh Exited the chroot jail using CTRL-D $ cd ~/s2e/symdrive $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/cil.tbz $ tar xvjf ./cil.tbz $ cd qemu $ ./debian32.sh $ aptitude search ocaml $ apt-get install ocaml $ apt-get install autoconf Exited the chroot jail using CTRL-D $ ./debian32.sh $ cd /root/cil $ make configure $ ./configure $ make $ export PATH=$PATH:/root/cil/bin I could saw the line “—dodrivers Enable device-driver analysis” in the output of “cilly —help”. According to the SymDrive website, this showed that SymDrive works. I went on to try to use SymDrive to test a driver. Exited the chroot jail using CTRL-D $ cd ~/s2e/symdrive/ $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/gtf.tbz $ tar xvjf gtf.tbz $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/test.tbz $ tar xvjf test.tbz $ cd qemu $ ./debian32.sh $ cd /root/cil $ export PATH=$PATH:/root/cil/bin $ cd /root/test $ ./make.sh lp5523 Exited the chroot jail using CTRL-D $ cd ~/s2e/symdrive/qemu $ wget http://research.cs.wisc.edu/sonar/projects/symdrive/dist/i386.tbz $ tar xvjf i386.tbz $ cd ~/s2e/symdrive/qemu $ ./qemu.sh 14159265358979323846 $ ./qemu.sh 4982 44 10 Opened a new terminal and used ./debian32.sh to start the chroot jail Opened a VNC viewer and connected to 0.0.0.0:2 to view the QEMU VM Opened a third terminal and issued the command “./qemu.sh 1000” $ ./qemu.sh 44 11 Opened a VNC viewer and connected to 0.0.0.0:2 to view the QEMU VM Inside the QEMU VM, I issued the following commands to test the driver: $ modprobe spi-bitbang $ insmod ./test_framework.ko g_i2c_enable=1 g_i2c_chip_addr=0x30 g_i2c_names=lp5523 $ insmod ./lp5523-stub.ko These commands were executed successfully. 2:END_NOTES