diff options
| -rwxr-xr-x | build.sh | 11 | ||||
| -rwxr-xr-x | common.sh | 9 |
2 files changed, 16 insertions, 4 deletions
@@ -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 @@ -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}" |
