From 2eabbeed1ee9c8c4f7b01f24a8ba65bb392bab95 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 31 Jul 2015 11:54:07 +0100 Subject: [PATCH] move building qemu to script-qemu --- script | 36 --------------------- script-qemu | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 36 deletions(-) create mode 100755 script-qemu diff --git a/script b/script index 94a74d1..53395a3 100755 --- a/script +++ b/script @@ -114,39 +114,3 @@ dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-confi make V=1 CC=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc -j4 CPPFLAGS="-U__SSE2__" stdmakeinstall -# build qemu -setdir /local/scratch/Rump-kernels/rump-build-script-junk/qemu -dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \ -CPPFLAGS="-U__SSE2__" \ - ./configure \ - --enable-xen \ - --disable-linux-user \ - --cc=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc \ - --static --cxx=false \ - --target-list=i386-softmmu \ - --enable-debug --enable-trace-backend=stderr \ - --prefix=/local/scratch/Rump-kernels/prefix-qemu \ - --libdir=/local/scratch/Rump-kernels/prefix-qemu/lib \ - --source-path=. \ - --extra-cflags=" \ - -I/local/scratch/Rump-kernels/prefix/include \ - " \ - --extra-ldflags=" \ - -L/local/scratch/Rump-kernels/prefix/lib \ - " \ - --bindir=/local/scratch/Rump-kernels/prefix-qemu/bin \ - --datadir=/local/scratch/Rump-kernels/prefix-qemu/share/qemu-xen \ - --localstatedir=/var \ - --disable-kvm \ - --disable-docs \ - --includedir=/local/scratch/Rump-kernels/prefix/include \ - --extra-cflags=-I/local/scratch/Rump-kernels/prefix/include \ - --extra-ldflags=-I/local/scratch/Rump-kernels/prefix/lib \ - --disable-guest-agent \ - --disable-werror \ - --with-coroutine=gthread --disable-coroutine-pool \ - --audio-drv-list= \ - --disable-stack-protector -dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make -j4 CPPFLAGS="-U__SSE2__" -stdmakeinstall - diff --git a/script-qemu b/script-qemu new file mode 100755 index 0000000..3b872dc --- /dev/null +++ b/script-qemu @@ -0,0 +1,90 @@ +#!/bin/sh + +set -e + +x () { + echo >&2 "x $*" + "$@" +} + +setdir () { + dir=$1 + echo "==================== $dir ====================" +} + +gettar () { + setdir $1 + local url=$2 + if ! test -d $dir; then + local dlfile="${url##*/}" + rm -f "$dlfile" + wget "$url" + rm -rf d; mkdir d; cd d + x tar axf ../"$dlfile" + cd .. + mv d/$dir . + fi +} + +dirx () { + cd $dir + x "$@" + cd .. +} + +stdconfigure () { + dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \ + /local/scratch/Rump-kernels/rumprun/app-tools/rumprun-xen-configure ./configure \ + --prefix=/local/scratch/Rump-kernels/prefix --disable-shared +} + +stdmake () { + dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make -j4 +} + +stdmakeinstall () { + dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make install +} + +want () { + gettar $1 "$2" + stdconfigure + stdmake + stdmakeinstall +} + +# build qemu +setdir /local/scratch/Rump-kernels/rump-build-script-junk/qemu +dirx env PKG_CONFIG=/local/scratch/Rump-kernels/rump-build-script-junk/pkg-config \ +CPPFLAGS="-U__SSE2__" \ + ./configure \ + --enable-xen \ + --disable-linux-user \ + --cc=/local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-gcc \ + --static --cxx=false \ + --target-list=i386-softmmu \ + --enable-debug --enable-trace-backend=stderr \ + --prefix=/local/scratch/Rump-kernels/prefix-qemu \ + --libdir=/local/scratch/Rump-kernels/prefix-qemu/lib \ + --source-path=. \ + --extra-cflags=" \ + -I/local/scratch/Rump-kernels/prefix/include \ + " \ + --extra-ldflags=" \ + -L/local/scratch/Rump-kernels/prefix/lib \ + " \ + --bindir=/local/scratch/Rump-kernels/prefix-qemu/bin \ + --datadir=/local/scratch/Rump-kernels/prefix-qemu/share/qemu-xen \ + --localstatedir=/var \ + --disable-kvm \ + --disable-docs \ + --includedir=/local/scratch/Rump-kernels/prefix/include \ + --extra-cflags=-I/local/scratch/Rump-kernels/prefix/include \ + --extra-ldflags=-I/local/scratch/Rump-kernels/prefix/lib \ + --disable-guest-agent \ + --disable-werror \ + --with-coroutine=gthread --disable-coroutine-pool \ + --audio-drv-list= \ + --disable-stack-protector +dirx /local/scratch/Rump-kernels/rumprun/app-tools/x86_64-rumprun-netbsd-make -j4 CPPFLAGS="-U__SSE2__" +stdmakeinstall -- 2.39.5