aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh11
-rwxr-xr-xcommon.sh9
2 files changed, 16 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index c0d40d3..25928cb 100755
--- a/build.sh
+++ b/build.sh
@@ -11,8 +11,10 @@ function usage()
echo " where COMPONENT is an individual component to build:"
echo " qemu, ovmf, kernel"
echo " where OPTIONS are:"
- echo " --install PATH Installation path (default $INSTALL_DIR)"
- echo " -h|--help Usage information"
+ echo " --install PATH Installation path (default $INSTALL_DIR)"
+ echo " --package [qemu|ovmf|[kernel [host|guest]]"
+ echo " Build packages (default is all of them)"
+ echo " -h|--help Usage information"
exit 1
}
@@ -54,7 +56,7 @@ INSTALL_DIR=$(readlink -e $INSTALL_DIR)
if [ -z "$1" ]; then
build_install_qemu "$INSTALL_DIR"
build_install_ovmf "$INSTALL_DIR/share/qemu"
- build_kernel
+ build_kernel $2
else
case "$1" in
qemu)
@@ -64,7 +66,8 @@ else
build_install_ovmf "$INSTALL_DIR/share/qemu"
;;
kernel)
- build_kernel
+ # additional argument of "host" or "guest" can be added to limit build to that type
+ build_kernel $2
;;
esac
fi
diff --git a/common.sh b/common.sh
index 6cb297e..9583710 100755
--- a/common.sh
+++ b/common.sh
@@ -13,10 +13,19 @@ run_cmd()
build_kernel()
{
set -x
+ kernel_type=$1
+ shift
mkdir -p linux
pushd linux >/dev/null
for V in guest host; do
+ # Check if only a "guest" or "host" or kernel build is requested
+ if [ "$kernel_type" != "" ]; then
+ if [ "$kernel_type" != "$V" ]; then
+ continue
+ fi
+ fi
+
[ -d ${V} ] || {
if [ "${V}" = "guest" ]; then
BRANCH="${KERNEL_GUEST_BRANCH}"