#!/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##*/} arch=$(arch) # Array of configure options. # # Each element is comprised of two parts in the form: # # tags:option # # Where, # # - 'tags' is a comma-separated list of values which denote why # the option is being specified. # # - 'option' is the hypervisor configuration option. typeset -a qemu_options 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). -s : Generate options to build static Example: $ $script_name qemu-lite EOT } show_tags_header() { local keys local key local value cat <