aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2016-04-04 16:11:46 +0200
committerGerrit Code Review <gerrit@fd.io>2016-04-15 12:35:44 +0000
commit43277be7e77afe0363f62c97c687bcfa506ee4b8 (patch)
tree082b34b7e1dd671e3e83b4d654f5c27738c33900 /resources/libraries/bash
parent60831dae7202e1a85fc0cc5037d72b25c09cf756 (diff)
Update Qemu library
Incorporated changes from nested VM on VIRL. Change-Id: I76ceeb2dde635c2cf0d3a53d29bf24fed72a5437 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r--resources/libraries/bash/qemu_build.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/resources/libraries/bash/qemu_build.sh b/resources/libraries/bash/qemu_build.sh
index 449cce664f..7b8ac41251 100644
--- a/resources/libraries/bash/qemu_build.sh
+++ b/resources/libraries/bash/qemu_build.sh
@@ -12,27 +12,34 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+QEMU_BUILD_DIR="/tmp/qemu-2.2.1"
+QEMU_INSTALL_DIR="/opt/qemu"
+
echo
echo Downloading QEMU source
echo
-sudo rm -rf /tmp/qemu-2.2.1
+sudo rm -rf ${QEMU_BUILD_DIR}
+sudo rm -rf ${QEMU_INSTALL_DIR}
cd /tmp
wget -q http://wiki.qemu-project.org/download/qemu-2.2.1.tar.bz2 || exit
echo
echo Extracting QEMU
echo
-tar xjf qemu-2.2.1.tar.bz2 || exit
-rm qemu-2.2.1.tar.bz2
+mkdir ${QEMU_BUILD_DIR}
+tar --strip-components 1 -xjf qemu-2.2.1.tar.bz2 -C ${QEMU_BUILD_DIR} || exit
+rm -f qemu-2.2.1.tar.bz2
echo
echo Building QEMU
echo
-cd qemu-2.2.1
+cd ${QEMU_BUILD_DIR}
+sudo mkdir ${QEMU_INSTALL_DIR}
mkdir build
cd build
-../configure --target-list=x86_64-softmmu || exit
+../configure --target-list=x86_64-softmmu --prefix=${QEMU_INSTALL_DIR} || exit
make -j`nproc` || exit
+sudo make install || exit
echo
echo QEMU ready