util/abuild: Disable unspecified payload options

We have two payload options in abuild:
"None" or a pointer to an elf file.

This disables all other options in abuild, and makes disabling the other
options common to both valid options.

Change-Id: Icbd6fde4343ac1cff05778131f9e54370baf4224
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/26162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
This commit is contained in:
Martin Roth 2018-05-07 21:44:37 -05:00 committed by Patrick Georgi
parent b77cbbe1b0
commit 735b9a0d1c
1 changed files with 17 additions and 9 deletions

View File

@ -250,8 +250,18 @@ function update_config
if [ "$PAYLOAD" = "none" ]; then if [ "$PAYLOAD" = "none" ]; then
{ {
echo "CONFIG_PAYLOAD_NONE=y" echo "CONFIG_PAYLOAD_NONE=y"
echo "# CONFIG_PAYLOAD_SEABIOS is not set"
echo "# CONFIG_PAYLOAD_ELF is not set" echo "# CONFIG_PAYLOAD_ELF is not set"
} >> "${config_file}"
elif [ "$PAYLOAD" != "/dev/null" ]; then
{
echo "# CONFIG_PAYLOAD_NONE is not set"
echo "CONFIG_PAYLOAD_ELF=y"
echo "CONFIG_PAYLOAD_FILE=\"$PAYLOAD\""
} >> "${config_file}"
fi
# Disable all other payload config options
{
echo "# CONFIG_PAYLOAD_SEABIOS is not set"
echo "# CONFIG_PAYLOAD_BAYOU is not set" echo "# CONFIG_PAYLOAD_BAYOU is not set"
echo "# CONFIG_PAYLOAD_FILO is not set" echo "# CONFIG_PAYLOAD_FILO is not set"
echo "# CONFIG_PAYLOAD_GRUB2 is not set" echo "# CONFIG_PAYLOAD_GRUB2 is not set"
@ -259,15 +269,13 @@ function update_config
echo "# CONFIG_PAYLOAD_DEPTHCHARGE is not set" echo "# CONFIG_PAYLOAD_DEPTHCHARGE is not set"
echo "# CONFIG_PAYLOAD_UBOOT is not set" echo "# CONFIG_PAYLOAD_UBOOT is not set"
echo "# CONFIG_PAYLOAD_TIANOCORE is not set" echo "# CONFIG_PAYLOAD_TIANOCORE is not set"
echo "# CONFIG_PXE is not set"
echo "# CONFIG_BUILD_IPXE is not set"
echo "# CONFIG_MEMTEST_SECONDARY_PAYLOAD is not set"
echo "# CONFIG_COREINFO_SECONDARY_PAYLOAD is not set"
echo "# CONFIG_NVRAMCUI_SECONDARY_PAYLOAD is not set"
echo "# CONFIG_TINT_SECONDARY_PAYLOAD is not set"
} >> "${config_file}" } >> "${config_file}"
elif [ "$PAYLOAD" != "/dev/null" ]; then
{
echo "# CONFIG_PAYLOAD_NONE is not set"
echo "# CONFIG_PAYLOAD_SEABIOS is not set"
echo "CONFIG_PAYLOAD_ELF=y"
echo "CONFIG_PAYLOAD_FILE=\"$PAYLOAD\""
} >> "${config_file}"
fi
if [ "$quiet" == "false" ]; then echo " $MAINBOARD ($customizing)"; fi if [ "$quiet" == "false" ]; then echo " $MAINBOARD ($customizing)"; fi
# shellcheck disable=SC2059 # shellcheck disable=SC2059