Skip to content

Commit

Permalink
configure: modify default of building rombios
Browse files Browse the repository at this point in the history
The tools/configure script will default to build rombios if qemu
traditional is enabled. If rombios is being built, ipxe will be built
per default, too.

This results in rombios and ipxe no longer being built by default when
disabling qemu traditional.

Fix that be rearranging the dependencies:

- build ipxe by default
- build rombios by default if either ipxe or qemu traditional are
  being built

This modification prepares not building qemu traditional by default
without affecting build of rombios and ipxe.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-acked-by: Ian Jackson <iwj@xenproject.org>
  • Loading branch information
jgross1 authored and andyhhp committed Nov 4, 2021
1 parent 86a192e commit bcf77ce
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 97 deletions.
115 changes: 53 additions & 62 deletions tools/configure
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ APPEND_INCLUDES
PREPEND_LIB
PREPEND_INCLUDES
EXTRA_QEMUU_CONFIGURE_ARGS
ipxe
qemu_xen_systemd
qemu_xen_path
qemu_xen
rombios
BCC
LD86
AS86
ipxe
qemu_traditional
LINUX_BACKEND_MODULES
golang
Expand Down Expand Up @@ -815,13 +815,13 @@ enable_seabios
enable_golang
with_linux_backend_modules
enable_qemu_traditional
enable_ipxe
with_system_ipxe
enable_rombios
with_system_qemu
with_stubdom_qmp_proxy
with_system_seabios
with_system_ovmf
enable_ipxe
with_system_ipxe
with_extra_qemuu_configure_args
with_xenstored
enable_systemd
Expand Down Expand Up @@ -1504,10 +1504,10 @@ Optional Features:
--enable-qemu-traditional
Enable qemu traditional device model, (DEFAULT is on
for Linux or NetBSD x86, otherwise off)
--enable-ipxe Enable in-tree IPXE, (DEFAULT is on for x86,
otherwise off, see also --with-system-ipxe)
--enable-rombios Enable ROMBIOS, (DEFAULT is on if qemu-traditional
is enabled, otherwise off)
--disable-ipxe Enable in-tree IPXE, (DEFAULT is on if rombios is
enabled, otherwise off, see also --with-system-ipxe)
or ipxe is enabled, otherwise off)
--enable-systemd Enable systemd support (default is DISABLED)
--enable-9pfs Explicitly enable 9pfs support in QEMU build
(default is to defer to QEMU configure default)
Expand Down Expand Up @@ -1538,6 +1538,11 @@ Optional Packages:
--with-linux-backend-modules="mod1 mod2"
List of Linux backend module or modalias names to be
autoloaded on startup.
--with-system-ipxe[=PATH]
Use system supplied IPXE PATH instead of building
and installing our own version, it takes precedence
over --{en,dis}able-ipxe, --without-system-ipxe is
an error
--with-system-qemu[=PATH]
Use system supplied qemu PATH or qemu (taken from
$PATH) as qemu-xen device model instead of building
Expand All @@ -1551,12 +1556,6 @@ Optional Packages:
--with-system-ovmf[=PATH]
Use system supplied OVMF PATH instead of building
and installing our own version
--with-system-ipxe[=PATH]
Use system supplied IPXE PATH instead of building
and installing our own version, it takes precedence
over --{en,dis}able-ipxe and is bound by the
presence of rombios, --without-system-ipxe is an
error
--with-extra-qemuu-configure-args[="--ARG1 ..."]
List of additional configure options for upstream
qemu
Expand Down Expand Up @@ -4314,13 +4313,54 @@ else

fi

if test "x$enable_ipxe" = "xno"; then :
ipxe=n
else
ipxe=y
fi

# Check whether --enable-ipxe was given.
if test "${enable_ipxe+set}" = set; then :
enableval=$enable_ipxe;
else

case "$host_cpu" in
i[3456]86|x86_64)
enable_ipxe="yes";;
*) enable_ipxe="no";;
esac

fi


# Check whether --with-system-ipxe was given.
if test "${with_system_ipxe+set}" = set; then :
withval=$with_system_ipxe;
case $withval in
no) as_fn_error $? "--without-system-ipxe has no effect" "$LINENO" 5 ;;
/*) ipxe_path=$withval; ipxe=n ;;
*) as_fn_error $? "IPXE specified, but is not an absolute path" "$LINENO" 5 ;;
esac

fi

if test "x$ipxe" = "xy" -o -n "$ipxe_path" ; then :


cat >>confdefs.h <<_ACEOF
#define IPXE_PATH "${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"
_ACEOF


fi


# Check whether --enable-rombios was given.
if test "${enable_rombios+set}" = set; then :
enableval=$enable_rombios;
else

if test "x$enable_qemu_traditional" = "xyes"; then :
if test "x$enable_qemu_traditional" = "xyes" -o "x$enable_ipxe" = "xyes"; then :

enable_rombios="yes"

Expand Down Expand Up @@ -4635,55 +4675,6 @@ _ACEOF

fi

# Check whether --enable-ipxe was given.
if test "${enable_ipxe+set}" = set; then :
enableval=$enable_ipxe;
if test "x$enable_ipxe" = "xno"; then :
ipxe=n
else
ipxe=y
fi

else

if test "x$enable_rombios" = "xno"; then :
ipxe=n
else
ipxe=y
fi

fi


# Check whether --with-system-ipxe was given.
if test "${with_system_ipxe+set}" = set; then :
withval=$with_system_ipxe;
case $withval in
no) as_fn_error $? "--without-system-ipxe has no effect" "$LINENO" 5 ;;
/*) ipxe_path=$withval; ipxe=n ;;
*) as_fn_error $? "IPXE specified, but is not an absolute path" "$LINENO" 5 ;;
esac

fi

if test "x$ipxe" = "xy" -o -n "$ipxe_path" ; then :


if test "x$enable_rombios" = "xno"; then :

as_fn_error $? "Rombios is required to use IPXE" "$LINENO" 5

fi


cat >>confdefs.h <<_ACEOF
#define IPXE_PATH "${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"
_ACEOF


fi



# Check whether --with-extra-qemuu-configure-args was given.
if test "${with_extra_qemuu_configure_args+set}" = set; then :
Expand Down
67 changes: 32 additions & 35 deletions tools/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,40 @@ AC_DEFINE([HAVE_QEMU_TRADITIONAL], [1], [Qemu traditional enabled])
])
AC_SUBST(qemu_traditional)

AC_ARG_ENABLE([ipxe],
AS_HELP_STRING([--enable-ipxe],
[Enable in-tree IPXE, (DEFAULT is on for x86,
otherwise off, see also --with-system-ipxe)]),,[
case "$host_cpu" in
i[[3456]]86|x86_64)
enable_ipxe="yes";;
*) enable_ipxe="no";;
esac
])
AS_IF([test "x$enable_ipxe" = "xno"], [ipxe=n], [ipxe=y])
AC_ARG_WITH([system-ipxe],
AS_HELP_STRING([--with-system-ipxe@<:@=PATH@:>@],
[Use system supplied IPXE PATH instead of building and installing
our own version, it takes precedence over --{en,dis}able-ipxe,
--without-system-ipxe is an error]),[
case $withval in
no) AC_MSG_ERROR([--without-system-ipxe has no effect]) ;;
/*) ipxe_path=$withval; ipxe=n ;;
*) AC_MSG_ERROR([IPXE specified, but is not an absolute path]) ;;
esac
],[])
AS_IF([test "x$ipxe" = "xy" -o -n "$ipxe_path" ], [
AC_DEFINE_UNQUOTED([IPXE_PATH],
["${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"],
[IPXE path])
])
AC_SUBST(ipxe)

AC_ARG_ENABLE([rombios],
AS_HELP_STRING([--enable-rombios],
[Enable ROMBIOS, (DEFAULT is on if qemu-traditional is enabled, otherwise off)]),,[
AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
[Enable ROMBIOS, (DEFAULT is on if qemu-traditional or ipxe is enabled,
otherwise off)]),,[
AS_IF([test "x$enable_qemu_traditional" = "xyes" -o "x$enable_ipxe" = "xyes"], [
enable_rombios="yes"
], [
enable_rombios="no"
Expand Down Expand Up @@ -240,39 +270,6 @@ AS_IF([test "x$ovmf" = "xy" -o -n "$ovmf_path" ], [
[OVMF path])
])

AC_ARG_ENABLE([ipxe],
AS_HELP_STRING([--disable-ipxe],
[Enable in-tree IPXE, (DEFAULT is on if rombios is enabled,
otherwise off, see also --with-system-ipxe)]),
[
AS_IF([test "x$enable_ipxe" = "xno"], [ipxe=n], [ipxe=y])
],
[
AS_IF([test "x$enable_rombios" = "xno"], [ipxe=n], [ipxe=y])
])
AC_ARG_WITH([system-ipxe],
AS_HELP_STRING([--with-system-ipxe@<:@=PATH@:>@],
[Use system supplied IPXE PATH instead of building and installing
our own version, it takes precedence over --{en,dis}able-ipxe and is
bound by the presence of rombios, --without-system-ipxe is an error]),[
case $withval in
no) AC_MSG_ERROR([--without-system-ipxe has no effect]) ;;
/*) ipxe_path=$withval; ipxe=n ;;
*) AC_MSG_ERROR([IPXE specified, but is not an absolute path]) ;;
esac
],[])
AS_IF([test "x$ipxe" = "xy" -o -n "$ipxe_path" ], [
AS_IF([test "x$enable_rombios" = "xno"], [
AC_MSG_ERROR([Rombios is required to use IPXE])
], [])
AC_DEFINE_UNQUOTED([IPXE_PATH],
["${ipxe_path:-$XENFIRMWAREDIR/ipxe.bin}"],
[IPXE path])
])
AC_SUBST(ipxe)

AC_ARG_WITH([extra-qemuu-configure-args],
AS_HELP_STRING([--with-extra-qemuu-configure-args@<:@="--ARG1 ..."@:>@],
[List of additional configure options for upstream qemu]),[
Expand Down

0 comments on commit bcf77ce

Please sign in to comment.