Files
xen/automation/scripts/build
T
Wei Liu b9fb402ec3 automation: stash default config file for artifact extraction
This aids troubleshooting when we notice a failure in the default
configuration.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2018-11-20 16:55:10 +00:00

45 lines
1.1 KiB
Python
Executable File

#!/bin/bash -ex
$CC --version
# random config or default config
if [[ "${RANDCONFIG}" == "y" ]]; then
make -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
else
make -C xen defconfig
fi
# build up our configure options
cfgargs=()
cfgargs+=("--enable-docs")
if [[ "${CC}" == "clang" ]]; then
# SeaBIOS cannot be built with clang
cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
# iPXE cannot be built with clang so we cannot build rombios
cfgargs+=("--disable-rombios")
# newlib cannot be built with clang so we cannot build stubdoms
cfgargs+=("--disable-stubdom")
fi
./configure "${cfgargs[@]}"
make -j$(nproc) dist
# Extract artifacts to avoid getting rewritten by customised builds
cp xen/.config xen-config
# Build all the configs we care about
case ${XEN_TARGET_ARCH} in
x86_64) arch=x86 ;;
*) exit 0 ;;
esac
cfg_dir="automation/configs/${arch}"
for cfg in `ls ${cfg_dir}`; do
echo "Building $cfg"
rm -f xen/.config
make -C xen KBUILD_DEFCONFIG=../../../../${cfg_dir}/${cfg} XEN_CONFIG_EXPERT=y defconfig
make -j$(nproc) -C xen XEN_CONFIG_EXPERT=y
done