diff --git a/scripts/configure-hypervisor.sh b/scripts/configure-hypervisor.sh new file mode 100755 index 00000000..ed11cc8d --- /dev/null +++ b/scripts/configure-hypervisor.sh @@ -0,0 +1,393 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +#--------------------------------------------------------------------- +# Description: This script is the *ONLY* place where "qemu*" build options +# should be defined. +# +# Note to maintainers: +# +# XXX: Every option group *MUST* be documented explaining why it has +# been specified. +#--------------------------------------------------------------------- + +script_name=${0##*/} + +typeset -A recognised_tags + +recognised_tags=( + [arch]="architecture-specific" + [functionality]="required functionality" + [minimal]="specified to avoid building unnecessary elements" + [misc]="miscellaneous" + [security]="specified for security reasons" + [size]="minimise binary size" + [speed]="maximise startup speed" +) + +# Display message to stderr and exit indicating script failed. +die() +{ + local msg="$*" + echo >&2 "$script_name: ERROR: $msg" + exit 1 +} + +# Display usage to stdout. +usage() +{ +cat < + +Options: + + -d : Dump all options along with the tags explaining why each option + is specified. + -h : Display this help. + -m : Display options one per line (includes continuation characters). + +Example: + + $ $script_name qemu-lite + +EOT +} + +show_tags_header() +{ + local keys + local key + local value + + cat <