diff --git a/ReadMe.md b/ReadMe.md index 040e5522..b32634ef 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,5 +1,5 @@ Currently VS2022! TESTFILES build was created via fully updated -VS2022 17.9.1 Windows 11 26058 with the latest 26058 SDK. +VS2022 17.9.2 Windows 11 26063 with the Windows 10 20348 SDK. All code that currently compiles and executes matches an upstream tree now, with just MSVC compatibiilty fixes so that building from this repo for GCC/Linux should @@ -12,7 +12,12 @@ into the project and built alongside the entire solution. WinQemu buils the dll, WinQemuTest builds the exe to actually use it -Hardcoded to use D:\Images\ for files. +Hardcoded to use D:\Images\ for files. - this is not exactly true anymore as we now have +functional parameters for everything. -L specifies where vgabios.bin is, -bios where... +the main bios is, and -hda where the disk image is. small.ffs is NetBSD 1.2 + +Check "WinQemuTest.exe -help" for BIOS options, as by default it skips boot menu +per default configuration from upstream codebase. # Building instructions @@ -61,7 +66,7 @@ in MSVC C Preprocessor currently. Folder TESTFILES contains working bios image and 'small' BSD disk with not much on it but works with these. VGABIOS project for VGA BIOS, and a SeaBIOS image. -QEMU BIOS - build: 05/22/09 +QEMU BIOS - build: 07/11/09 VGABIOS - "current-cvs 17 Dec 2008" Working startup commandline: diff --git a/TESTFILES/WinQemu.dll b/TESTFILES/WinQemu.dll index a1d0b963..7f593725 100644 Binary files a/TESTFILES/WinQemu.dll and b/TESTFILES/WinQemu.dll differ diff --git a/TESTFILES/WinQemu.pdb b/TESTFILES/WinQemu.pdb index 68ef7e54..c97c9056 100644 Binary files a/TESTFILES/WinQemu.pdb and b/TESTFILES/WinQemu.pdb differ diff --git a/TESTFILES/WinQemuTest.exe b/TESTFILES/WinQemuTest.exe index f5881f07..19082293 100644 Binary files a/TESTFILES/WinQemuTest.exe and b/TESTFILES/WinQemuTest.exe differ diff --git a/TESTFILES/WinQemuTest.pdb b/TESTFILES/WinQemuTest.pdb index b42e9c43..7e7d2548 100644 Binary files a/TESTFILES/WinQemuTest.pdb and b/TESTFILES/WinQemuTest.pdb differ diff --git a/WinQemu.vcxproj b/WinQemu.vcxproj index 54092dc1..18a01423 100644 --- a/WinQemu.vcxproj +++ b/WinQemu.vcxproj @@ -18,7 +18,7 @@ {043CD6CD-5932-4FFE-A2E5-173B7682D109} WinQemu Win32Proj - 10.0 + 10.0.20348.0 diff --git a/WinQemuTest/WinQemuTest.vcxproj b/WinQemuTest/WinQemuTest.vcxproj index a8e1c9a1..4cff7d39 100644 --- a/WinQemuTest/WinQemuTest.vcxproj +++ b/WinQemuTest/WinQemuTest.vcxproj @@ -18,7 +18,7 @@ {37B9A41C-2460-44D8-BA57-955D25D76A4F} WinQemuTest Win32Proj - 10.0 + 10.0.20348.0 diff --git a/qemu/Makefile b/qemu/Makefile index a3ae99fd..dc95869d 100644 --- a/qemu/Makefile +++ b/qemu/Makefile @@ -16,10 +16,6 @@ endif VPATH=$(SRC_PATH):$(SRC_PATH)/hw - -CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) -LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS) - CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CPPFLAGS += -U_FORTIFY_SOURCE @@ -67,23 +63,25 @@ recurse-all: $(SUBDIR_RULES) # block-obj-y is code used by both qemu system emulation and qemu-img block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o -block-obj-y += block/cow.o block/qcow.o aes.o block/vmdk.o block/cloop.o -block-obj-y += block/dmg.o block/bochs.o block/vpc.o block/vvfat.o -block-obj-y += block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o -block-obj-y += block/qcow2-snapshot.o -block-obj-y += block/parallels.o block/nbd.o -block-obj-y += nbd.o block.o aio.o +block-obj-y += nbd.o block.o aio.o aes.o + +block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o +block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o +block-nested-y += parallels.o nbd.o + ifdef CONFIG_WIN32 -block-obj-y += block/raw-win32.o +block-nested-y += raw-win32.o else ifdef CONFIG_AIO block-obj-y += posix-aio-compat.o endif -block-obj-y += block/raw-posix.o +block-nested-y += raw-posix.o endif -block-obj-$(CONFIG_CURL) += block/curl.o +block-nested-$(CONFIG_CURL) += curl.o + +block-obj-y += $(addprefix block/, $(block-nested-y)) ###################################################################### # libqemu_common.a: Target independent part of system emulation. The @@ -106,7 +104,7 @@ obj-y += sd.o ssi-sd.o obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o obj-y += bt-hci-csr.o obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o -obj-y += qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o +obj-y += qemu-char.o aio.o net-checksum.o savevm.o obj-y += msmouse.o ps2.o obj-y += qdev.o qdev-properties.o ssi.o diff --git a/qemu/Makefile.hw b/qemu/Makefile.hw index 571e5184..17c73df8 100644 --- a/qemu/Makefile.hw +++ b/qemu/Makefile.hw @@ -8,9 +8,6 @@ include $(SRC_PATH)/rules.mak VPATH=$(SRC_PATH):$(SRC_PATH)/hw -CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) -LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS) - CPPFLAGS += -I. -I.. -I$(SRC_PATH) -MMD -MP -MT $@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CPPFLAGS+=-I$(SRC_PATH)/fpu diff --git a/qemu/Makefile.target b/qemu/Makefile.target index 1a71f3a7..327b03b3 100644 --- a/qemu/Makefile.target +++ b/qemu/Makefile.target @@ -1,62 +1,11 @@ include config.mak include $(SRC_PATH)/rules.mak -TARGET_BASE_ARCH:=$(TARGET_ARCH) -ifeq ($(TARGET_ARCH), x86_64) -TARGET_BASE_ARCH:=i386 -endif -ifeq ($(TARGET_ARCH), mipsn32) -TARGET_BASE_ARCH:=mips -endif -ifeq ($(TARGET_ARCH), mips64) -TARGET_BASE_ARCH:=mips -endif -ifeq ($(TARGET_ARCH), ppc64) -TARGET_BASE_ARCH:=ppc -endif -ifeq ($(TARGET_ARCH), ppc64h) -TARGET_BASE_ARCH:=ppc -endif -ifeq ($(TARGET_ARCH), ppcemb) -TARGET_BASE_ARCH:=ppc -endif -ifeq ($(TARGET_ARCH), sparc64) -TARGET_BASE_ARCH:=sparc -endif TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H #CFLAGS+=-Werror LIBS= -# user emulator name -ifndef TARGET_ARCH2 -TARGET_ARCH2=$(TARGET_ARCH) -endif -ifeq ($(TARGET_ARCH),arm) - ifeq ($(TARGET_WORDS_BIGENDIAN),yes) - TARGET_ARCH2=armeb - endif -endif -ifeq ($(TARGET_ARCH),sh4) - ifeq ($(TARGET_WORDS_BIGENDIAN),yes) - TARGET_ARCH2=sh4eb - endif -endif -ifeq ($(TARGET_ARCH),mips) - ifneq ($(TARGET_WORDS_BIGENDIAN),yes) - TARGET_ARCH2=mipsel - endif -endif -ifeq ($(TARGET_ARCH),mipsn32) - ifneq ($(TARGET_WORDS_BIGENDIAN),yes) - TARGET_ARCH2=mipsn32el - endif -endif -ifeq ($(TARGET_ARCH),mips64) - ifneq ($(TARGET_WORDS_BIGENDIAN),yes) - TARGET_ARCH2=mips64el - endif -endif ifdef CONFIG_USER_ONLY # user emulator name @@ -89,7 +38,7 @@ translate.o: CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-unit-at-a-tim endif ifeq ($(ARCH),sparc) - ifneq ($(CONFIG_SOLARIS),yes) + ifneq ($(CONFIG_SOLARIS),y) HELPER_CFLAGS+=-ffixed-i0 endif endif @@ -99,17 +48,10 @@ ifeq ($(ARCH),alpha) CFLAGS+=-msmall-data endif -ifeq ($(ARCH),hppa) -BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -endif - ifeq ($(ARCH),ia64) CFLAGS+=-mno-sdata endif -CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS) -LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS) - CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CPPFLAGS+=-U_FORTIFY_SOURCE LIBS+=-lm @@ -221,7 +163,7 @@ tcg/tcg.o: cpu.h # HELPER_CFLAGS is used for all the code compiled with static register # variables -op_helper.o: CFLAGS += $(HELPER_CFLAGS) $(I386_CFLAGS) +op_helper.o: CFLAGS += $(HELPER_CFLAGS) cpu-exec.o: CFLAGS += $(HELPER_CFLAGS) @@ -230,9 +172,6 @@ cpu-exec.o: CFLAGS += $(HELPER_CFLAGS) ifdef CONFIG_LINUX_USER -ifndef TARGET_ABI_DIR - TARGET_ABI_DIR=$(TARGET_ARCH) -endif VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) @@ -335,28 +274,19 @@ obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o ifeq ($(TARGET_ARCH), i386) obj-y += vm86.o endif -ifeq ($(TARGET_ARCH), arm) -obj-y += nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ -nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ - nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o -endif -ifeq ($(TARGET_ARCH), m68k) -obj-y += m68k-sim.o m68k-semi.o -endif + +nwfpe-obj-y := fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o +nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o +obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y)) +obj-arm-y += arm-semi.o + +obj-m68k-y += m68k-sim.o m68k-semi.o # Note: this is a workaround. The real fix is to avoid compiling # cpu_signal_handler() in cpu-exec.c. signal.o: CFLAGS += $(HELPER_CFLAGS) -$(QEMU_PROG): ARLIBS=../libqemu_user.a libqemu.a -$(QEMU_PROG): $(obj-y) ../libqemu_user.a libqemu.a - $(call LINK,$(obj-y)) -ifeq ($(ARCH),alpha) -# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of -# the address space (31 bit so sign extending doesn't matter) - echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc -endif - +ARLIBS=../libqemu_user.a libqemu.a endif #CONFIG_LINUX_USER ######################################################### @@ -379,9 +309,7 @@ obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \ # cpu_signal_handler() in cpu-exec.c. signal.o: CFLAGS += $(HELPER_CFLAGS) -$(QEMU_PROG): ARLIBS=libqemu.a -$(QEMU_PROG): $(obj-y) libqemu.a - $(call LINK,$(obj-y)) +ARLIBS=libqemu.a endif #CONFIG_DARWIN_USER @@ -479,9 +407,7 @@ obj-y += uaccess.o # cpu_signal_handler() in cpu-exec.c. signal.o: CFLAGS += $(HELPER_CFLAGS) -$(QEMU_PROG): ARLIBS=libqemu.a ../libqemu_user.a -$(QEMU_PROG): $(obj-y) libqemu.a ../libqemu_user.a - $(call LINK,$(obj-y)) +ARLIBS=libqemu.a ../libqemu_user.a endif #CONFIG_BSD_USER @@ -544,7 +470,7 @@ endif # xen backend driver support obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o -ifeq ($(CONFIG_XEN), yes) +ifeq ($(CONFIG_XEN), y) LIBS += $(XEN_LIBS) endif @@ -561,122 +487,127 @@ obj-y += e1000.o # Generic watchdog support and some watchdog devices obj-y += wdt_ib700.o wdt_i6300esb.o -ifeq ($(TARGET_BASE_ARCH), i386) # Hardware support -obj-y += ide.o pckbd.o vga.o $(sound-obj-y) dma.o -obj-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o -obj-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o -obj-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o -obj-y += device-hotplug.o pci-hotplug.o smbios.o +obj-i386-y = ide.o pckbd.o vga.o $(sound-obj-y) dma.o +obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o +obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o +obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o +obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o + +ifeq ($(TARGET_BASE_ARCH), i386) CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif -ifeq ($(TARGET_BASE_ARCH), ppc) -CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE + # shared objects -obj-y += ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o +obj-ppc-y = ppc.o ide.o vga.o $(sound-obj-y) dma.o openpic.o # PREP target -obj-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o -obj-y += prep_pci.o ppc_prep.o +obj-ppc-y += pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o +obj-ppc-y += prep_pci.o ppc_prep.o # Mac shared devices -obj-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o +obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o # OldWorld PowerMac -obj-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o +obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o # NewWorld PowerMac -obj-y += unin_pci.o ppc_newworld.o +obj-ppc-y += unin_pci.o ppc_newworld.o # PowerPC 4xx boards -obj-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o -obj-y += ppc440.o ppc440_bamboo.o +obj-ppc-y += pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o +obj-ppc-y += ppc440.o ppc440_bamboo.o # PowerPC E500 boards -obj-y += ppce500_pci.o ppce500_mpc8544ds.o +obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o +obj-ppc-$(CONFIG_KVM) += kvm_ppc.o + +ifeq ($(TARGET_BASE_ARCH), ppc) +CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE +endif + ifdef FDT_LIBS -obj-y += device_tree.o +obj-ppc-y += device_tree.o LIBS+= $(FDT_LIBS) endif -obj-$(CONFIG_KVM) += kvm_ppc.o -endif + +obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o +obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o +obj-mips-y += g364fb.o jazz_led.o dp8393x.o +obj-mips-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o +obj-mips-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y) +obj-mips-y += mipsnet.o +obj-mips-y += pflash_cfi01.o +obj-mips-y += vmware_vga.o + ifeq ($(TARGET_BASE_ARCH), mips) -obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o -obj-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o -obj-y += g364fb.o jazz_led.o dp8393x.o -obj-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o -obj-y += piix_pci.o parallel.o cirrus_vga.o pcspk.o $(sound-obj-y) -obj-y += mipsnet.o -obj-y += pflash_cfi01.o -obj-y += vmware_vga.o CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif -ifeq ($(TARGET_BASE_ARCH), microblaze) -obj-y += petalogix_s3adsp1800_mmu.o -obj-y += microblaze_pic_cpu.o -obj-y += xilinx_intc.o -obj-y += xilinx_timer.o -obj-y += xilinx_uartlite.o -obj-y += xilinx_ethlite.o +obj-microblaze-y = petalogix_s3adsp1800_mmu.o + +obj-microblaze-y += microblaze_pic_cpu.o +obj-microblaze-y += xilinx_intc.o +obj-microblaze-y += xilinx_timer.o +obj-microblaze-y += xilinx_uartlite.o +obj-microblaze-y += xilinx_ethlite.o + +obj-microblaze-y += pflash_cfi02.o -obj-y += pflash_cfi02.o ifdef FDT_LIBS -obj-y += device_tree.o +obj-microblaze-y += device_tree.o LIBS+= $(FDT_LIBS) endif -endif -ifeq ($(TARGET_BASE_ARCH), cris) + # Boards -obj-y += cris_pic_cpu.o etraxfs.o axis_dev88.o +obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o # IO blocks -obj-y += etraxfs_dma.o -obj-y += etraxfs_pic.o -obj-y += etraxfs_eth.o -obj-y += etraxfs_timer.o -obj-y += etraxfs_ser.o +obj-cris-y += etraxfs_dma.o +obj-cris-y += etraxfs_pic.o +obj-cris-y += etraxfs_eth.o +obj-cris-y += etraxfs_timer.o +obj-cris-y += etraxfs_ser.o + +obj-cris-y += pflash_cfi02.o -obj-y += pflash_cfi02.o -endif -ifeq ($(TARGET_BASE_ARCH), sparc) ifeq ($(TARGET_ARCH), sparc64) -obj-y += sun4u.o ide.o pckbd.o vga.o apb_pci.o -obj-y += fdc.o mc146818rtc.o serial.o -obj-y += cirrus_vga.o parallel.o +obj-sparc-y = sun4u.o ide.o pckbd.o vga.o apb_pci.o +obj-sparc-y += fdc.o mc146818rtc.o serial.o +obj-sparc-y += cirrus_vga.o parallel.o else -obj-y += sun4m.o tcx.o iommu.o slavio_intctl.o -obj-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o -obj-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o -endif -endif +obj-sparc-y = sun4m.o tcx.o iommu.o slavio_intctl.o +obj-sparc-y += slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o +obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o +endif + +obj-arm-y = integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o +obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o +obj-arm-y += versatile_pci.o +obj-arm-y += realview_gic.o realview.o arm_sysctl.o mpcore.o +obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o +obj-arm-y += pl061.o +obj-arm-y += arm-semi.o +obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o +obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o +obj-arm-y += pflash_cfi01.o gumstix.o +obj-arm-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o +obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o +obj-arm-y += omap2.o omap_dss.o soc_dma.o +obj-arm-y += omap_sx1.o palm.o tsc210x.o +obj-arm-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o +obj-arm-y += mst_fpga.o mainstone.o +obj-arm-y += musicpal.o pflash_cfi02.o +obj-arm-y += framebuffer.o +obj-arm-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o +obj-arm-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o +obj-arm-y += syborg_virtio.o + ifeq ($(TARGET_BASE_ARCH), arm) -obj-y += integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o -obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o -obj-y += versatile_pci.o -obj-y += realview_gic.o realview.o arm_sysctl.o mpcore.o -obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o -obj-y += pl061.o -obj-y += arm-semi.o -obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o -obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o -obj-y += pflash_cfi01.o gumstix.o -obj-y += zaurus.o ide.o serial.o spitz.o tosa.o tc6393xb.o -obj-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o -obj-y += omap2.o omap_dss.o soc_dma.o -obj-y += omap_sx1.o palm.o tsc210x.o -obj-y += nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o -obj-y += mst_fpga.o mainstone.o -obj-y += musicpal.o pflash_cfi02.o -obj-y += framebuffer.o -obj-y += syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o -obj-y += syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o -obj-y += syborg_virtio.o CPPFLAGS += -DHAS_AUDIO endif -ifeq ($(TARGET_BASE_ARCH), sh4) -obj-y += shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o -obj-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o -obj-y += ide.o -endif -ifeq ($(TARGET_BASE_ARCH), m68k) -obj-y += an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o -obj-y += m68k-semi.o dummy_m68k.o -endif + +obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o +obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o +obj-sh4-y += ide.o + +obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o +obj-m68k-y += m68k-semi.o dummy_m68k.o + ifdef CONFIG_COCOA COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit ifdef CONFIG_COREAUDIO @@ -687,8 +618,6 @@ ifdef CONFIG_SLIRP CPPFLAGS+=-I$(SRC_PATH)/slirp endif -LIBS+=$(PTHREADLIBS) -LIBS+=$(CLOCKLIBS) # specific flags are needed for non soft mmu emulator ifdef CONFIG_STATIC LDFLAGS+=-static @@ -727,13 +656,15 @@ vl.o: qemu-options.h monitor.o: qemu-monitor.h -$(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS) -$(QEMU_PROG): ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) -$(QEMU_PROG): $(obj-y) ../libqemu_common.a libqemu.a $(HWLIB) - $(call LINK,$(obj-y)) +LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS) +ARLIBS=../libqemu_common.a libqemu.a $(HWLIB) endif # !CONFIG_USER_ONLY +$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) $(ARLIBS) + $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) + + gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh ifeq ($(TARGET_XML_FILES),) $(call quiet-command,rm -f $@ && echo > $@," GEN $(TARGET_DIR)$@") diff --git a/qemu/VERSION b/qemu/VERSION index 02daa1b6..40a85edc 100644 --- a/qemu/VERSION +++ b/qemu/VERSION @@ -1 +1 @@ -0.10.50 +0.10.90 diff --git a/qemu/config-host.h b/qemu/config-host.h index 51b2b6fb..3498eea8 100644 --- a/qemu/config-host.h +++ b/qemu/config-host.h @@ -9,7 +9,7 @@ #define CONFIG_STATIC 1 #define CONFIG_SLIRP 1 #define CONFIG_ADLIB 1 -#define QEMU_VERSION "0.10.50" +#define QEMU_VERSION "0.10.90" #define QEMU_PKGVERSION "MS-VisualStudio-2022" #define CONFIG_UNAME_RELEASE "" #define AUDIO_DRIVERS \ diff --git a/qemu/configure b/qemu/configure index cba0c08a..2a6ae400 100644 --- a/qemu/configure +++ b/qemu/configure @@ -1460,150 +1460,86 @@ fi #if test "$sdl_static" = "no"; then # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" #fi -config_mak="config-host.mak" -config_h="config-host.h" -#echo "Creating $config_mak and $config_h" - -test -f $config_h && mv $config_h ${config_h}~ - -echo "# Automatically generated by configure - do not modify" > $config_mak -printf "# Configured with:" >> $config_mak -printf " '%s'" "$0" "$@" >> $config_mak -echo >> $config_mak -echo "/* Automatically generated by configure - do not modify */" > $config_h - -echo "prefix=$prefix" >> $config_mak -echo "bindir=\${prefix}$binsuffix" >> $config_mak -echo "mandir=\${prefix}$mansuffix" >> $config_mak -echo "datadir=\${prefix}$datasuffix" >> $config_mak -echo "docdir=\${prefix}$docsuffix" >> $config_mak -echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h -echo "MAKE=$make" >> $config_mak -echo "INSTALL=$install" >> $config_mak -echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_mak -echo "INSTALL_DATA=$install -m0644 -p" >> $config_mak -echo "INSTALL_PROG=$install -m0755 -p" >> $config_mak -echo "CC=$cc" >> $config_mak -echo "HOST_CC=$host_cc" >> $config_mak -echo "AR=$ar" >> $config_mak -echo "OBJCOPY=$objcopy" >> $config_mak -echo "LD=$ld" >> $config_mak -# XXX: only use CFLAGS and LDFLAGS ? -# XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross -# compilation of dyngen tool (useful for win32 build on Linux host) -echo "OS_CFLAGS=$OS_CFLAGS" >> $config_mak -echo "OS_LDFLAGS=$OS_LDFLAGS" >> $config_mak -echo "ARCH_CFLAGS=$ARCH_CFLAGS" >> $config_mak -echo "ARCH_LDFLAGS=$ARCH_LDFLAGS" >> $config_mak -echo "CFLAGS=$CFLAGS $EXTRA_CFLAGS" >> $config_mak -echo "LDFLAGS=$LDFLAGS $EXTRA_LDFLAGS" >> $config_mak -echo "EXESUF=$EXESUF" >> $config_mak -echo "PTHREADLIBS=$PTHREADLIBS" >> $config_mak -echo "CLOCKLIBS=$CLOCKLIBS" >> $config_mak +config_host_mak="config-host.mak" +config_host_h="config-host.h" + +#echo "Creating $config_host_mak and $config_host_h" + +test -f $config_host_h && mv $config_host_h ${config_host_h}~ + +echo "# Automatically generated by configure - do not modify" > $config_host_mak +printf "# Configured with:" >> $config_host_mak +printf " '%s'" "$0" "$@" >> $config_host_mak +echo >> $config_host_mak +echo "/* Automatically generated by configure - do not modify */" > $config_host_h + +echo "prefix=$prefix" >> $config_host_mak +echo "bindir=\${prefix}$binsuffix" >> $config_host_mak +echo "mandir=\${prefix}$mansuffix" >> $config_host_mak +echo "datadir=\${prefix}$datasuffix" >> $config_host_mak +echo "docdir=\${prefix}$docsuffix" >> $config_host_mak +echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_host_h +echo "MAKE=$make" >> $config_host_mak +echo "INSTALL=$install" >> $config_host_mak +echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak +echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak +echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak +echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak +echo "AR=$ar" >> $config_host_mak +echo "OBJCOPY=$objcopy" >> $config_host_mak +echo "LD=$ld" >> $config_host_mak +echo "CFLAGS=$CFLAGS $OS_CFLAGS $ARCH_CFLAGS $EXTRA_CFLAGS" >> $config_host_mak +echo "LDFLAGS=$LDFLAGS $OS_LDFLAGS $ARCH_LDFLAGS $EXTRA_LDFLAGS" >> $config_host_mak +echo "EXESUF=$EXESUF" >> $config_host_mak +echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak +echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak case "$cpu" in - i386) - echo "ARCH=i386" >> $config_mak - echo "#define HOST_I386 1" >> $config_h - ;; - x86_64) - echo "ARCH=x86_64" >> $config_mak - echo "#define HOST_X86_64 1" >> $config_h - ;; - alpha) - echo "ARCH=alpha" >> $config_mak - echo "#define HOST_ALPHA 1" >> $config_h - ;; - armv4b) - echo "ARCH=arm" >> $config_mak - echo "#define HOST_ARM 1" >> $config_h - ;; - armv4l) - echo "ARCH=arm" >> $config_mak - echo "#define HOST_ARM 1" >> $config_h - ;; - cris) - echo "ARCH=cris" >> $config_mak - echo "#define HOST_CRIS 1" >> $config_h - ;; - hppa) - echo "ARCH=hppa" >> $config_mak - echo "#define HOST_HPPA 1" >> $config_h - ;; - ia64) - echo "ARCH=ia64" >> $config_mak - echo "#define HOST_IA64 1" >> $config_h - ;; - m68k) - echo "ARCH=m68k" >> $config_mak - echo "#define HOST_M68K 1" >> $config_h - ;; - microblaze) - echo "ARCH=microblaze" >> $config_mak - echo "#define HOST_MICROBLAZE 1" >> $config_h - ;; - mips) - echo "ARCH=mips" >> $config_mak - echo "#define HOST_MIPS 1" >> $config_h - ;; - mips64) - echo "ARCH=mips64" >> $config_mak - echo "#define HOST_MIPS64 1" >> $config_h + i386|x86_64|alpha|cris|hppa|ia64|m68k|microbaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64) + ARCH=$cpu ;; - ppc) - echo "ARCH=ppc" >> $config_mak - echo "#define HOST_PPC 1" >> $config_h - ;; - ppc64) - echo "ARCH=ppc64" >> $config_mak - echo "#define HOST_PPC64 1" >> $config_h - ;; - s390) - echo "ARCH=s390" >> $config_mak - echo "#define HOST_S390 1" >> $config_h - ;; - sparc) - echo "ARCH=sparc" >> $config_mak - echo "#define HOST_SPARC 1" >> $config_h - ;; - sparc64) - echo "ARCH=sparc64" >> $config_mak - echo "#define HOST_SPARC64 1" >> $config_h + armv4b|arm4l) + ARCH=arm ;; *) echo "Unsupported CPU = $cpu" exit 1 ;; esac +echo "ARCH=$ARCH" >> $config_host_mak +arch_name=`echo $ARCH | tr '[:lower:]' '[:upper:]'` +echo "#define HOST_$arch_name 1" >> $config_host_h + if test "$debug_tcg" = "yes" ; then - echo "#define DEBUG_TCG 1" >> $config_h + echo "#define DEBUG_TCG 1" >> $config_host_h fi if test "$debug" = "yes" ; then - echo "#define DEBUG_EXEC 1" >> $config_h + echo "#define DEBUG_EXEC 1" >> $config_host_h fi if test "$sparse" = "yes" ; then - echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_mak - echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_mak - echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_mak + echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak + echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_host_mak + echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak fi if test "$strip_opt" = "yes" ; then - echo "STRIP_OPT=-s" >> $config_mak + echo "STRIP_OPT=-s" >> $config_host_mak fi if test "$bigendian" = "yes" ; then - echo "WORDS_BIGENDIAN=yes" >> $config_mak - echo "#define WORDS_BIGENDIAN 1" >> $config_h + echo "WORDS_BIGENDIAN=yes" >> $config_host_mak + echo "#define WORDS_BIGENDIAN 1" >> $config_host_h fi -echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h +echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h if test "$mingw32" = "yes" ; then - echo "CONFIG_WIN32=y" >> $config_mak - echo "#define CONFIG_WIN32 1" >> $config_h + echo "CONFIG_WIN32=y" >> $config_host_mak + echo "#define CONFIG_WIN32 1" >> $config_host_h else cat > $TMPC << EOF #include int main(void) { return bswap_32(0); } EOF if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "#define HAVE_BYTESWAP_H 1" >> $config_h + echo "#define HAVE_BYTESWAP_H 1" >> $config_host_h fi cat > $TMPC << EOF #include @@ -1612,106 +1548,106 @@ EOF int main(void) { return bswap32(0); } EOF if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h + echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_host_h fi fi if [ "$openbsd" = "yes" ] ; then - echo "#define ENOTSUP 4096" >> $config_h + echo "#define ENOTSUP 4096" >> $config_host_h fi if test "$darwin" = "yes" ; then - echo "CONFIG_DARWIN=y" >> $config_mak - echo "#define CONFIG_DARWIN 1" >> $config_h + echo "CONFIG_DARWIN=y" >> $config_host_mak + echo "#define CONFIG_DARWIN 1" >> $config_host_h fi if test "$aix" = "yes" ; then - echo "CONFIG_AIX=y" >> $config_mak - echo "#define CONFIG_AIX 1" >> $config_h + echo "CONFIG_AIX=y" >> $config_host_mak + echo "#define CONFIG_AIX 1" >> $config_host_h fi if test "$solaris" = "yes" ; then - echo "CONFIG_SOLARIS=y" >> $config_mak - echo "#define HOST_SOLARIS $solarisrev" >> $config_h + echo "CONFIG_SOLARIS=y" >> $config_host_mak + echo "#define HOST_SOLARIS $solarisrev" >> $config_host_h if test "$needs_libsunmath" = "yes" ; then - echo "NEEDS_LIBSUNMATH=yes" >> $config_mak - echo "#define NEEDS_LIBSUNMATH 1" >> $config_h + echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak + echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h fi fi if test -n "$sparc_cpu"; then - echo "CONFIG__sparc_${sparc_cpu}__=y" >> $config_mak - echo "#define __sparc_${sparc_cpu}__ 1" >> $config_h + echo "CONFIG__sparc_${sparc_cpu}__=y" >> $config_host_mak + echo "#define __sparc_${sparc_cpu}__ 1" >> $config_host_h fi if test "$gprof" = "yes" ; then - echo "TARGET_GPROF=yes" >> $config_mak - echo "#define HAVE_GPROF 1" >> $config_h + echo "TARGET_GPROF=yes" >> $config_host_mak + echo "#define HAVE_GPROF 1" >> $config_host_h fi if test "$static" = "yes" ; then - echo "CONFIG_STATIC=y" >> $config_mak - echo "#define CONFIG_STATIC 1" >> $config_h + echo "CONFIG_STATIC=y" >> $config_host_mak + echo "#define CONFIG_STATIC 1" >> $config_host_h fi if test $profiler = "yes" ; then - echo "#define CONFIG_PROFILER 1" >> $config_h + echo "#define CONFIG_PROFILER 1" >> $config_host_h fi if test "$slirp" = "yes" ; then - echo "CONFIG_SLIRP=y" >> $config_mak - echo "#define CONFIG_SLIRP 1" >> $config_h + echo "CONFIG_SLIRP=y" >> $config_host_mak + echo "#define CONFIG_SLIRP 1" >> $config_host_h fi if test "$vde" = "yes" ; then - echo "CONFIG_VDE=y" >> $config_mak - echo "#define CONFIG_VDE 1" >> $config_h - echo "VDE_LIBS=-lvdeplug" >> $config_mak + echo "CONFIG_VDE=y" >> $config_host_mak + echo "#define CONFIG_VDE 1" >> $config_host_h + echo "VDE_LIBS=-lvdeplug" >> $config_host_mak fi for card in $audio_card_list; do def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'` - echo "$def=y" >> $config_mak - echo "#define $def 1" >> $config_h + echo "$def=y" >> $config_host_mak + echo "#define $def 1" >> $config_host_h done -echo "#define AUDIO_DRIVERS \\" >> $config_h +echo "#define AUDIO_DRIVERS \\" >> $config_host_h for drv in $audio_drv_list; do - echo " &${drv}_audio_driver, \\" >>$config_h + echo " &${drv}_audio_driver, \\" >>$config_host_h def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'` - echo "$def=y" >> $config_mak + echo "$def=y" >> $config_host_mak if test "$drv" = "fmod"; then - echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak - echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak + echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_host_mak + echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_host_mak elif test "$drv" = "oss"; then - echo "CONFIG_OSS_LIB=$oss_lib" >> $config_mak + echo "CONFIG_OSS_LIB=$oss_lib" >> $config_host_mak fi done -echo "" >>$config_h +echo "" >>$config_host_h if test "$mixemu" = "yes" ; then - echo "CONFIG_MIXEMU=y" >> $config_mak - echo "#define CONFIG_MIXEMU 1" >> $config_h + echo "CONFIG_MIXEMU=y" >> $config_host_mak + echo "#define CONFIG_MIXEMU 1" >> $config_host_h fi if test "$vnc_tls" = "yes" ; then - echo "CONFIG_VNC_TLS=y" >> $config_mak - echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak - echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak - echo "#define CONFIG_VNC_TLS 1" >> $config_h + echo "CONFIG_VNC_TLS=y" >> $config_host_mak + echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak + echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak + echo "#define CONFIG_VNC_TLS 1" >> $config_host_h fi if test "$vnc_sasl" = "yes" ; then - echo "CONFIG_VNC_SASL=y" >> $config_mak - echo "CONFIG_VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_mak - echo "CONFIG_VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_mak - echo "#define CONFIG_VNC_SASL 1" >> $config_h + echo "CONFIG_VNC_SASL=y" >> $config_host_mak + echo "CONFIG_VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak + echo "CONFIG_VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak + echo "#define CONFIG_VNC_SASL 1" >> $config_host_h fi if test "$fnmatch" = "yes" ; then - echo "#define HAVE_FNMATCH_H 1" >> $config_h + echo "#define HAVE_FNMATCH_H 1" >> $config_host_h fi qemu_version=`head $source_path/VERSION` -echo "VERSION=$qemu_version" >>$config_mak -echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h +echo "VERSION=$qemu_version" >>$config_host_mak +echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_host_h -echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_h +echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_host_h -echo "SRC_PATH=$source_path" >> $config_mak +echo "SRC_PATH=$source_path" >> $config_host_mak if [ "$source_path_used" = "yes" ]; then - echo "VPATH=$source_path" >> $config_mak + echo "VPATH=$source_path" >> $config_host_mak fi -echo "TARGET_DIRS=$target_list" >> $config_mak +echo "TARGET_DIRS=$target_list" >> $config_host_mak if [ "$build_docs" = "yes" ] ; then - echo "BUILD_DOCS=yes" >> $config_mak + echo "BUILD_DOCS=yes" >> $config_host_mak fi if test "$static" = "yes"; then sdl1=$sdl_static @@ -1719,109 +1655,109 @@ else sdl1=$sdl fi if test "$sdl1" = "yes" ; then - echo "#define CONFIG_SDL 1" >> $config_h - echo "CONFIG_SDL=y" >> $config_mak + echo "#define CONFIG_SDL 1" >> $config_host_h + echo "CONFIG_SDL=y" >> $config_host_mak if test "$target_softmmu" = "no" -o "$static" = "yes"; then - echo "SDL_LIBS=$sdl_static_libs" >> $config_mak + echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak elif test "$sdl_x11" = "yes" ; then - echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_mak + echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_host_mak else - echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak + echo "SDL_LIBS=`$sdl_config --libs`" >> $config_host_mak fi if [ "${aa}" = "yes" ] ; then - echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak + echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_host_mak else - echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak + echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_host_mak fi fi if test "$cocoa" = "yes" ; then - echo "#define CONFIG_COCOA 1" >> $config_h - echo "CONFIG_COCOA=y" >> $config_mak + echo "#define CONFIG_COCOA 1" >> $config_host_h + echo "CONFIG_COCOA=y" >> $config_host_mak fi if test "$curses" = "yes" ; then - echo "#define CONFIG_CURSES 1" >> $config_h - echo "CONFIG_CURSES=y" >> $config_mak + echo "#define CONFIG_CURSES 1" >> $config_host_h + echo "CONFIG_CURSES=y" >> $config_host_mak if test "$ncurses" = "yes" ; then - echo "CURSES_LIBS=-lncurses" >> $config_mak + echo "CURSES_LIBS=-lncurses" >> $config_host_mak else - echo "CURSES_LIBS=-lcurses" >> $config_mak + echo "CURSES_LIBS=-lcurses" >> $config_host_mak fi fi if test "$atfile" = "yes" ; then - echo "#define CONFIG_ATFILE 1" >> $config_h + echo "#define CONFIG_ATFILE 1" >> $config_host_h fi if test "$utimens" = "yes" ; then - echo "#define CONFIG_UTIMENSAT 1" >> $config_h + echo "#define CONFIG_UTIMENSAT 1" >> $config_host_h fi if test "$pipe2" = "yes" ; then - echo "#define CONFIG_PIPE2 1" >> $config_h + echo "#define CONFIG_PIPE2 1" >> $config_host_h fi if test "$splice" = "yes" ; then - echo "#define CONFIG_SPLICE 1" >> $config_h + echo "#define CONFIG_SPLICE 1" >> $config_host_h fi if test "$inotify" = "yes" ; then - echo "#define CONFIG_INOTIFY 1" >> $config_h + echo "#define CONFIG_INOTIFY 1" >> $config_host_h fi if test "$curl" = "yes" ; then - echo "CONFIG_CURL=y" >> $config_mak - echo "CURL_LIBS=$curl_libs" >> $config_mak - echo "#define CONFIG_CURL 1" >> $config_h + echo "CONFIG_CURL=y" >> $config_host_mak + echo "CURL_LIBS=$curl_libs" >> $config_host_mak + echo "#define CONFIG_CURL 1" >> $config_host_h fi if test "$brlapi" = "yes" ; then - echo "CONFIG_BRLAPI=y" >> $config_mak - echo "#define CONFIG_BRLAPI 1" >> $config_h - echo "BRLAPI_LIBS=-lbrlapi" >> $config_mak + echo "CONFIG_BRLAPI=y" >> $config_host_mak + echo "#define CONFIG_BRLAPI 1" >> $config_host_h + echo "BRLAPI_LIBS=-lbrlapi" >> $config_host_mak fi if test "$bluez" = "yes" ; then - echo "CONFIG_BLUEZ=y" >> $config_mak - echo "CONFIG_BLUEZ_CFLAGS=$bluez_cflags" >> $config_mak - echo "CONFIG_BLUEZ_LIBS=$bluez_libs" >> $config_mak - echo "#define CONFIG_BLUEZ 1" >> $config_h + echo "CONFIG_BLUEZ=y" >> $config_host_mak + echo "CONFIG_BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak + echo "CONFIG_BLUEZ_LIBS=$bluez_libs" >> $config_host_mak + echo "#define CONFIG_BLUEZ 1" >> $config_host_h fi if test "$xen" = "yes" ; then - echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_mak + echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_host_mak fi if test "$aio" = "yes" ; then - echo "#define CONFIG_AIO 1" >> $config_h - echo "CONFIG_AIO=y" >> $config_mak + echo "#define CONFIG_AIO 1" >> $config_host_h + echo "CONFIG_AIO=y" >> $config_host_mak fi if test "$io_thread" = "yes" ; then - echo "CONFIG_IOTHREAD=y" >> $config_mak - echo "#define CONFIG_IOTHREAD 1" >> $config_h + echo "CONFIG_IOTHREAD=y" >> $config_host_mak + echo "#define CONFIG_IOTHREAD 1" >> $config_host_h fi if test "$blobs" = "yes" ; then - echo "INSTALL_BLOBS=yes" >> $config_mak + echo "INSTALL_BLOBS=yes" >> $config_host_mak fi if test "$iovec" = "yes" ; then - echo "#define HAVE_IOVEC 1" >> $config_h + echo "#define HAVE_IOVEC 1" >> $config_host_h fi if test "$preadv" = "yes" ; then - echo "#define HAVE_PREADV 1" >> $config_h + echo "#define HAVE_PREADV 1" >> $config_host_h fi if test "$fdt" = "yes" ; then - echo "#define HAVE_FDT 1" >> $config_h - echo "FDT_LIBS=-lfdt" >> $config_mak + echo "#define HAVE_FDT 1" >> $config_host_h + echo "FDT_LIBS=-lfdt" >> $config_host_mak fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then - echo "#define O_LARGEFILE 0" >> $config_h - echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h - echo "#define HOST_BSD 1" >> $config_h + echo "#define O_LARGEFILE 0" >> $config_host_h + echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h + echo "#define HOST_BSD 1" >> $config_host_h fi -echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h +echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h # USB host support case "$usb" in linux) - echo "HOST_USB=linux" >> $config_mak + echo "HOST_USB=linux" >> $config_host_mak ;; bsd) - echo "HOST_USB=bsd" >> $config_mak + echo "HOST_USB=bsd" >> $config_host_mak ;; *) - echo "HOST_USB=stub" >> $config_mak + echo "HOST_USB=stub" >> $config_host_mak ;; esac @@ -1840,16 +1776,16 @@ int main(void) { } EOF if check_linker_flags --whole-archive --no-whole-archive ; then # GNU ld - echo "ARLIBS_BEGIN=-Wl,--whole-archive" >> $config_mak - echo "ARLIBS_END=-Wl,--no-whole-archive" >> $config_mak + echo "ARLIBS_BEGIN=-Wl,--whole-archive" >> $config_host_mak + echo "ARLIBS_END=-Wl,--no-whole-archive" >> $config_host_mak elif check_linker_flags -z,allextract -z,defaultextract ; then # Solaris ld - echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak - echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak + echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_host_mak + echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_host_mak elif check_linker_flags -all_load ; then # Mac OS X - echo "ARLIBS_BEGIN=-all_load" >> $config_mak - echo "ARLIBS_END=" >> $config_mak + echo "ARLIBS_BEGIN=-all_load" >> $config_host_mak + echo "ARLIBS_END=" >> $config_host_mak else echo "Error: your linker does not support --whole-archive or -z." echo "Please report to qemu-devel@nongnu.org" @@ -1858,7 +1794,7 @@ fi if test "$xen" = "yes" ; then - echo "CONFIG_XEN=y" >> $config_mak + echo "CONFIG_XEN=y" >> $config_host_mak fi tools= @@ -1868,44 +1804,33 @@ if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-nbd\$(EXESUF) qemu-io\$(EXESUF) $tools" fi fi -echo "TOOLS=$tools" >> $config_mak +echo "TOOLS=$tools" >> $config_host_mak roms= if test "$cpu" = "i386" -o "$cpu" = "x86_64" ; then roms="pc-bios/optionrom" fi -echo "ROMS=$roms" >> $config_mak +echo "ROMS=$roms" >> $config_host_mak -if test -f ${config_h}~ ; then - if cmp -s $config_h ${config_h}~ ; then - mv ${config_h}~ $config_h +if test -f ${config_host_h}~ ; then + if cmp -s $config_host_h ${config_host_h}~ ; then + mv ${config_host_h}~ $config_host_h else - rm ${config_h}~ + rm ${config_host_h}~ fi fi -config_host_mak=${config_mak} - for target in $target_list; do target_dir="$target" config_mak=$target_dir/config.mak config_h=$target_dir/config.h target_arch2=`echo $target | cut -d '-' -f 1` target_bigendian="no" -[ "$target_arch2" = "armeb" ] && target_bigendian=yes -[ "$target_arch2" = "m68k" ] && target_bigendian=yes -[ "$target_arch2" = "microblaze" ] && target_bigendian=yes -[ "$target_arch2" = "mips" ] && target_bigendian=yes -[ "$target_arch2" = "mipsn32" ] && target_bigendian=yes -[ "$target_arch2" = "mips64" ] && target_bigendian=yes -[ "$target_arch2" = "ppc" ] && target_bigendian=yes -[ "$target_arch2" = "ppcemb" ] && target_bigendian=yes -[ "$target_arch2" = "ppc64" ] && target_bigendian=yes -[ "$target_arch2" = "ppc64abi32" ] && target_bigendian=yes -[ "$target_arch2" = "sh4eb" ] && target_bigendian=yes -[ "$target_arch2" = "sparc" ] && target_bigendian=yes -[ "$target_arch2" = "sparc64" ] && target_bigendian=yes -[ "$target_arch2" = "sparc32plus" ] && target_bigendian=yes +case "$target_arch2" in + armeb|m68k|microblaze|mips|mipsn32|mips64|ppc|ppcemb|ppc64|ppc64abi32|sh4eb|sparc|sparc64|sparc32plus) + target_bigendian=yes + ;; +esac target_softmmu="no" target_user_only="no" target_linux_user="no" @@ -1952,208 +1877,113 @@ ln -s $source_path/Makefile.target $target_dir/Makefile echo "# Automatically generated by configure - do not modify" > $config_mak -echo "/* Automatically generated by configure - do not modify */" > $config_h - echo "include ../config-host.mak" >> $config_mak -echo "#include \"../config-host.h\"" >> $config_h bflt="no" elfload32="no" target_nptl="no" interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"` -echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h +echo "CONFIG_QEMU_PREFIX=\"$interp_prefix1\"" >> $config_mak gdb_xml_files="" -target_kvm="$kvm" -# Make sure the target and host cpus are compatible -if test ! \( "$target_arch2" = "$cpu" -o \ - \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \ - \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \ - \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then - target_kvm="no" -fi -# Disable KVM for linux-user -if test "$target_softmmu" = "no" ; then - target_kvm="no" -fi +TARGET_ARCH="$target_arch2" +TARGET_BASE_ARCH="" +TARGET_ABI_DIR="" case "$target_arch2" in i386) - echo "TARGET_ARCH=i386" >> $config_mak - echo "#define TARGET_ARCH \"i386\"" >> $config_h - echo "#define TARGET_I386 1" >> $config_h - if test $kqemu = "yes" -a "$target_softmmu" = "yes" - then - echo "CONFIG_KQEMU=y" >> $config_mak - echo "#define CONFIG_KQEMU 1" >> $config_h - fi - if test "$target_kvm" = "yes" ; then - echo "CONFIG_KVM=y" >> $config_mak - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak - echo "#define CONFIG_KVM 1" >> $config_h - fi - if test "$xen" = "yes" -a "$target_softmmu" = "yes"; - then - echo "CONFIG_XEN=y" >> $config_mak - echo "#define CONFIG_XEN 1" >> $config_h - fi target_phys_bits=32 ;; x86_64) - echo "TARGET_ARCH=x86_64" >> $config_mak - echo "#define TARGET_ARCH \"x86_64\"" >> $config_h - echo "#define TARGET_I386 1" >> $config_h - echo "#define TARGET_X86_64 1" >> $config_h - if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" - then - echo "CONFIG_KQEMU=y" >> $config_mak - echo "#define CONFIG_KQEMU 1" >> $config_h - fi - if test "$target_kvm" = "yes" ; then - echo "CONFIG_KVM=y" >> $config_mak - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak - echo "#define CONFIG_KVM 1" >> $config_h - fi - if test "$xen" = "yes" -a "$target_softmmu" = "yes" - then - echo "CONFIG_XEN=y" >> $config_mak - echo "#define CONFIG_XEN 1" >> $config_h - fi + TARGET_BASE_ARCH=i386 target_phys_bits=64 ;; alpha) - echo "TARGET_ARCH=alpha" >> $config_mak - echo "#define TARGET_ARCH \"alpha\"" >> $config_h - echo "#define TARGET_ALPHA 1" >> $config_h target_phys_bits=64 ;; arm|armeb) - echo "TARGET_ARCH=arm" >> $config_mak - echo "#define TARGET_ARCH \"arm\"" >> $config_h - echo "#define TARGET_ARM 1" >> $config_h + TARGET_ARCH=arm bflt="yes" target_nptl="yes" gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml" target_phys_bits=32 ;; cris) - echo "TARGET_ARCH=cris" >> $config_mak - echo "#define TARGET_ARCH \"cris\"" >> $config_h - echo "#define TARGET_CRIS 1" >> $config_h target_nptl="yes" target_phys_bits=32 ;; m68k) - echo "TARGET_ARCH=m68k" >> $config_mak - echo "#define TARGET_ARCH \"m68k\"" >> $config_h - echo "#define TARGET_M68K 1" >> $config_h bflt="yes" gdb_xml_files="cf-core.xml cf-fp.xml" target_phys_bits=32 ;; microblaze) - echo "TARGET_ARCH=microblaze" >> $config_mak - echo "#define TARGET_ARCH \"microblaze\"" >> $config_h - echo "#define TARGET_MICROBLAZE 1" >> $config_h bflt="yes" target_nptl="yes" target_phys_bits=32 ;; - mips|mipsel) - echo "TARGET_ARCH=mips" >> $config_mak - echo "#define TARGET_ARCH \"mips\"" >> $config_h - echo "#define TARGET_MIPS 1" >> $config_h - echo "#define TARGET_ABI_MIPSO32 1" >> $config_h + mips|mipsel) + TARGET_ARCH=mips + echo "TARGET_ABI_MIPSO32=y" >> $config_mak target_nptl="yes" target_phys_bits=64 ;; mipsn32|mipsn32el) - echo "TARGET_ARCH=mipsn32" >> $config_mak - echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h - echo "#define TARGET_MIPS 1" >> $config_h - echo "#define TARGET_ABI_MIPSN32 1" >> $config_h + TARGET_ARCH=mipsn32 + TARGET_BASE_ARCH=mips + echo "TARGET_ABI_MIPSN32=y" >> $config_mak target_phys_bits=64 ;; mips64|mips64el) - echo "TARGET_ARCH=mips64" >> $config_mak - echo "#define TARGET_ARCH \"mips64\"" >> $config_h - echo "#define TARGET_MIPS 1" >> $config_h - echo "#define TARGET_MIPS64 1" >> $config_h - echo "#define TARGET_ABI_MIPSN64 1" >> $config_h + TARGET_ARCH=mips64 + TARGET_BASE_ARCH=mips + echo "TARGET_ABI_MIPSN64=y" >> $config_mak target_phys_bits=64 ;; ppc) - echo "TARGET_ARCH=ppc" >> $config_mak - echo "#define TARGET_ARCH \"ppc\"" >> $config_h - echo "#define TARGET_PPC 1" >> $config_h gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=32 ;; ppcemb) - echo "TARGET_ARCH=ppcemb" >> $config_mak - echo "TARGET_ABI_DIR=ppc" >> $config_mak - echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h - echo "#define TARGET_PPC 1" >> $config_h - echo "#define TARGET_PPCEMB 1" >> $config_h - if test "$target_kvm" = "yes" ; then - echo "CONFIG_KVM=y" >> $config_mak - echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak - echo "#define CONFIG_KVM 1" >> $config_h - fi + TARGET_BASE_ARCH=ppc + TARGET_ABI_DIR=ppc gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 ;; ppc64) - echo "TARGET_ARCH=ppc64" >> $config_mak - echo "TARGET_ABI_DIR=ppc" >> $config_mak - echo "#define TARGET_ARCH \"ppc64\"" >> $config_h - echo "#define TARGET_PPC 1" >> $config_h - echo "#define TARGET_PPC64 1" >> $config_h + TARGET_BASE_ARCH=ppc + TARGET_ABI_DIR=ppc gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 ;; ppc64abi32) - echo "TARGET_ARCH=ppc64" >> $config_mak - echo "TARGET_ABI_DIR=ppc" >> $config_mak - echo "TARGET_ARCH2=ppc64abi32" >> $config_mak - echo "#define TARGET_ARCH \"ppc64\"" >> $config_h - echo "#define TARGET_PPC 1" >> $config_h - echo "#define TARGET_PPC64 1" >> $config_h - echo "#define TARGET_ABI32 1" >> $config_h + TARGET_ARCH=ppc64 + TARGET_BASE_ARCH=ppc + TARGET_ABI_DIR=ppc + echo "TARGET_ABI32=y" >> $config_mak gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 ;; sh4|sh4eb) - echo "TARGET_ARCH=sh4" >> $config_mak - echo "#define TARGET_ARCH \"sh4\"" >> $config_h - echo "#define TARGET_SH4 1" >> $config_h + TARGET_ARCH=sh4 bflt="yes" target_nptl="yes" target_phys_bits=32 ;; sparc) - echo "TARGET_ARCH=sparc" >> $config_mak - echo "#define TARGET_ARCH \"sparc\"" >> $config_h - echo "#define TARGET_SPARC 1" >> $config_h target_phys_bits=64 ;; sparc64) - echo "TARGET_ARCH=sparc64" >> $config_mak - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h - echo "#define TARGET_SPARC 1" >> $config_h - echo "#define TARGET_SPARC64 1" >> $config_h + TARGET_BASE_ARCH=sparc elfload32="yes" target_phys_bits=64 ;; sparc32plus) - echo "TARGET_ARCH=sparc64" >> $config_mak - echo "TARGET_ABI_DIR=sparc" >> $config_mak - echo "TARGET_ARCH2=sparc32plus" >> $config_mak - echo "#define TARGET_ARCH \"sparc64\"" >> $config_h - echo "#define TARGET_SPARC 1" >> $config_h - echo "#define TARGET_SPARC64 1" >> $config_h - echo "#define TARGET_ABI32 1" >> $config_h + TARGET_ARCH=sparc64 + TARGET_BASE_ARCH=sparc + TARGET_ABI_DIR=sparc + echo "TARGET_ABI32=y" >> $config_mak target_phys_bits=64 ;; *) @@ -2161,31 +1991,59 @@ case "$target_arch2" in exit 1 ;; esac +echo "TARGET_ARCH=$TARGET_ARCH" >> $config_mak +echo "TARGET_ARCH2=$target_arch2" >> $config_mak +# TARGET_BASE_ARCH needs to be defined after TARGET_ARCH +if [ "$TARGET_BASE_ARCH" = "" ]; then + TARGET_BASE_ARCH=$TARGET_ARCH +fi +echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_mak +if [ "$TARGET_ABI_DIR" = "" ]; then + TARGET_ABI_DIR=$TARGET_ARCH +fi +echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_mak if [ $target_phys_bits -lt $hostlongbits ] ; then target_phys_bits=$hostlongbits fi +case "$target_arch2" in + i386|x86_64) + if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then + echo "CONFIG_XEN=y" >> $config_mak + fi + if test $kqemu = "yes" -a "$target_softmmu" = "yes" + then + echo "CONFIG_KQEMU=y" >> $config_mak + fi +esac +case "$target_arch2" in + i386|x86_64|ppcemb) + # Make sure the target and host cpus are compatible + if test "$kvm" = "yes" -a "$target_softmmu" = "yes" -a \ + \( "$target_arch2" = "$cpu" -o \ + \( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \ + \( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \ + \( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then + echo "CONFIG_KVM=y" >> $config_mak + echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak + fi +esac echo "HWLIB=../libhw$target_phys_bits/libqemuhw$target_phys_bits.a" >> $config_mak -echo "#define TARGET_PHYS_ADDR_BITS $target_phys_bits" >> $config_h +echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_mak echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak if test "$target_bigendian" = "yes" ; then - echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak - echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h + echo "TARGET_WORDS_BIGENDIAN=y" >> $config_mak fi if test "$target_softmmu" = "yes" ; then echo "CONFIG_SOFTMMU=y" >> $config_mak - echo "#define CONFIG_SOFTMMU 1" >> $config_h fi if test "$target_user_only" = "yes" ; then echo "CONFIG_USER_ONLY=y" >> $config_mak - echo "#define CONFIG_USER_ONLY 1" >> $config_h fi if test "$target_linux_user" = "yes" ; then echo "CONFIG_LINUX_USER=y" >> $config_mak - echo "#define CONFIG_LINUX_USER 1" >> $config_h fi if test "$target_darwin_user" = "yes" ; then echo "CONFIG_DARWIN_USER=y" >> $config_mak - echo "#define CONFIG_DARWIN_USER 1" >> $config_h fi list="" if test ! -z "$gdb_xml_files" ; then @@ -2195,44 +2053,29 @@ if test ! -z "$gdb_xml_files" ; then fi echo "TARGET_XML_FILES=$list" >> $config_mak -if test "$target_arch2" = "arm" \ - -o "$target_arch2" = "armeb" \ - -o "$target_arch2" = "m68k" \ - -o "$target_arch2" = "microblaze" \ - -o "$target_arch2" = "mips" \ - -o "$target_arch2" = "mipsel" \ - -o "$target_arch2" = "mipsn32" \ - -o "$target_arch2" = "mipsn32el" \ - -o "$target_arch2" = "mips64" \ - -o "$target_arch2" = "mips64el" \ - -o "$target_arch2" = "ppc" \ - -o "$target_arch2" = "ppc64" \ - -o "$target_arch2" = "ppc64abi32" \ - -o "$target_arch2" = "ppcemb" \ - -o "$target_arch2" = "sparc" \ - -o "$target_arch2" = "sparc64" \ - -o "$target_arch2" = "sparc32plus"; then - echo "CONFIG_SOFTFLOAT=y" >> $config_mak - echo "#define CONFIG_SOFTFLOAT 1" >> $config_h -fi +case "$target_arch2" in + arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus) + echo "CONFIG_SOFTFLOAT=y" >> $config_mak + ;; +esac + if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then echo "TARGET_HAS_BFLT=y" >> $config_mak - echo "#define TARGET_HAS_BFLT 1" >> $config_h fi if test "$target_user_only" = "yes" \ -a "$nptl" = "yes" -a "$target_nptl" = "yes"; then - echo "#define USE_NPTL 1" >> $config_h + echo "USE_NPTL=y" >> $config_mak fi # 32 bit ELF loader in addition to native 64 bit loader? if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then echo "TARGET_HAS_ELFLOAD32=y" >> $config_mak - echo "#define TARGET_HAS_ELFLOAD32 1" >> $config_h fi if test "$target_bsd_user" = "yes" ; then echo "CONFIG_BSD_USER=y" >> $config_mak - echo "#define CONFIG_BSD_USER 1" >> $config_h fi +$source_path/create_config < $config_mak > $config_h + test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h done # for target in $targets diff --git a/qemu/create_config b/qemu/create_config new file mode 100644 index 00000000..cac0edbb --- /dev/null +++ b/qemu/create_config @@ -0,0 +1,55 @@ +#!/bin/sh + +echo "/* Automatically generated by configure - do not modify */" +echo "#include \"../config-host.h\"" + +while read line; do + +case $line in + CONFIG_*=y) # configuration + name=${line%=*} + echo "#define $name 1" + ;; + CONFIG_*=*) # configuration + name=${line%=*} + value=${line#*=} + echo "#define $name $value" + ;; + TARGET_ARCH=*) # configuration + target_arch=${line#*=} + arch_name=`echo $target_arch | tr '[:lower:]' '[:upper:]'` + echo "#define TARGET_ARCH \"$target_arch\"" + echo "#define TARGET_$arch_name 1" + ;; + TARGET_BASE_ARCH=*) # configuration + target_base_arch=${line#*=} + if [ "$target_base_arch" != "$target_arch" ]; then + base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'` + echo "#define TARGET_$base_arch_name 1" + fi + ;; + TARGET_XML_FILES=*) + # do nothing + ;; + TARGET_ABI_DIR=*) + # do nothing + ;; + TARGET_ARCH2=*) + # do nothing + ;; + TARGET_*=y) # configuration + name=${line%=*} + echo "#define $name 1" + ;; + TARGET_*=*) # configuration + name=${line%=*} + value=${line#*=} + echo "#define $name $value" + ;; + USE_NPTL=y) # configuration + name=${line%=*} + echo "#define $name 1" + ;; +esac + +done # read diff --git a/qemu/hw/ac97.c b/qemu/hw/ac97.c index f18fa524..6c818c9c 100644 --- a/qemu/hw/ac97.c +++ b/qemu/hw/ac97.c @@ -1366,6 +1366,7 @@ int ac97_init (PCIBus *bus) static PCIDeviceInfo ac97_info = { .qdev.name = "AC97", + .qdev.desc = "Intel 82801AA AC97 Audio", .qdev.size = sizeof (PCIAC97LinkState), .init = ac97_initfn, }; diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c index 2a23fd2f..d901965e 100644 --- a/qemu/hw/e1000.c +++ b/qemu/hw/e1000.c @@ -271,6 +271,11 @@ set_eecd(E1000State *s, int index, uint32_t val) } if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset) memset(&s->eecd_state, 0, sizeof s->eecd_state); + /* + * restore old_eecd's E1000_EECD_SK (known to be on) + * to avoid false detection of a clock edge + */ + s->eecd_state.old_eecd = E1000_EECD_SK; return; } s->eecd_state.val_in <<= 1; diff --git a/qemu/hw/es1370.c b/qemu/hw/es1370.c index 8d5a9f98..5c9af0e8 100644 --- a/qemu/hw/es1370.c +++ b/qemu/hw/es1370.c @@ -1054,6 +1054,7 @@ int es1370_init (PCIBus *bus) static PCIDeviceInfo es1370_info = { .qdev.name = "ES1370", + .qdev.desc = "ENSONIQ AudioPCI ES1370", .qdev.size = sizeof (PCIES1370State), .init = es1370_initfn, }; diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c index 8a1582c2..a50f23d4 100644 --- a/qemu/hw/pc.c +++ b/qemu/hw/pc.c @@ -1533,6 +1533,10 @@ static QEMUMachine pc_machine_v0_10 = { .driver = "virtio-console-pci", .property = "class", .value = stringify(PCI_CLASS_DISPLAY_OTHER), + },{ + .driver = "virtio-net-pci", + .property = "vectors", + .value = stringify(0), }, { /* end of list */ } }, diff --git a/qemu/hw/virtio-pci.c b/qemu/hw/virtio-pci.c index 579e5bc7..7c9260ff 100644 --- a/qemu/hw/virtio-pci.c +++ b/qemu/hw/virtio-pci.c @@ -19,6 +19,7 @@ #include "pci.h" //#include "sysemu.h" #include "msix.h" +#include "net.h" /* from Linux's linux/virtio_pci.h */ @@ -87,6 +88,7 @@ typedef struct { VirtIODevice *vdev; uint32_t addr; uint32_t class_code; + uint32_t nvectors; } VirtIOPCIProxy; /* virtio device */ @@ -486,11 +488,21 @@ static void virtio_net_init_pci(PCIDevice *pci_dev) VirtIODevice *vdev; vdev = virtio_net_init(&pci_dev->qdev); + + /* set nvectors from property, unless the user specified something + * via -net nic,model=virtio,vectors=n command line option */ + if (pci_dev->qdev.nd->nvectors == NIC_NVECTORS_UNSPECIFIED) + if (proxy->nvectors != NIC_NVECTORS_UNSPECIFIED) + vdev->nvectors = proxy->nvectors; + virtio_init_pci(proxy, vdev, PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_NET, PCI_CLASS_NETWORK_ETHERNET, 0x00); + + /* make the actual value visible */ + proxy->nvectors = vdev->nvectors; } static void virtio_balloon_init_pci(PCIDevice *pci_dev) @@ -520,9 +532,18 @@ static PCIDeviceInfo virtio_info[] = { {/* end of list */} }, },{ - .qdev.name = "virtio-net-pci", - .qdev.size = sizeof(VirtIOPCIProxy), - .init = virtio_net_init_pci, + .qdev.name = "virtio-net-pci", + .qdev.size = sizeof(VirtIOPCIProxy), + .init = virtio_net_init_pci, + .qdev.props = (Property[]) { + { + .name = "vectors", + .info = &qdev_prop_uint32, + .offset = offsetof(VirtIOPCIProxy, nvectors), + .defval = (uint32_t[]) { NIC_NVECTORS_UNSPECIFIED }, + }, + {/* end of list */} + }, },{ .qdev.name = "virtio-console-pci", .qdev.size = sizeof(VirtIOPCIProxy), diff --git a/qemu/monitor.c b/qemu/monitor.c index e3028352..218f6dfd 100644 --- a/qemu/monitor.c +++ b/qemu/monitor.c @@ -85,7 +85,7 @@ struct Monitor { static LIST_HEAD(mon_list, Monitor) mon_list; -static const mon_cmd_t mon_cmds[55]; // must define these two due to MSVC not supporting variable length arrays +static const mon_cmd_t mon_cmds[56]; // must define these two due to MSVC not supporting variable length arrays static const mon_cmd_t info_cmds[35]; Monitor *cur_mon = NULL; diff --git a/qemu/qemu-monitor.h b/qemu/qemu-monitor.h index 61c46beb..d4fa7655 100644 --- a/qemu/qemu-monitor.h +++ b/qemu/qemu-monitor.h @@ -59,6 +59,8 @@ { "i", "/ii.", do_ioport_read, "/fmt addr", "I/O port read" }, +{ "o", "/ii", do_ioport_write, +"/fmt addr value", "I/O port write" }, { "sendkey", "si?", do_sendkey, "keys [hold_ms]", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)" }, diff --git a/qemu/qemu-options.h b/qemu/qemu-options.h index e92e57a8..202d2bea 100644 --- a/qemu/qemu-options.h +++ b/qemu/qemu-options.h @@ -50,7 +50,8 @@ DEF("pflash", HAS_ARG, QEMU_OPTION_pflash, "-pflash file use 'file' as a parallel flash image\n") DEF("boot", HAS_ARG, QEMU_OPTION_boot, -"-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\n") +"-boot [order=drives][,once=drives][,menu=on|off]\n" +" 'drives': floppy (a), hard disk (c), CD-ROM (d), network (n)\n") DEF("snapshot", 0, QEMU_OPTION_snapshot, "-snapshot write to temporary files instead of disk image files\n") @@ -83,7 +84,8 @@ DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice, "-usbdevice name add the host or guest USB device 'name'\n") DEF("name", HAS_ARG, QEMU_OPTION_name, -"-name string set the name of the guest\n") +"-name string1[,process=string2] set the name of the guest\n" +" string1 sets the window title and string2 the process name (on Linux)\n") DEF("uuid", HAS_ARG, QEMU_OPTION_uuid, "-uuid %%08x-%%04x-%%04x-%%04x-%%012x\n" @@ -234,7 +236,7 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "") #define SLIRP_OPTIONS "" #endif -// TAOP options +// TAP options #ifdef _WIN32 #define TAP_OPTIONS \ "-net tap[,vlan=n][,name=str],ifname=name\n" \ @@ -248,7 +250,7 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "") " and 'dfile' (default=%s);\n" \ " use '[down]script=no' to disable script execution;\n" \ " use 'fd=h' to connect to an already opened TAP interface\n" \ -" use 'sndbuf=nbytes' to limit the size of the send buffer\n" +" use 'sndbuf=nbytes' to limit the size of the send buffer\n" #else #define TAP_OPTIONS \ "-net tap[,vlan=n][,name=str][,fd=h][,ifname=name][,script=file][,downscript=dfile]\n" @@ -256,7 +258,7 @@ DEF("smb", HAS_ARG, QEMU_OPTION_smb, "") " network scripts 'file' (default=%s)\n" \ " and 'dfile' (default=%s);\n" \ " use '[down]script=no' to disable script execution;\n" \ -" use 'fd=h' to connect to an already opened TAP interface\n" +" use 'fd=h' to connect to an already opened TAP interface\n" #endif #endif @@ -285,12 +287,12 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, "-net socket[,vlan=n][,name=str][,fd=h][,mcast=maddr:port]\n" \ " connect the vlan 'n' to multicast maddr and port\n" \ VDE_OPTIONS \ - "-net dump[,vlan=n][,file=f][,len=n]\n" \ - " dump traffic on vlan 'n' to file 'f' (max n bytes per packet)\n" \ - "-net none use it alone to have zero network devices; if no -net option\n" \ - " is provided, the default is '-net nic -net user'\n") + "-net dump[,vlan=n][,file=f][,len=n]\n" \ + " dump traffic on vlan 'n' to file 'f' (max n bytes per packet)\n" \ + "-net none use it alone to have zero network devices; if no -net option\n" \ + " is provided, the default is '-net nic -net user'\n") -// END HEAVILY MODIFIED SECTION + // END HEAVILY MODIFIED SECTION DEF("bt", HAS_ARG, QEMU_OPTION_bt, \ "\n" \ @@ -367,8 +369,8 @@ DEF("kernel-kqemu", 0, QEMU_OPTION_kernel_kqemu, \ #endif #ifdef CONFIG_KQEMU -DEF("no-kqemu", 0, QEMU_OPTION_no_kqemu, \ -"-no-kqemu disable KQEMU kernel module usage\n") +DEF("enable-kqemu", 0, QEMU_OPTION_enable_kqemu, \ +"-enable-kqemu enable KQEMU kernel module usage\n") #endif #ifdef CONFIG_KVM diff --git a/qemu/qemu.h b/qemu/qemu.h deleted file mode 100644 index e69de29b..00000000