]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
use common xen/baremetal build script
authorAntti Kantee <pooka@iki.fi>
Fri, 19 Dec 2014 12:19:49 +0000 (12:19 +0000)
committerAntti Kantee <pooka@iki.fi>
Fri, 19 Dec 2014 12:19:49 +0000 (12:19 +0000)
buildrump.sh
buildxen.sh

index a33a49a027832945e2c65842cb630be3ed4bd4f4..6982264103ef2eda32c4a3f90266fec7bad91a22 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a33a49a027832945e2c65842cb630be3ed4bd4f4
+Subproject commit 6982264103ef2eda32c4a3f90266fec7bad91a22
index ae7f1eeb052ae05affdd62650127ba2c51014174..718b89bea01fcae5099f7b6b78537c36f6e6b971 100755 (executable)
@@ -1,72 +1,23 @@
 #!/bin/sh
 
-# Just a script to run the handful of commands required for a
-# bootable domU image.  This is mostly to document the commands
-# required, and is not pretending to be fancy.
-
-STDJ='-j4'
-RUMPSRC=rumpsrc
-
-while getopts '?qs:' opt; do
-       case "$opt" in
-       's')
-               RUMPSRC=${OPTARG}
-               ;;
-       'q')
-               BUILDXEN_QUIET=${BUILDXEN_QUIET:=-}q
-               ;;
-       '?')
-               exit 1
-       esac
-done
-shift $((${OPTIND} - 1))
-
-# the buildxen.sh is not as forgiving as I am
-set -e
-
-[ ! -f ./buildrump.sh/subr.sh ] && git submodule update --init buildrump.sh
-. ./buildrump.sh/subr.sh
-
-if git submodule status ${RUMPSRC} | grep -q '^-' ; then
-       git submodule update --init --recursive ${RUMPSRC}
-fi
-[ "$1" = "justcheckout" ] && { echo ">> $0 done" ; exit 0; }
-
-# build tools
-./buildrump.sh/buildrump.sh ${BUILDXEN_QUIET} ${STDJ} -k \
-    -V MKPIC=no -s ${RUMPSRC} -T rumptools -o rumpobj -N \
-    -V RUMP_KERNEL_IS_LIBC=1 "$@" tools
-
-# set some special variables.
-cat >> rumptools/mk.conf << EOF
-# maxphys = 32k is a Xen limitation (64k - overhead)
+IFS=' '
+BUILDXENMETAL_MKCONF="# maxphys = 32k is a Xen limitation (64k - overhead)
 CPPFLAGS+=-DMAXPHYS=32768
-.if defined(LIB) && \${LIB} == "pthread"
+.if defined(LIB) && \${LIB} == \"pthread\"
 .PATH: $(pwd)
 PTHREAD_MAKELWP=pthread_makelwp_rumprunxen.c
 CPPFLAGS+=      -D_PTHREAD_GETTCB_EXT=_lwp_rumpxen_gettcb
-.endif  # LIB == pthread
-EOF
-
-RUMPMAKE=$(pwd)/rumptools/rumpmake
-MACHINE=$(${RUMPMAKE} -f /dev/null -V '${MACHINE}')
-[ -z "${MACHINE}" ] && die could not figure out target machine
-
-# build rump kernel
-./buildrump.sh/buildrump.sh ${BUILDXEN_QUIET} ${STDJ} -k \
-    -V MKPIC=no -s ${RUMPSRC} -T rumptools -o rumpobj -N \
-    -V RUMP_KERNEL_IS_LIBC=1 "$@" build kernelheaders install
+.endif  # LIB == pthread"
+unset IFS
 
-LIBS="$(stdlibs ${RUMPSRC})"
-usermtree rump
-userincludes ${RUMPSRC} ${LIBS}
+export BUILDXENMETAL_MKCONF
+export BUILDXENMETAL_PCI_P=true
 
-for lib in ${LIBS}; do
-       makeuserlib ${lib}
-done
-
-makepci ${RUMPSRC}
+[ ! -f ./buildrump.sh/subr.sh ] && git submodule update --init buildrump.sh
+. ./buildrump.sh/subr.sh
+./buildrump.sh/xenbaremetal.sh "$@" || die xenbaremetal.sh failed
 
+RUMPMAKE="$(pwd)/rumptools/rumpmake"
 makekernlib ()
 {
        lib=$1