mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
The Xen configurations for the ARM64 and X86_64 ECLAIR analyses
is currently held in fixed files under
'automation/eclair_analysis/xen_{arm,x86}_config'. The values
of the configuration options there are susceptible to going stale
due to configuration option changes.
To enhance maintainability, the configuration under analysis is
derived from the respective architecture's defconfig, with suitable
changes added via EXTRA_XEN_CONFIG.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
55 lines
1.1 KiB
Bash
Executable File
55 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Stop immediately if any executed command has exit status different from 0.
|
|
set -e
|
|
|
|
script_name="$(basename "$0")"
|
|
script_dir="$(
|
|
cd "$(dirname "$0")"
|
|
echo "${PWD}"
|
|
)"
|
|
|
|
fatal() {
|
|
echo "${script_name}: $*" >&2
|
|
exit 1
|
|
}
|
|
|
|
usage() {
|
|
fatal "Usage: ${script_name}"
|
|
}
|
|
|
|
if [ $# -ne 1 ]; then
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
export XEN_TARGET_ARCH
|
|
|
|
if [ "$1" = "X86_64" ]; then
|
|
XEN_TARGET_ARCH=x86_64
|
|
elif [ "$1" = "ARM64" ]; then
|
|
XEN_TARGET_ARCH=arm64
|
|
else
|
|
fatal "Unknown configuration: $1"
|
|
fi
|
|
|
|
(
|
|
make -C xen defconfig
|
|
if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then
|
|
echo "${EXTRA_XEN_CONFIG}" >> xen/.config
|
|
fi
|
|
|
|
./configure
|
|
make clean
|
|
find . -type f -name "*.safparse" -print -delete
|
|
"${script_dir}/build.sh" "$1"
|
|
# Generate additional configuration files
|
|
"${script_dir}/ECLAIR/generate_ecl.sh"
|
|
make clean
|
|
cd xen
|
|
make -f "${script_dir}/Makefile.prepare" prepare
|
|
# Translate the /* SAF-n-safe */ comments into ECLAIR CBTs
|
|
scripts/xen-analysis.py --run-eclair --no-build --no-clean
|
|
# Translate function-properties.json into ECLAIR properties
|
|
python3 "${script_dir}/propertyparser.py"
|
|
)
|