1 | #!/usr/bin/bash
|
---|
2 | #
|
---|
3 | # Copyright (c) 2014 Jakub Jermar
|
---|
4 | # All rights reserved.
|
---|
5 | #
|
---|
6 | # Redistribution and use in source and binary forms, with or without
|
---|
7 | # modification, are permitted provided that the following conditions
|
---|
8 | # are met:
|
---|
9 | #
|
---|
10 | # - Redistributions of source code must retain the above copyright
|
---|
11 | # notice, this list of conditions and the following disclaimer.
|
---|
12 | # - Redistributions in binary form must reproduce the above copyright
|
---|
13 | # notice, this list of conditions and the following disclaimer in the
|
---|
14 | # documentation and/or other materials provided with the distribution.
|
---|
15 | # - The name of the author may not be used to endorse or promote products
|
---|
16 | # derived from this software without specific prior written permission.
|
---|
17 | #
|
---|
18 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
19 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
20 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
21 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
22 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
23 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
24 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
25 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
26 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
27 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
28 | #
|
---|
29 |
|
---|
30 | VERSION=2.1.0
|
---|
31 | BASENAME=qemu-${VERSION}
|
---|
32 | TARBALL=${BASENAME}.tar.bz2
|
---|
33 | SOURCEDIR=${BASENAME}
|
---|
34 | URL=http://wiki.qemu-project.org/download/${TARBALL}
|
---|
35 | MD5="6726977292b448cbc7f89998fac6983b"
|
---|
36 |
|
---|
37 | if [ ! -f ${TARBALL} ];
|
---|
38 | then
|
---|
39 | wget ${URL}
|
---|
40 | fi
|
---|
41 |
|
---|
42 | if [ `md5sum ${TARBALL} | cut -f 1 -d " "` != ${MD5} ];
|
---|
43 | then
|
---|
44 | echo Wrong MD5 checksum
|
---|
45 | exit
|
---|
46 | fi
|
---|
47 |
|
---|
48 | tar xvfj ${TARBALL}
|
---|
49 |
|
---|
50 | cd ${SOURCEDIR}
|
---|
51 |
|
---|
52 | patch -p 1 <<EOF
|
---|
53 | diff --git a/target-arm/cpu.h b/target-arm/cpu.h
|
---|
54 | index 8098b8d..659b104 100644
|
---|
55 | --- a/target-arm/cpu.h
|
---|
56 | +++ b/target-arm/cpu.h
|
---|
57 | @@ -1255,7 +1255,14 @@ static inline bool arm_singlestep_active(CPUARMState *env)
|
---|
58 | static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,
|
---|
59 | target_ulong *cs_base, int *flags)
|
---|
60 | {
|
---|
61 | - int fpen = extract32(env->cp15.c1_coproc, 20, 2);
|
---|
62 | + int fpen;
|
---|
63 | +
|
---|
64 | + if (arm_feature(env, ARM_FEATURE_V6)) {
|
---|
65 | + fpen = extract32(env->cp15.c1_coproc, 20, 2);
|
---|
66 | + } else {
|
---|
67 | + /* CPACR doesn't exist before v6, so VFP is always accessible */
|
---|
68 | + fpen = 3;
|
---|
69 | + }
|
---|
70 |
|
---|
71 | if (is_a64(env)) {
|
---|
72 | *pc = env->pc;
|
---|
73 | EOF
|
---|
74 |
|
---|
75 | ./configure --target-list=i386-softmmu,x86_64-softmmu,arm-softmmu,ppc-softmmu,sparc-softmmu,sparc64-softmmu,mips-softmmu,mipsel-softmmu --audio-drv-list=pa
|
---|
76 |
|
---|
77 | make -j 4
|
---|
78 |
|
---|
79 | sudo make install
|
---|
80 |
|
---|