-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_qemu_qta.sh
executable file
·54 lines (48 loc) · 2 KB
/
build_qemu_qta.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
# WARNING: Always run script inside this folder or fix relative paths first!
init() {
git submodule update --init
rm -f libqta.so
}
qemu_setup() {
echo '| --> fetched qemu source code |'
echo '+--------------------------------------------------------------+'
git checkout master
git reset --hard
git clean -fd
echo '| --> checked out latest QEMU changes (master) |'
patch -p1 < ../../qemu-fix-llvm-exported-symbols.patch &> /dev/null || exit 1
echo '| --> applied patch "qemu-fix-llvm-exported-symbols.patch" |'
cd ../bin/
../src/configure --target-list=arm-softmmu,riscv32-softmmu --enable-plugins --enable-libxml2 || exit 1
echo '| --> configured qemu source code |'
echo '+--------------------------------------------------------------+'
}
qemu_compile() {
make || exit 1
echo '| --> compilation finished |'
echo '+--------------------------------------------------------------+'
}
# Remove previous build files
echo '+-------------------------------------+ '
echo '| STEP 1 / 2: Download & Compile QEMU | '
echo '+-------------------------------------+------------------------+'
echo '| ---> getting the QEMU source tree... |'
init
mkdir -p qemu/bin
mkdir -p qemu/src
cd qemu/src
qemu_setup
qemu_compile
cd ../..
echo '| --> DONE |'
echo '+--------------------------------------------------------------+'
echo ''
# Simulate all tutorial programs and verify the result against ref.
echo '+--------------------------------+ '
echo '| STEP 2 / 2: Compile QTA plugin | '
echo '+--------------------------------+-----------------------------+'
make libqta.so
echo '| --> DONE |'
echo '+--------------------------------------------------------------+'
echo ''