-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
36 lines (36 loc) · 1.7 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
git clone https://github.com/nccgroup/TriforceAFL.git
cd TriforceAFL
git checkout 2a8ed329233a921044c903222fc3aa029ef68c69
cd qemu_mode
git clone https://github.com/espes/xqemu.git
cd xqemu
git checkout b5fcebf4750992cfd2628cbb645706ca8c1e55bd
cd ../
cp ./qemu/afl-qemu-cpu-inl.h ./xqemu/afl-qemu-cpu-inl.h
cp ./qemu/afl.h ./xqemu/afl.h
cp ../../Patches/qemu-options.hx ./xqemu/qemu-options.hx
cp ../../Patches/include/exec/cpu_ldst.h ./xqemu/include/exec/cpu_ldst.h
cp ../../Patches/include/exec/cpu_ldst_template.h ./xqemu/include/exec/cpu_ldst_template.h
cp ../../Patches/include/exec/cpu_ldst_useronly_template.h ./xqemu/include/exec/cpu_ldst_useronly_template.h
cp ../../Patches/boot.sh ./xqemu/boot.sh
cp ../../Patches/build.sh ./xqemu/build.sh
patch ./xqemu/hw/audio/ac97.c ../../Patches/hw/audio/ac97.c.patch
patch ./xqemu/hw/xbox/dsp/dsp.c ../../Patches/hw/xbox/dsp/dsp.c.patch
patch ./xqemu/hw/xbox/acpi_xbox.c ../../Patches/hw/xbox/acpi_xbox.c.patch
patch ./xqemu/target-i386/helper.h ../../Patches/target-i386/helper.h.patch
patch ./xqemu/target-i386/translate.c ../../Patches/target-i386/translate.c.patch
patch ./xqemu/afl.h ../../Patches/afl.h.patch
patch ./xqemu/afl-qemu-cpu-inl.h ../../Patches/afl-qemu-cpu-inl.h.patch
patch ./xqemu/cpu-exec.c ../../Patches/cpu-exec.c.patch
patch ./xqemu/cpus.c ../../Patches/cpus.c.patch
patch ./xqemu/exec.c ../../Patches/exec.c.patch
patch ./xqemu/translate-all.c ../../Patches/translate-all.c.patch
patch ./xqemu/vl.c ../../Patches/vl.c.patch
patch ../afl-fuzz.c ../../Patches/base/afl-fuzz.c.patch
patch ../config.h ../../Patches/base/config.h.patch
patch ../Makefile ../../Patches/base/Makefile.patch
cp ../../Patches/base/xfuzz.sh ../xfuzz.sh
cd xqemu
sh ./build.sh
cd ../../
make