diff options
author | Patrick Venture <venture@google.com> | 2019-07-01 17:33:03 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-07-03 11:29:48 -0700 |
commit | 7c2a00e02f1f0169b3e80ef1715002cefc6fa0d0 (patch) | |
tree | 5671508e11db1677fb5e0ea5e6ce9f575c4c0325 /configure.ac | |
parent | fa06a5f0056e91bfada390c4007fbd3472d75a56 (diff) | |
download | phosphor-ipmi-flash-7c2a00e02f1f0169b3e80ef1715002cefc6fa0d0.tar.gz phosphor-ipmi-flash-7c2a00e02f1f0169b3e80ef1715002cefc6fa0d0.zip |
build: add option --enable-host-bios
Add option to enable building in support for the host bios.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I324fc071f07cd364fd39c7df1ccfd9f0fd509a46
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e6a1a8b..aea5d42 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,12 @@ AC_ARG_ENABLE([build-bmc-blob-handler], ) AM_CONDITIONAL([BUILD_BMC_HANDLER], [test "x$enable_build_bmc_blob_handler" != "xno"]) +# Enable building host-bios support into the BMC (default: no) +# This is only set if build-bmc-blob-handler is not "no." +AC_ARG_ENABLE([host-bios], + AC_HELP_STRING([--enable-host-bios], [Enable supporting the host bios]) +) + # Build the BMC by default, so check if set to no. AS_IF([test "x$enable_build_bmc_blob_handler" != "xno"], [ PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) @@ -97,6 +103,10 @@ AS_IF([test "x$enable_build_bmc_blob_handler" != "xno"], [ [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])] ) AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) + + # Only set if build-bmc-blob-handler wasn't unset. + AM_CONDITIONAL([ENABLE_HOST_BIOS], [test "$enable_host_bios" = "xyes"]) + AX_APPEND_COMPILE_FLAGS([-DENABLE_HOST_BIOS], [CXXFLAGS]) ]) # If not building the host-tool, we're building the BMC. @@ -254,6 +264,20 @@ AC_DEFINE_UNQUOTED( ) AC_ARG_VAR( + BIOS_STAGED_NAME, + [The file to use for staging the bios firmware update.] +) +AS_IF( + [test "x$BIOS_STAGED_NAME" == "x"], + [BIOS_STAGED_NAME="/tmp/bios-image"] +) +AC_DEFINE_UNQUOTED( + [BIOS_STAGED_NAME], + ["$BIOS_STAGED_NAME"], + [The file to use for staging the bios firmware update.] +) + +AC_ARG_VAR( HASH_FILENAME, [The file to use for the hash provided.] ) @@ -296,6 +320,20 @@ AC_DEFINE_UNQUOTED( ) AC_ARG_VAR( + BIOS_VERIFY_STATUS_FILENAME, + [The file checked for the verification status.] +) +AS_IF( + [test "x$BIOS_VERIFY_STATUS_FILENAME" == "x"], + [BIOS_VERIFY_STATUS_FILENAME="/tmp/bios.verify"] +) +AC_DEFINE_UNQUOTED( + [BIOS_VERIFY_STATUS_FILENAME], + ["$BIOS_VERIFY_STATUS_FILENAME"], + [The file checked for the verification status.] +) + +AC_ARG_VAR( VERIFY_DBUS_SERVICE, [The systemd target started for verification.] ) @@ -323,6 +361,46 @@ AC_DEFINE_UNQUOTED( [The systemd target started for updating the BMC.] ) +AC_ARG_VAR( + PREPARATION_BIOS_TARGET, + [The systemd target started when the host starts to send an update.] +) +AS_IF( + [test "x$PREPARATION_BIOS_TARGET" == "x"], + [PREPARATION_BIOS_TARGET="phosphor-ipmi-flash-bios-prepare.target"] +) +AC_DEFINE_UNQUOTED( + [PREPARATION_BIOS_TARGET], + ["$PREPARATION_BIOS_TARGET"], + [The systemd target started when the host starts to send an update.] +) +AC_ARG_VAR( + VERIFY_BIOS_TARGET, + [The systemd target started for verifying the BIOS image.] +) +AS_IF( + [test "x$VERIFY_BIOS_TARGET" == "x"], + [VERIFY_BIOS_TARGET="phosphor-ipmi-flash-bios-verify.target"] +) +AC_DEFINE_UNQUOTED( + [VERIFY_BIOS_TARGET], + ["$VERIFY_BIOS_TARGET"], + [The systemd target started for verifying the BIOS image.] +) +AC_ARG_VAR( + UPDATE_BIOS_TARGET, + [The systemd target started for updating the BIOS.] +) +AS_IF( + [test "x$UPDATE_BIOS_TARGET" == "x"], + [UPDATE_BIOS_TARGET="phosphor-ipmi-flash-bios-update.target"] +) +AC_DEFINE_UNQUOTED( + [UPDATE_BIOS_TARGET], + ["$UPDATE_BIOS_TARGET"], + [The systemd target started for updating the BIOS.] +) + AC_CHECK_HEADER(linux/ipmi.h, [HAVE_LINUX_IPMI_H=""], [HAVE_LINUX_IPMI_H="-I linux/ipmi.h"]) AS_IF([test "$HAVE_LINUX_IPMI_H" != ""], AC_MSG_WARN([Could not find linux/ipmi.h: Attempting to download locally for building from openbmc/linux/+/dev-4.18]) @@ -458,4 +536,7 @@ AC_CONFIG_FILES([cleanup/Makefile cleanup/test/Makefile]) AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bmc-prepare.target]) AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bmc-verify.target]) AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bmc-update.target]) +AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bios-prepare.target]) +AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bios-verify.target]) +AC_CONFIG_FILES([bmc/phosphor-ipmi-flash-bios-update.target]) AC_OUTPUT |