From 72666216a8be963706fdb9c2990865ad3c2fa341 Mon Sep 17 00:00:00 2001 From: espes Date: Wed, 20 Mar 2013 09:44:44 +1100 Subject: [PATCH] Make xbox a target instead of just a config option --- configure | 5 +++++ default-configs/xbox-softmmu.mak | 21 +++++++++++++++++++++ hw/Makefile.objs | 2 ++ hw/i386/Makefile.objs | 3 +-- hw/{ => i386}/xbox.c | 28 ++++++++++++++-------------- 5 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 default-configs/xbox-softmmu.mak rename hw/{ => i386}/xbox.c (96%) diff --git a/configure b/configure index 6abf3bda17..837d30346b 100755 --- a/configure +++ b/configure @@ -4112,6 +4112,11 @@ case "$target_arch2" in ;; unicore32) ;; + xbox) + target_arch2=i386 + TARGET_ARCH=i386 + TARGET_BASE_ARCH=i386 + ;; xtensa|xtensaeb) TARGET_ARCH=xtensa ;; diff --git a/default-configs/xbox-softmmu.mak b/default-configs/xbox-softmmu.mak new file mode 100644 index 0000000000..ad79b0be1d --- /dev/null +++ b/default-configs/xbox-softmmu.mak @@ -0,0 +1,21 @@ +# Default configuration for xbox-softmmu + +include pci.mak +include usb.mak +CONFIG_VGA=y +CONFIG_VGA_PCI=y +CONFIG_VMMOUSE=y +CONFIG_I8254=y +CONFIG_PCSPK=y +CONFIG_PCKBD=y +CONFIG_FDC=y +CONFIG_ACPI=y +CONFIG_APM=y +CONFIG_DMA=y +CONFIG_IDE_ISA=y +CONFIG_IDE_PIIX=y +CONFIG_SOUND=y +CONFIG_HPET=y +CONFIG_I8259=y +CONFIG_PFLASH_CFI01=y +CONFIG_XBOX=y diff --git a/hw/Makefile.objs b/hw/Makefile.objs index eb7eb31a19..66e7cba4ff 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -213,4 +213,6 @@ obj-$(CONFIG_KVM) += ivshmem.o obj-$(CONFIG_LINUX) += vfio_pci.o endif +obj-$(CONFIG_XBOX) += xbox_pci.o acpi_xbox.o amd_smbus.o nv2a.o nv2a_vsh.o mcpx_apu.o mcpx_aci.o smbus_xbox_smc.o smbus_cx25871.o smbus_adm1032.o + endif diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 0f78e36fdd..dcd62aa113 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -13,12 +13,11 @@ obj-y += kvm/ obj-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o obj-y += pc-testdev.o -obj-$(CONFIG_XBOX) += xbox.o xbox_pci.o acpi_xbox.o amd_smbus.o nv2a.o nv2a_vsh.o mcpx_apu.o mcpx_aci.o smbus_xbox_smc.o smbus_cx25871.o smbus_adm1032.o - obj-y := $(addprefix ../,$(obj-y)) obj-y += multiboot.o smbios.o obj-y += pc.o pc_piix.o pc_q35.o +obj-$(CONFIG_XBOX) += xbox.o obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o obj-y += kvmvapic.o diff --git a/hw/xbox.c b/hw/i386/xbox.c similarity index 96% rename from hw/xbox.c rename to hw/i386/xbox.c index 7ba73dc52e..6eba38fab3 100644 --- a/hw/xbox.c +++ b/hw/i386/xbox.c @@ -20,25 +20,25 @@ * along with this program; if not, see . */ -#include "hw.h" +#include "hw/hw.h" #include "sysemu/arch_init.h" -#include "pc.h" -#include "pci/pci.h" -#include "boards.h" -#include "ide.h" -#include "mc146818rtc.h" -#include "i8254.h" -#include "pcspk.h" +#include "hw/pc.h" +#include "hw/pci/pci.h" +#include "hw/boards.h" +#include "hw/ide.h" +#include "hw/mc146818rtc.h" +#include "hw/i8254.h" +#include "hw/pcspk.h" #include "sysemu/sysemu.h" -#include "sysbus.h" -#include "smbus.h" +#include "hw/sysbus.h" +#include "hw/smbus.h" #include "sysemu/blockdev.h" -#include "loader.h" +#include "hw/loader.h" #include "exec/address-spaces.h" -#include "xbox_pci.h" -#include "nv2a.h" -#include "mcpx_apu.h" +#include "hw/xbox_pci.h" +#include "hw/nv2a.h" +#include "hw/mcpx_apu.h" /* mostly from pc_memory_init */ static void xbox_memory_init(MemoryRegion *system_memory,