Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / other-licence / x86emu / x86emu_download.sh
1 # *****************************************************************************
2 # * Copyright (c) 2004, 2008 IBM Corporation
3 # * All rights reserved.
4 # * This program and the accompanying materials
5 # * are made available under the terms of the BSD License
6 # * which accompanies this distribution, and is available at
7 # * http://www.opensource.org/licenses/bsd-license.php
8 # *
9 # * Contributors:
10 # *     IBM Corporation - initial implementation
11 # ****************************************************************************/
12 #!/bin/bash
13
14 #set -x
15 #set -e
16
17 SVN=`which svn`
18 PATCH=`which patch`
19 DIFF_FILE=./x86emu_changes.diff
20
21 # check wether svn, patch, ... is available...
22
23 if [ ! -x $SVN ]; then
24         echo "subversion executable not found!"
25         exit -1
26 fi
27 if [ ! -x $PATCH ]; then
28         echo "patch executable not found!"
29         exit -1
30 fi
31 if [ ! -r $DIFF_FILE ]; then
32         echo "diff file $DIFF_FILE not found!"
33         exit -1
34 fi
35
36 # download the x86emu sources from LinuxBIOS subversion
37
38 #revision known to work...
39 REV=496
40
41 echo "Checking out x86emu from coreboot-v3 repository revision $REV"
42 $SVN co svn://coreboot.org/repository/coreboot-v3/util/x86emu -r $REV
43
44 echo "Copying files..."
45
46 mkdir -p include/x86emu
47 cp -v x86emu/x86emu/*.c .
48 cp -v x86emu/x86emu/*.h include/x86emu
49 cp -v x86emu/include/x86emu/*.h include/x86emu
50
51 echo "Removing checkedout subversion director..."
52
53 rm -rf x86emu
54
55 echo "Patching files..."
56
57 $PATCH -p0 < x86emu_changes.diff
58
59
60 echo "done"
61 exit 0