source: mainline/contrib/qfs/qfs.sh@ cf7ad06

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since cf7ad06 was cb1fd3e, checked in by Jakub Jermar <jakub@…>, 11 years ago

Add a script for building HelenOS-ready QEMU from scratch.

  • Property mode set to 100755
File size: 2.7 KB
Line 
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
30VERSION=2.1.0
31BASENAME=qemu-${VERSION}
32TARBALL=${BASENAME}.tar.bz2
33SOURCEDIR=${BASENAME}
34URL=http://wiki.qemu-project.org/download/${TARBALL}
35MD5="6726977292b448cbc7f89998fac6983b"
36
37if [ ! -f ${TARBALL} ];
38then
39 wget ${URL}
40fi
41
42if [ `md5sum ${TARBALL} | cut -f 1 -d " "` != ${MD5} ];
43then
44 echo Wrong MD5 checksum
45 exit
46fi
47
48tar xvfj ${TARBALL}
49
50cd ${SOURCEDIR}
51
52patch -p 1 <<EOF
53diff --git a/target-arm/cpu.h b/target-arm/cpu.h
54index 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;
73EOF
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
77make -j 4
78
79sudo make install
80
Note: See TracBrowser for help on using the repository browser.