Commit e56d931a authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-kconfig' into staging



Initial Kconfig work, excluding ARM and MIPS

# gpg: Signature made Thu 07 Mar 2019 20:54:27 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream-kconfig: (54 commits)
  kconfig: add documentation
  .travis.yml: test that no-default-device builds do not regress
  xtensa-softmmu.mak: express dependencies with Kconfig
  unicore32-softmmu.mak: express dependencies with Kconfig
  sparc64-softmmu.mak: express dependencies with Kconfig
  sparc-softmmu.mak: express dependencies with Kconfig
  sh4-softmmu.mak: express dependencies with Kconfig
  s390x: express dependencies with Kconfig
  riscv-softmmu.mak: replace CONFIG_* with Kconfig "select" directives
  or1k-softmmu.mak: express dependencies with Kconfig
  nios2-softmmu.mak: express dependencies with Kconfig
  moxie-softmmu.mak: express dependencies with Kconfig
  microblaze-softmmu.mak: express dependencies with Kconfig
  m68k-softmmu.mak: express dependencies with Kconfig
  lm32-softmmu.mak: express dependencies with Kconfig
  hppa-softmmu.mak: express dependencies with Kconfig
  cris-softmmu.mak: express dependencies with Kconfig
  alpha-softmmu.mak: express dependencies with Kconfig
  ppc: Express dependencies of the embedded machines with kconfig
  ppc: Express dependencies of the Sam460EX machines with kconfig
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents c4e0780e 576c3f2f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -149,6 +149,12 @@ matrix:
        - ${SRC_DIR}/scripts/travis/coverage-summary.sh


    # We manually include builds which we disable "make check" for
    - env:
        - CONFIG="--without-default-devices"
        - TEST_CMD=""


    # We manually include builds which we disable "make check" for
    - env:
        - CONFIG="--enable-debug --enable-tcg-interpreter"

Kconfig.host

0 → 100644
+33 −0
Original line number Diff line number Diff line
# These are "proxy" symbols used to pass config-host.mak values
# down to Kconfig.  See also MINIKCONF_ARGS in the Makefile:
# these two need to be kept in sync.

config KVM
    bool

config LINUX
    bool

config OPENGL
    bool

config X11
    bool

config SPICE
    bool

config IVSHMEM
    bool

config TPM
    bool

config VHOST_USER
    bool

config XEN
    bool

config VIRTFS
    bool
+22 −5
Original line number Diff line number Diff line
@@ -327,8 +327,8 @@ DOCS=
endif

SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(filter %-softmmu, $(TARGET_DIRS)))
SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %.d, $(SUBDIR_DEVICES_MAK))

ifeq ($(SUBDIR_DEVICES_MAK),)
config-all-devices.mak:
@@ -343,9 +343,26 @@ endif

-include $(SUBDIR_DEVICES_MAK_DEP)

%/config-devices.mak: default-configs/%.mak $(SRC_PATH)/scripts/make_device_config.sh
	$(call quiet-command, \
            $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< $*-config-devices.mak.d $@ > $@.tmp,"GEN","$@.tmp")
# This has to be kept in sync with Kconfig.host.
MINIKCONF_ARGS = \
    $(CONFIG_MINIKCONF_MODE) \
    $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
    CONFIG_KVM=$(CONFIG_KVM) \
    CONFIG_SPICE=$(CONFIG_SPICE) \
    CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
    CONFIG_TPM=$(CONFIG_TPM) \
    CONFIG_XEN=$(CONFIG_XEN) \
    CONFIG_OPENGL=$(CONFIG_OPENGL) \
    CONFIG_X11=$(CONFIG_X11) \
    CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
    CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
    CONFIG_LINUX=$(CONFIG_LINUX)

MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \

$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS) $(BUILD_DIR)/config-host.mak
	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
	$(call quiet-command, if test -f $@; then \
	  if cmp -s $@.old $@; then \
	    mv $@.tmp $@; \
+6 −1
Original line number Diff line number Diff line
@@ -4,9 +4,12 @@ BUILD_DIR?=$(CURDIR)/..

include ../config-host.mak
include config-target.mak
include config-devices.mak
include $(SRC_PATH)/rules.mak

ifdef CONFIG_SOFTMMU
include config-devices.mak
endif

$(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
ifdef CONFIG_LINUX
QEMU_CFLAGS += -I../linux-headers
@@ -201,7 +204,9 @@ all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(slirp-obj-y)

ifdef CONFIG_SOFTMMU
$(QEMU_PROG_BUILD): config-devices.mak
endif

COMMON_LDADDS = ../libqemuutil.a

+29 −13
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ gcrypt_hmac="no"
auth_pam=""
vte=""
virglrenderer=""
tpm="yes"
tpm=""
libssh2=""
live_block_migration="yes"
numa=""
@@ -487,7 +487,7 @@ libxml2=""
docker="no"
debug_mutex="no"
libpmem=""
libudev="no"
default_devices="yes"

# cross compilers defaults, can be overridden with --cross-cc-ARCH
cross_cc_aarch64="aarch64-linux-gnu-gcc"
@@ -996,6 +996,10 @@ for opt do
  ;;
  --with-trace-file=*) trace_file="$optarg"
  ;;
  --with-default-devices) default_devices="yes"
  ;;
  --without-default-devices) default_devices="no"
  ;;
  --enable-gprof) gprof="yes"
  ;;
  --enable-gcov) gcov="yes"
@@ -3873,20 +3877,20 @@ EOF
fi

##########################################
# TPM passthrough is only on x86 Linux
# TPM emulation is only on POSIX

if test "$targetos" = Linux && { test "$cpu" = i386 || test "$cpu" = x86_64; }; then
  tpm_passthrough=$tpm
if test "$tpm" = ""; then
  if test "$mingw32" = "yes"; then
    tpm=no
  else
  tpm_passthrough=no
    tpm=yes
  fi
elif test "$tpm" = "yes"; then
  if test "$mingw32" = "yes" ; then
    error_exit "TPM emulation only available on POSIX systems"
  fi

# TPM emulator is for all posix systems
if test "$mingw32" != "yes"; then
  tpm_emulator=$tpm
else
  tpm_emulator=no
fi

##########################################
# attr probe

@@ -6261,6 +6265,7 @@ echo "capstone $capstone"
echo "docker            $docker"
echo "libpmem support   $libpmem"
echo "libudev           $libudev"
echo "default devices   $default_devices"

if test "$supported_cpu" = "no"; then
    echo
@@ -6322,6 +6327,11 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak

echo "ARCH=$ARCH" >> $config_host_mak

if test "$default_devices" = "yes" ; then
  echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak
else
  echo "CONFIG_MINIKCONF_MODE=--allnoconfig" >> $config_host_mak
fi
if test "$debug_tcg" = "yes" ; then
  echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
fi
@@ -7438,12 +7448,18 @@ fi

if supported_xen_target $target; then
    echo "CONFIG_XEN=y" >> $config_target_mak
    echo "$target/config-devices.mak: CONFIG_XEN=y" >> $config_host_mak
    if test "$xen_pci_passthrough" = yes; then
        echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
    fi
else
    echo "$target/config-devices.mak: CONFIG_XEN=n" >> $config_host_mak
fi
if supported_kvm_target $target; then
    echo "CONFIG_KVM=y" >> $config_target_mak
    echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak
else
    echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak
fi
if supported_hax_target $target; then
    echo "CONFIG_HAX=y" >> $config_target_mak
Loading