All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options
@ 2009-06-23 14:13 quintela
  2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>

Hi

this series of patches:
a- move object files only used by one target to that target Makefile.target
b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi}
   defaults is leave it enabled.  You need to add the --disable-* flag to get any change
c- disable the use of --smb <dir>

What is the intent:  we want to be able to not compile-in things that we are not
interested in (they are experimental/not needed for our target/...).

Is this the right approach?  Should I do something different?

For the next series, I am also interested on enable/disabling bits of a subsysem:
being able to support usb-hid but not usb-{host,net,msnd}.  I already have patches
to disable that, just waiting to hear what is the preffered way to get
that functionality.

Known problems:
- qemu-*.hx files don't run over cpp and then we are not able to remove from
  the help page the options that we don't support.
- drive_hot_add without scsi support do nothing.

Any comments?

Later, Juan.



Juan Quintela (15):
  Only compile-in selected audio drivers
  Make --disable-bluez to really remove bluetooth support
  rename usb variable to usb host
  protect with CONFIG_BRLAPI
  Make --disable-usb to really remove usb support
  Add --disable-smb to remove smb directories support
  add option to remove scsi support
  add option to disable wmware devices
  ssi bus is only used on the arm platform
  move i2c devices only used in arm devices to arm target
  sd flash is only used in arm devices
  move m48t59 and ecc driver to ppc and sparc, that are the targets
    that use it
  nand and ecc are only used on arm and cris argets
  enable isa_mmio only in the platforms that use it: ppc, arm, mips and
    sparc
  add option to disable virtio drivers

 Makefile          |   23 ++++++++++-----
 Makefile.hw       |    8 ++--
 Makefile.target   |   40 ++++++++++++++++++++------
 configure         |   81 +++++++++++++++++++++++++++++++++++++++++++---------
 hw/baum.h         |    2 +
 hw/nseries.c      |    2 +
 hw/pc.c           |    8 +++++
 hw/pci-hotplug.c  |    9 +++++-
 hw/pci.h          |    2 +
 hw/pckbd.c        |    4 +-
 hw/ppc_newworld.c |    2 +
 hw/ppc_oldworld.c |    3 +-
 hw/ppc_prep.c     |    2 +
 hw/pxa2xx.c       |    4 ++
 hw/realview.c     |    2 +
 hw/usb.h          |    3 ++
 hw/versatilepb.c  |    2 +
 monitor.c         |    2 +
 net.c             |    2 +
 qemu-monitor.hx   |    4 ++
 qemu-options.hx   |    4 ++-
 sysemu.h          |    4 ++
 vl.c              |   30 +++++++++++++++----
 23 files changed, 197 insertions(+), 46 deletions(-)

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
@ 2009-06-23 14:13 ` quintela
  2009-06-23 15:52   ` malc
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 02/15] Make --disable-bluez to really remove bluetooth support quintela
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index a0f24fa..60326fe 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -523,7 +523,16 @@ ifdef CONFIG_OSS
 LIBS += $(CONFIG_OSS_LIB)
 endif

-SOUND_HW = sb16.o es1370.o ac97.o
+SOUND_HW =
+ifdef CONFIG_SB16
+SOUND_HW += sb16.o
+endif
+ifdef CONFIG_ES1370
+SOUND_HW += es1370.o
+endif
+ifdef CONFIG_AC97
+SOUND_HW += ac97.o
+endif
 ifdef CONFIG_ADLIB
 SOUND_HW += fmopl.o adlib.o
 adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 02/15] Make --disable-bluez to really remove bluetooth support
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
  2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 03/15] rename usb variable to usb host quintela
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile  |    2 ++
 configure |    1 +
 vl.c      |   12 ++++++++++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index a06c9bf..588523c 100644
--- a/Makefile
+++ b/Makefile
@@ -105,8 +105,10 @@ OBJS+=scsi-generic.o
 OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
 OBJS+=sd.o ssi-sd.o
+ifdef CONFIG_BLUEZ
 OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
 OBJS+=bt-hci-csr.o
+endif
 OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
 OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
 OBJS+=msmouse.o ps2.o
diff --git a/configure b/configure
index 5f11464..92a1466 100755
--- a/configure
+++ b/configure
@@ -1448,6 +1448,7 @@ echo "Install blobs     $blobs"
 echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
+echo "bluetooth support $bluez"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
diff --git a/vl.c b/vl.c
index 60a00e1..914c907 100644
--- a/vl.c
+++ b/vl.c
@@ -1867,6 +1867,7 @@ int check_params(char *buf, int buf_size,
     return 0;
 }

+#ifdef CONFIG_BLUEZ
 /***********************************************************/
 /* Bluetooth support */
 static int nb_hcis;
@@ -2057,6 +2058,7 @@ static int bt_parse(const char *opt)
     fprintf(stderr, "qemu: bad bluetooth parameter '%s'\n", opt);
     return 1;
 }
+#endif /* CONFIG_BLUEZ */

 /***********************************************************/
 /* QEMU Block devices */
@@ -2716,10 +2718,14 @@ static int usb_device_add(const char *devname, int is_hotplug)
             return -1;
         nd_table[nic].model = "usb";
         dev = usb_net_init(&nd_table[nic]);
-    } else if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) {
+    } else
+#ifdef CONFIG_BLUEZ
+    if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) {
         dev = usb_bt_init(devname[2] ? hci_init(p) :
                         bt_new_hci(qemu_find_bt_vlan(0)));
-    } else {
+    } else
+#endif
+    {
         return -1;
     }
     if (!dev)
@@ -5872,10 +5878,12 @@ int main(int argc, char **argv, char **envp)

     net_client_check();

+#ifdef CONFIG_BLUEZ
     /* init the bluetooth world */
     for (i = 0; i < nb_bt_opts; i++)
         if (bt_parse(bt_opts[i]))
             exit(1);
+#endif

     /* init the memory */
     if (ram_size == 0)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 03/15] rename usb variable to usb host
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
  2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 02/15] Make --disable-bluez to really remove bluetooth support quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 04/15] protect with CONFIG_BRLAPI quintela
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 92a1466..73c3550 100755
--- a/configure
+++ b/configure
@@ -328,7 +328,7 @@ audio_drv_list="oss"
 audio_possible_drivers="oss alsa sdl esd pa"
 linux="yes"
 linux_user="yes"
-usb="linux"
+usb_host="linux"
 kvm="yes"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     kqemu="yes"
@@ -340,7 +340,7 @@ esac
 if [ "$bsd" = "yes" ] ; then
   if [ "$darwin" != "yes" ] ; then
     make="gmake"
-    usb="bsd"
+    usb_host="bsd"
   fi
   bsd_user="yes"
 fi
@@ -1803,7 +1803,7 @@ fi
 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h

 # USB host support
-case "$usb" in
+case "$usb_host" in
 linux)
   echo "HOST_USB=linux" >> $config_mak
 ;;
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 04/15] protect with CONFIG_BRLAPI
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (2 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 03/15] rename usb variable to usb host quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support quintela
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/baum.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/baum.h b/hw/baum.h
index ac34b30..3bad998 100644
--- a/hw/baum.h
+++ b/hw/baum.h
@@ -22,8 +22,10 @@
  * THE SOFTWARE.
  */

+#ifdef CONFIG_BRLAPI
 /* usb device */
 USBDevice *usb_baum_init(void);

 /* char device */
 CharDriverState *chr_baum_init(void);
+#endif
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (3 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 04/15] protect with CONFIG_BRLAPI quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 17:29   ` [Qemu-devel] " Jan Kiszka
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support quintela
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile          |    7 ++++++-
 Makefile.target   |    7 ++++++-
 configure         |   34 ++++++++++++++++++++++------------
 hw/nseries.c      |    2 ++
 hw/pc.c           |    2 ++
 hw/ppc_newworld.c |    2 ++
 hw/ppc_oldworld.c |    3 ++-
 hw/ppc_prep.c     |    2 ++
 hw/pxa2xx.c       |    4 ++++
 hw/realview.c     |    2 ++
 hw/usb.h          |    3 +++
 hw/versatilepb.c  |    2 ++
 monitor.c         |    2 ++
 qemu-monitor.hx   |    4 ++++
 qemu-options.hx   |    2 ++
 sysemu.h          |    4 ++++
 vl.c              |   14 +++++++++++---
 17 files changed, 78 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile
index 588523c..c4b41c4 100644
--- a/Makefile
+++ b/Makefile
@@ -102,11 +102,16 @@ OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
 OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
 OBJS+=scsi-disk.o cdrom.o
 OBJS+=scsi-generic.o
+ifdef CONFIG_USB
 OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
+endif
 OBJS+=sd.o ssi-sd.o
 ifdef CONFIG_BLUEZ
-OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
+OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o
+ifdef CONFIG_USB
+OBJS+=usb-bt.o
+endif
 OBJS+=bt-hci-csr.o
 endif
 OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
diff --git a/Makefile.target b/Makefile.target
index 60326fe..878294d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -565,8 +565,10 @@ ifeq ($(CONFIG_XEN), yes)
   LIBS += $(XEN_LIBS)
 endif

+ifdef CONFIG_USB
 # USB layer
 OBJS+= usb-ohci.o
+endif

 # PCI network cards
 OBJS += eepro100.o
@@ -583,7 +585,10 @@ ifeq ($(TARGET_BASE_ARCH), i386)
 OBJS+= ide.o pckbd.o vga.o $(SOUND_HW) dma.o
 OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
 OBJS+= cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
-OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
+ifdef CONFIG_USB
+OBJS+= usb-uhci.o
+endif
+OBJS+= vmmouse.o vmport.o vmware_vga.o hpet.o
 OBJS += device-hotplug.o pci-hotplug.o smbios.o
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 endif
diff --git a/configure b/configure
index 73c3550..f859065 100755
--- a/configure
+++ b/configure
@@ -191,6 +191,7 @@ nptl="yes"
 mixemu="no"
 bluez="yes"
 kvm="no"
+usb="yes"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -436,6 +437,8 @@ for opt do
   ;;
   --disable-bluez) bluez="no"
   ;;
+  --disable-usb) usb="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -627,6 +630,7 @@ echo "  --disable-vnc-sasl       disable SASL encryption for VNC server"
 echo "  --disable-curses         disable curses output"
 echo "  --disable-curl           disable curl connectivity"
 echo "  --disable-bluez          disable bluez stack connectivity"
+echo "  --disable-usb            disable usb stack connectivity"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -1449,6 +1453,7 @@ echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
 echo "bluetooth support $bluez"
+echo "usb support       $usb"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1802,18 +1807,23 @@ fi

 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h

-# USB host support
-case "$usb_host" in
-linux)
-  echo "HOST_USB=linux" >> $config_mak
-;;
-bsd)
-  echo "HOST_USB=bsd" >> $config_mak
-;;
-*)
-  echo "HOST_USB=stub" >> $config_mak
-;;
-esac
+if test "$usb" = "yes" ; then
+  echo "CONFIG_USB=yes" >> $config_mak
+  echo "#define CONFIG_USB 1" >> $config_h
+
+  # USB host support
+  case "$usb_host" in
+  linux)
+    echo "HOST_USB=linux" >> $config_mak
+  ;;
+  bsd)
+    echo "HOST_USB=bsd" >> $config_mak
+  ;;
+  *)
+    echo "HOST_USB=stub" >> $config_mak
+  ;;
+  esac
+fi

 # Determine what linker flags to use to force archive inclusion
 check_linker_flags()
diff --git a/hw/nseries.c b/hw/nseries.c
index b412aa0..55648e1 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -1314,8 +1314,10 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
     n8x0_dss_setup(s);
     n8x0_cbus_setup(s);
     n8x0_uart_setup(s);
+#ifdef CONFIG_USB
     if (usb_enabled)
         n8x0_usb_setup(s);
+#endif

     /* Setup initial (reset) machine state */

diff --git a/hw/pc.c b/hw/pc.c
index 86e5cfe..7e2ff41 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1119,9 +1119,11 @@ static void pc_init1(ram_addr_t ram_size,

     cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, hd);

+#ifdef CONFIG_USB
     if (pci_enabled && usb_enabled) {
         usb_uhci_piix3_init(pci_bus, piix3_devfn + 2);
     }
+#endif

     if (pci_enabled && acpi_enabled) {
         uint8_t *eeprom_buf = qemu_mallocz(8 * 256); /* XXX: make this persistent */
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index a1057b4..ae70842 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -331,9 +331,11 @@ static void ppc_core99_init (ram_addr_t ram_size,
                dbdma_mem_index, cuda_mem_index, NULL, 0, NULL,
                escc_mem_index);

+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pci(pci_bus, 3, -1);
     }
+#endif

     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
         graphic_depth = 15;
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 686e81f..6b94111 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -365,10 +365,11 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
                dbdma_mem_index, cuda_mem_index, nvr, 2, ide_mem_index,
                escc_mem_index);

+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pci(pci_bus, 3, -1);
     }
-
+#endif
     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
         graphic_depth = 15;

diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index b6f19a5..cd1cc12 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -738,9 +738,11 @@ static void ppc_prep_init (ram_addr_t ram_size,
     cpu_register_physical_memory(0xFEFF0000, 0x1000, PPC_io_memory);
 #endif

+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pci(pci_bus, 3, -1);
     }
+#endif

     m48t59 = m48t59_init(i8259[8], 0, 0x0074, NVRAM_SIZE, 59);
     if (m48t59 == NULL)
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c
index f2e98ff..26da459 100644
--- a/hw/pxa2xx.c
+++ b/hw/pxa2xx.c
@@ -2121,9 +2121,11 @@ PXA2xxState *pxa270_init(unsigned int sdram_size, const char *revision)
         s->ssp[i] = (SSIBus *)qdev_get_child_bus(dev, "ssi");
     }

+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pxa(0x4c000000, 3, -1, s->pic[PXA2XX_PIC_USBH1]);
     }
+#endif

     s->pcmcia[0] = pxa2xx_pcmcia_init(0x20000000);
     s->pcmcia[1] = pxa2xx_pcmcia_init(0x30000000);
@@ -2233,9 +2235,11 @@ PXA2xxState *pxa255_init(unsigned int sdram_size)
         s->ssp[i] = (SSIBus *)qdev_get_child_bus(dev, "ssi");
     }

+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pxa(0x4c000000, 3, -1, s->pic[PXA2XX_PIC_USBH1]);
     }
+#endif

     s->pcmcia[0] = pxa2xx_pcmcia_init(0x20000000);
     s->pcmcia[1] = pxa2xx_pcmcia_init(0x30000000);
diff --git a/hw/realview.c b/hw/realview.c
index 8e176b9..fd78875 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -110,9 +110,11 @@ static void realview_init(ram_addr_t ram_size,
     dev = sysbus_create_varargs("realview_pci", 0x60000000,
                                 pic[48], pic[49], pic[50], pic[51], NULL);
     pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pci(pci_bus, 3, -1);
     }
+#endif
     n = drive_get_max_bus(IF_SCSI);
     while (n >= 0) {
         pci_create_simple(pci_bus, -1, "lsi53c895a");
diff --git a/hw/usb.h b/hw/usb.h
index e9d4bc2..9ab3d0e 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -22,6 +22,8 @@
  * THE SOFTWARE.
  */

+
+#ifdef CONFIG_USB
 #include "block.h"

 #define USB_TOKEN_SETUP 0x2d
@@ -297,3 +299,4 @@ MUSBState *musb_init(qemu_irq *irqs);
 uint32_t musb_core_intr_get(MUSBState *s);
 void musb_core_intr_clear(MUSBState *s, uint32_t mask);
 void musb_set_size(MUSBState *s, int epnum, int size, int is_tx);
+#endif
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 3371121..ff6b279 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -215,9 +215,11 @@ static void versatile_init(ram_addr_t ram_size,
             pci_nic_init(nd, "rtl8139", NULL);
         }
     }
+#ifdef CONFIG_USB
     if (usb_enabled) {
         usb_ohci_init_pci(pci_bus, 3, -1);
     }
+#endif
     n = drive_get_max_bus(IF_SCSI);
     while (n >= 0) {
         pci_create_simple(pci_bus, -1, "lsi53c895a");
diff --git a/monitor.c b/monitor.c
index 6b45f6c..bf88dd1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1706,10 +1706,12 @@ static const mon_cmd_t info_cmds[] = {
       "", "show KVM information", },
     { "numa", "", do_info_numa,
       "", "show NUMA information", },
+#ifdef CONFIG_USB
     { "usb", "", usb_info,
       "", "show guest USB devices", },
     { "usbhost", "", usb_host_info,
       "", "show host USB devices", },
+#endif
     { "profile", "", do_info_profile,
       "", "show profiling information", },
     { "capture", "", do_info_capture,
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index fa48527..46dce9b 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -347,8 +347,10 @@ STEXI
 Compute the checksum of a memory region.
 ETEXI

+#ifdef CONFIG_USB
     { "usb_add", "s", do_usb_add,
       "device", "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')" },
+#endif
 STEXI
 @item usb_add @var{devname}

@@ -356,8 +358,10 @@ Add the USB device @var{devname}.  For details of available devices see
 @ref{usb_devices}
 ETEXI

+#ifdef CONFIG_USB
     { "usb_del", "s", do_usb_del,
       "device", "remove USB device 'bus.addr'" },
+#endif
 STEXI
 @item usb_del @var{devname}

diff --git a/qemu-options.hx b/qemu-options.hx
index 503da33..c765869 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -312,6 +312,7 @@ STEXI
 @end table
 ETEXI

+#ifdef CONFIG_USB
 DEF("usb", 0, QEMU_OPTION_usb,
     "-usb            enable the USB driver (will be the default soon)\n")
 STEXI
@@ -324,6 +325,7 @@ ETEXI

 DEF("usbdevice", HAS_ARG, QEMU_OPTION_usbdevice,
     "-usbdevice name add the host or guest USB device 'name'\n")
+#endif
 STEXI

 @item -usbdevice @var{devname}
diff --git a/sysemu.h b/sysemu.h
index d77de09..a6ede0c 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -115,7 +115,9 @@ extern const char *keyboard_layout;
 extern int win2k_install_hack;
 extern int rtc_td_hack;
 extern int alt_grab;
+#ifdef CONFIG_USB
 extern int usb_enabled;
+#endif
 extern int no_virtio_balloon;
 extern int smp_cpus;
 extern int cursor_hide;
@@ -267,9 +269,11 @@ struct soundhw {
 extern struct soundhw soundhw[];
 #endif

+#ifdef CONFIG_USB
 void do_usb_add(Monitor *mon, const char *devname);
 void do_usb_del(Monitor *mon, const char *devname);
 void usb_info(Monitor *mon);
+#endif

 int get_param_value(char *buf, int buf_size,
                     const char *tag, const char *str);
diff --git a/vl.c b/vl.c
index 914c907..e1ead85 100644
--- a/vl.c
+++ b/vl.c
@@ -238,7 +238,9 @@ CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES];
 int win2k_install_hack = 0;
 int rtc_td_hack = 0;
 #endif
+#ifdef CONFIG_USB
 int usb_enabled = 0;
+#endif
 int singlestep = 0;
 int smp_cpus = 1;
 const char *vnc_display;
@@ -2619,6 +2621,7 @@ static void numa_add(const char *optarg)
     return;
 }

+#ifdef CONFIG_USB
 /***********************************************************/
 /* USB devices */

@@ -2828,6 +2831,7 @@ void usb_info(Monitor *mon)
                        0, dev->addr, speed_str, dev->devname);
     }
 }
+#endif

 /***********************************************************/
 /* PCMCIA/Cardbus */
@@ -4989,8 +4993,10 @@ int main(int argc, char **argv, char **envp)
     const char *loadvm = NULL;
     QEMUMachine *machine;
     const char *cpu_model;
+#ifdef CONFIG_USB
     const char *usb_devices[MAX_USB_CMDLINE];
-    int usb_devices_index;
+    int usb_devices_index = 0;
+#endif
 #ifndef _WIN32
     int fds[2];
 #endif
@@ -5070,8 +5076,6 @@ int main(int argc, char **argv, char **envp)
         node_cpumask[i] = 0;
     }

-    usb_devices_index = 0;
-
     nb_net_clients = 0;
     nb_bt_opts = 0;
     nb_drives = 0;
@@ -5561,6 +5565,7 @@ int main(int argc, char **argv, char **envp)
 #endif
                 break;
 #endif
+#ifdef CONFIG_USB
             case QEMU_OPTION_usb:
                 usb_enabled = 1;
                 break;
@@ -5573,6 +5578,7 @@ int main(int argc, char **argv, char **envp)
                 usb_devices[usb_devices_index] = optarg;
                 usb_devices_index++;
                 break;
+#endif
             case QEMU_OPTION_smp:
                 smp_cpus = atoi(optarg);
                 if (smp_cpus < 1) {
@@ -6080,6 +6086,7 @@ int main(int argc, char **argv, char **envp)
         }
     }

+#ifdef CONFIG_USB
     /* init USB devices */
     if (usb_enabled) {
         for(i = 0; i < usb_devices_index; i++) {
@@ -6089,6 +6096,7 @@ int main(int argc, char **argv, char **envp)
             }
         }
     }
+#endif

     if (!display_state)
         dumb_display_init();
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (4 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 17:25   ` [Qemu-devel] " Jan Kiszka
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 07/15] add option to remove scsi support quintela
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure       |    9 +++++++++
 net.c           |    2 ++
 qemu-options.hx |    2 +-
 vl.c            |    2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index f859065..93823cb 100755
--- a/configure
+++ b/configure
@@ -192,6 +192,7 @@ mixemu="no"
 bluez="yes"
 kvm="no"
 usb="yes"
+smb="yes"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -439,6 +440,8 @@ for opt do
   ;;
   --disable-usb) usb="no"
   ;;
+  --disable-smb) smb="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -631,6 +634,7 @@ echo "  --disable-curses         disable curses output"
 echo "  --disable-curl           disable curl connectivity"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --disable-usb            disable usb stack connectivity"
+echo "  --disable-smb            disable smb directories support"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -663,6 +667,7 @@ if test "$mingw32" = "yes" ; then
     oss="no"
     linux_user="no"
     bsd_user="no"
+    smb="no"
     OS_CFLAGS="$OS_CFLAGS -DWIN32_LEAN_AND_MEAN -DWINVER=0x501"
 fi

@@ -1454,6 +1459,7 @@ echo "fdt support       $fdt"
 echo "preadv support    $preadv"
 echo "bluetooth support $bluez"
 echo "usb support       $usb"
+echo "smb directories   $smb"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1776,6 +1782,9 @@ fi
 if test "$xen" = "yes" ; then
   echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_mak
 fi
+if test "$smb" = "yes" ; then
+  echo "#define CONFIG_SMB 1" >> $config_h
+fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_h
   echo "CONFIG_AIO=yes" >> $config_mak
diff --git a/net.c b/net.c
index 55f70f2..8142f5e 100644
--- a/net.c
+++ b/net.c
@@ -996,6 +996,7 @@ static void slirp_smb(const char *exported_dir)
     slirp_add_exec(0, smb_cmdline, 4, 139);
 }

+#ifdef CONFIG_SMB
 /* automatic user mode samba server configuration */
 void net_slirp_smb(const char *exported_dir)
 {
@@ -1008,6 +1009,7 @@ void net_slirp_smb(const char *exported_dir)
         slirp_smb(exported_dir);
     }
 }
+#endif

 #endif /* !defined(_WIN32) */

diff --git a/qemu-options.hx b/qemu-options.hx
index c765869..0a0f327 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -937,7 +937,7 @@ qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0
 @end example
 ETEXI

-#ifndef _WIN32
+#ifdef CONFIG_SMB
 DEF("smb", HAS_ARG, QEMU_OPTION_smb, \
            "-smb dir        allow SMB access to files in 'dir' [-net user]\n")
 #endif
diff --git a/vl.c b/vl.c
index e1ead85..830ffa3 100644
--- a/vl.c
+++ b/vl.c
@@ -5314,7 +5314,7 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_bootp:
                 bootp_filename = optarg;
                 break;
-#ifndef _WIN32
+#ifdef CONFIG_SMB
             case QEMU_OPTION_smb:
 		net_slirp_smb(optarg);
                 break;
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 07/15] add option to remove scsi support
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (5 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 08/15] add option to disable wmware devices quintela
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile         |    6 ++++--
 Makefile.hw      |    3 ++-
 configure        |    9 +++++++++
 hw/pc.c          |    2 ++
 hw/pci-hotplug.c |    9 ++++++++-
 hw/pci.h         |    2 ++
 vl.c             |    2 ++
 7 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index c4b41c4..3fd0ef5 100644
--- a/Makefile
+++ b/Makefile
@@ -100,8 +100,10 @@ OBJS+=irq.o ptimer.o
 OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
 OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
 OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
-OBJS+=scsi-disk.o cdrom.o
-OBJS+=scsi-generic.o
+OBJS+=cdrom.o
+ifdef CONFIG_SCSI
+OBJS+=scsi-disk.o scsi-generic.o
+endif
 ifdef CONFIG_USB
 OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
diff --git a/Makefile.hw b/Makefile.hw
index 6accb3b..57a0ed6 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -23,8 +23,9 @@ OBJS+= nand.o ecc.o

 OBJS+= m48t59.o escc.o

-# SCSI layer
+ifdef CONFIG_SCSI
 OBJS+= lsi53c895a.o esp.o
+endif

 OBJS+= dma-helpers.o sysbus.o

diff --git a/configure b/configure
index 93823cb..4a1fb45 100755
--- a/configure
+++ b/configure
@@ -193,6 +193,7 @@ bluez="yes"
 kvm="no"
 usb="yes"
 smb="yes"
+scsi="yes"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -442,6 +443,8 @@ for opt do
   ;;
   --disable-smb) smb="no"
   ;;
+  --disable-scsi) scsi="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -635,6 +638,7 @@ echo "  --disable-curl           disable curl connectivity"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --disable-usb            disable usb stack connectivity"
 echo "  --disable-smb            disable smb directories support"
+echo "  --disable-scsi           disable scsi support"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -1460,6 +1464,7 @@ echo "preadv support    $preadv"
 echo "bluetooth support $bluez"
 echo "usb support       $usb"
 echo "smb directories   $smb"
+echo "scsi support      $scsi"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1785,6 +1790,10 @@ fi
 if test "$smb" = "yes" ; then
   echo "#define CONFIG_SMB 1" >> $config_h
 fi
+if test "$scsi" = "yes" ; then
+  echo "#define CONFIG_SCSI 1" >> $config_h
+  echo "CONFIG_SCSI=yes" >> $config_mak
+fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_h
   echo "CONFIG_AIO=yes" >> $config_mak
diff --git a/hw/pc.c b/hw/pc.c
index 7e2ff41..ee0e07f 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1144,6 +1144,7 @@ static void pc_init1(ram_addr_t ram_size,
         i440fx_init_memory_mappings(i440fx_state);
     }

+#ifdef CONFIG_SCSI
     if (pci_enabled) {
 	int max_bus;
         int bus;
@@ -1153,6 +1154,7 @@ static void pc_init1(ram_addr_t ram_size,
             pci_create_simple(pci_bus, -1, "lsi53c895a");
         }
     }
+#endif

     /* Add virtio block devices */
     if (pci_enabled) {
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 952e27a..677f494 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -78,11 +78,13 @@ void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
     bus = drive_get_max_bus (type);

     switch (type) {
+#ifdef CONFIG_SCSI
     case IF_SCSI:
         success = 1;
         lsi_scsi_attach(&dev->qdev, drives_table[drive_idx].bdrv,
                         drives_table[drive_idx].unit);
         break;
+#endif
     default:
         monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
     }
@@ -103,9 +105,12 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
     char buf[128];

     if (get_param_value(buf, sizeof(buf), "if", opts)) {
+#ifdef CONFIG_SCSI
         if (!strcmp(buf, "scsi"))
             type = IF_SCSI;
-        else if (!strcmp(buf, "virtio")) {
+        else
+#endif
+        if (!strcmp(buf, "virtio")) {
             type = IF_VIRTIO;
         } else {
             monitor_printf(mon, "type %s not a hotpluggable PCI device.\n", buf);
@@ -130,9 +135,11 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
     }

     switch (type) {
+#ifdef CONFIG_SCSI
     case IF_SCSI:
         dev = pci_create("lsi53c895a", devaddr);
         break;
+#endif
     case IF_VIRTIO:
         dev = pci_create("virtio-blk-pci", devaddr);
         break;
diff --git a/hw/pci.h b/hw/pci.h
index c8625de..317dc70 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -222,9 +222,11 @@ void pci_qdev_register(const char *name, int size, pci_qdev_initfn init);
 PCIDevice *pci_create(const char *name, const char *devaddr);
 PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name);

+#ifdef CONFIG_SCSI
 /* lsi53c895a.c */
 #define LSI_MAX_DEVS 7
 void lsi_scsi_attach(DeviceState *host, BlockDriverState *bd, int id);
+#endif

 /* vmware_vga.c */
 void pci_vmsvga_init(PCIBus *bus);
diff --git a/vl.c b/vl.c
index 830ffa3..b3cd8d9 100644
--- a/vl.c
+++ b/vl.c
@@ -2271,9 +2271,11 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque)
         if (!strcmp(buf, "ide")) {
 	    type = IF_IDE;
             max_devs = MAX_IDE_DEVS;
+#ifdef CONFIG_SCSI
         } else if (!strcmp(buf, "scsi")) {
 	    type = IF_SCSI;
             max_devs = MAX_SCSI_DEVS;
+#endif
         } else if (!strcmp(buf, "floppy")) {
 	    type = IF_FLOPPY;
             max_devs = 0;
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 08/15] add option to disable wmware devices
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (6 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 07/15] add option to remove scsi support quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 09/15] ssi bus is only used on the arm platform quintela
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    6 ++++--
 configure       |   15 +++++++++++++++
 hw/pc.c         |    4 ++++
 hw/pckbd.c      |    4 ++--
 4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 878294d..55575a1 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -588,8 +588,10 @@ OBJS+= cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
 ifdef CONFIG_USB
 OBJS+= usb-uhci.o
 endif
-OBJS+= vmmouse.o vmport.o vmware_vga.o hpet.o
-OBJS += device-hotplug.o pci-hotplug.o smbios.o
+ifdef CONFIG_VMWARE
+OBJS+= vmmouse.o vmport.o vmware_vga.o
+endif
+OBJS+= device-hotplug.o pci-hotplug.o smbios.o hpet.o
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 endif
 ifeq ($(TARGET_BASE_ARCH), ppc)
diff --git a/configure b/configure
index 4a1fb45..5554934 100755
--- a/configure
+++ b/configure
@@ -194,6 +194,7 @@ kvm="no"
 usb="yes"
 smb="yes"
 scsi="yes"
+vmware="no"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -340,6 +341,12 @@ fi
 ;;
 esac

+case $cpu in
+i386|x86_64)
+vmware="yes"
+;;
+esac
+
 if [ "$bsd" = "yes" ] ; then
   if [ "$darwin" != "yes" ] ; then
     make="gmake"
@@ -445,6 +452,8 @@ for opt do
   ;;
   --disable-scsi) scsi="no"
   ;;
+  --disable-vmware) vmware="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -639,6 +648,7 @@ echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --disable-usb            disable usb stack connectivity"
 echo "  --disable-smb            disable smb directories support"
 echo "  --disable-scsi           disable scsi support"
+echo "  --disable-vmware         disable vmware devices"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -1465,6 +1475,7 @@ echo "bluetooth support $bluez"
 echo "usb support       $usb"
 echo "smb directories   $smb"
 echo "scsi support      $scsi"
+echo "vwmare devices    $vmware"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1794,6 +1805,10 @@ if test "$scsi" = "yes" ; then
   echo "#define CONFIG_SCSI 1" >> $config_h
   echo "CONFIG_SCSI=yes" >> $config_mak
 fi
+if test "$vmware" = "yes" ; then
+  echo "#define CONFIG_VMWARE 1" >> $config_h
+  echo "CONFIG_VMWARE=yes" >> $config_mak
+fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_h
   echo "CONFIG_AIO=yes" >> $config_mak
diff --git a/hw/pc.c b/hw/pc.c
index ee0e07f..91d7a45 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -885,7 +885,9 @@ static void pc_init1(ram_addr_t ram_size,
         }
     }

+#ifdef CONFIG_VMWARE
     vmport_init();
+#endif

     /* allocate RAM */
     ram_addr = qemu_ram_alloc(0xa0000);
@@ -1021,11 +1023,13 @@ static void pc_init1(ram_addr_t ram_size,
         } else {
             isa_cirrus_vga_init();
         }
+#ifdef CONFIG_VMWARE
     } else if (vmsvga_enabled) {
         if (pci_enabled)
             pci_vmsvga_init(pci_bus);
         else
             fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
+#endif
     } else if (std_vga_enabled) {
         if (pci_enabled) {
             pci_vga_init(pci_bus, 0, 0);
diff --git a/hw/pckbd.c b/hw/pckbd.c
index 092d1ba..14f5f61 100644
--- a/hw/pckbd.c
+++ b/hw/pckbd.c
@@ -378,7 +378,7 @@ void i8042_init(qemu_irq kbd_irq, qemu_irq mouse_irq, uint32_t io_base)

     s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
     s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);
-#ifdef TARGET_I386
+#if defined(TARGET_i386) && defined(CONFIG_VMWARE)
     vmmouse_init(s->mouse);
 #endif
     qemu_register_reset(kbd_reset, 0, s);
@@ -435,7 +435,7 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq,

     s->kbd = ps2_kbd_init(kbd_update_kbd_irq, s);
     s->mouse = ps2_mouse_init(kbd_update_aux_irq, s);
-#ifdef TARGET_I386
+#if defined(TARGET_I386) && defined(CONFIG_VMWARE)
     vmmouse_init(s->mouse);
 #endif
     qemu_register_reset(kbd_reset, 0, s);
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 09/15] ssi bus is only used on the arm platform
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (7 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 08/15] add option to disable wmware devices quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target quintela
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    8 ++++----
 Makefile.target |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3fd0ef5..27043f3 100644
--- a/Makefile
+++ b/Makefile
@@ -97,8 +97,8 @@ OBJS=$(BLOCK_OBJS)
 OBJS+=readline.o console.o

 OBJS+=irq.o ptimer.o
-OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
-OBJS+=ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
+OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o wm8750.o
+OBJS+=ssd0303.o stellaris_input.o twl92230.o
 OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
 OBJS+=cdrom.o
 ifdef CONFIG_SCSI
@@ -108,7 +108,7 @@ ifdef CONFIG_USB
 OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
 endif
-OBJS+=sd.o ssi-sd.o
+OBJS+=sd.o
 ifdef CONFIG_BLUEZ
 OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o
 ifdef CONFIG_USB
@@ -119,7 +119,7 @@ endif
 OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
 OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
 OBJS+=msmouse.o ps2.o
-OBJS+=qdev.o ssi.o
+OBJS+=qdev.o

 ifdef CONFIG_BRLAPI
 OBJS+= baum.o
diff --git a/Makefile.target b/Makefile.target
index 55575a1..007e53e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -692,6 +692,7 @@ OBJS+= framebuffer.o
 OBJS+= syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
 OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 OBJS+= syborg_virtio.o
+OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (8 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 09/15] ssi bus is only used on the arm platform quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 16:20   ` Blue Swirl
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices quintela
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    5 ++---
 Makefile.target |    3 ++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 27043f3..b942ae3 100644
--- a/Makefile
+++ b/Makefile
@@ -97,9 +97,8 @@ OBJS=$(BLOCK_OBJS)
 OBJS+=readline.o console.o

 OBJS+=irq.o ptimer.o
-OBJS+=i2c.o smbus.o smbus_eeprom.o max7310.o wm8750.o
-OBJS+=ssd0303.o stellaris_input.o twl92230.o
-OBJS+=tmp105.o lm832x.o eeprom93xx.o tsc2005.o
+OBJS+=i2c.o smbus.o smbus_eeprom.o
+OBJS+=eeprom93xx.o
 OBJS+=cdrom.o
 ifdef CONFIG_SCSI
 OBJS+=scsi-disk.o scsi-generic.o
diff --git a/Makefile.target b/Makefile.target
index 007e53e..35ac91e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -692,7 +692,8 @@ OBJS+= framebuffer.o
 OBJS+= syborg.o syborg_fb.o syborg_interrupt.o syborg_keyboard.o
 OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 OBJS+= syborg_virtio.o
-OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o
+OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o max7310.o wm8750.o
+OBJS+= ssd0303.o stellaris_input.o twl92230.o tmp105.o lm832x.o tsc2005.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (9 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 16:19   ` Blue Swirl
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it quintela
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    1 -
 Makefile.target |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index b942ae3..110de1e 100644
--- a/Makefile
+++ b/Makefile
@@ -107,7 +107,6 @@ ifdef CONFIG_USB
 OBJS+=usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
 OBJS+=usb-serial.o usb-net.o
 endif
-OBJS+=sd.o
 ifdef CONFIG_BLUEZ
 OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o
 ifdef CONFIG_USB
diff --git a/Makefile.target b/Makefile.target
index 35ac91e..b6cd106 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -694,6 +694,7 @@ OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 OBJS+= syborg_virtio.o
 OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o max7310.o wm8750.o
 OBJS+= ssd0303.o stellaris_input.o twl92230.o tmp105.o lm832x.o tsc2005.o
+OBJS+= sd.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (10 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 16:20   ` Blue Swirl
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets quintela
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.hw     |    2 --
 Makefile.target |    5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile.hw b/Makefile.hw
index 57a0ed6..63d16cf 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -21,8 +21,6 @@ OBJS+= fw_cfg.o
 OBJS+= watchdog.o
 OBJS+= nand.o ecc.o

-OBJS+= m48t59.o escc.o
-
 ifdef CONFIG_SCSI
 OBJS+= lsi53c895a.o esp.o
 endif
diff --git a/Makefile.target b/Makefile.target
index b6cd106..c803c8a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -597,7 +597,7 @@ endif
 ifeq ($(TARGET_BASE_ARCH), ppc)
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 # shared objects
-OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
+OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o m48t59.o escc.o
 # PREP target
 OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
 OBJS+= prep_pci.o ppc_prep.o
@@ -667,8 +667,9 @@ OBJS+= cirrus_vga.o parallel.o
 else
 OBJS+= sun4m.o tcx.o iommu.o slavio_intctl.o
 OBJS+= slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
-OBJS+= cs4231.o eccmemctl.o sbi.o sun4c_intctl.o
+OBJS+= cs4231.o eccmemctl.o sbi.o sun4c_intctl.o escc.o
 endif
+OBJS+= m48t59.o
 endif
 ifeq ($(TARGET_BASE_ARCH), arm)
 OBJS+= integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (11 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 16:21   ` Blue Swirl
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc quintela
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.hw     |    1 -
 Makefile.target |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.hw b/Makefile.hw
index 63d16cf..6075fd3 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -19,7 +19,6 @@ OBJS=
 OBJS+= virtio.o virtio-pci.o
 OBJS+= fw_cfg.o
 OBJS+= watchdog.o
-OBJS+= nand.o ecc.o

 ifdef CONFIG_SCSI
 OBJS+= lsi53c895a.o esp.o
diff --git a/Makefile.target b/Makefile.target
index c803c8a..cb2b650 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -657,7 +657,7 @@ OBJS+= etraxfs_eth.o
 OBJS+= etraxfs_timer.o
 OBJS+= etraxfs_ser.o

-OBJS+= pflash_cfi02.o
+OBJS+= pflash_cfi02.o nand.o
 endif
 ifeq ($(TARGET_BASE_ARCH), sparc)
 ifeq ($(TARGET_ARCH), sparc64)
@@ -695,7 +695,7 @@ OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 OBJS+= syborg_virtio.o
 OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o max7310.o wm8750.o
 OBJS+= ssd0303.o stellaris_input.o twl92230.o tmp105.o lm832x.o tsc2005.o
-OBJS+= sd.o
+OBJS+= sd.o nand.o ecc.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (12 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 16:21   ` Blue Swirl
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 15/15] add option to disable virtio drivers quintela
  2009-06-23 19:09 ` [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options Anthony Liguori
  15 siblings, 1 reply; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index cb2b650..7240f81 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -494,8 +494,8 @@ endif #CONFIG_BSD_USER
 # System emulator target
 ifndef CONFIG_USER_ONLY

-OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o \
-     gdbstub.o gdbstub-xml.o
+OBJS=vl.o osdep.o monitor.o pci.o loader.o machine.o  gdbstub.o gdbstub-xml.o
+
 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
 OBJS+=virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
@@ -597,7 +597,7 @@ endif
 ifeq ($(TARGET_BASE_ARCH), ppc)
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 # shared objects
-OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o m48t59.o escc.o
+OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o m48t59.o escc.o isa_mmio.o
 # PREP target
 OBJS+= pckbd.o serial.o i8259.o i8254.o fdc.o mc146818rtc.o
 OBJS+= prep_pci.o ppc_prep.o
@@ -627,7 +627,7 @@ OBJS+= g364fb.o jazz_led.o dp8393x.o
 OBJS+= ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
 OBJS+= piix_pci.o parallel.o cirrus_vga.o pcspk.o $(SOUND_HW)
 OBJS+= mipsnet.o
-OBJS+= pflash_cfi01.o
+OBJS+= pflash_cfi01.o isa_mmio.o
 OBJS+= vmware_vga.o
 CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
 endif
@@ -669,7 +669,7 @@ OBJS+= sun4m.o tcx.o iommu.o slavio_intctl.o
 OBJS+= slavio_timer.o slavio_misc.o fdc.o sparc32_dma.o
 OBJS+= cs4231.o eccmemctl.o sbi.o sun4c_intctl.o escc.o
 endif
-OBJS+= m48t59.o
+OBJS+= m48t59.o isa_mmio.o
 endif
 ifeq ($(TARGET_BASE_ARCH), arm)
 OBJS+= integratorcp.o versatilepb.o smc91c111.o arm_pic.o arm_timer.o
@@ -695,7 +695,7 @@ OBJS+= syborg_serial.o syborg_timer.o syborg_pointer.o syborg_rtc.o
 OBJS+= syborg_virtio.o
 OBJS+= ssi.o ssi-sd.o max111x.o ssd0323.o ads7846.o max7310.o wm8750.o
 OBJS+= ssd0303.o stellaris_input.o twl92230.o tmp105.o lm832x.o tsc2005.o
-OBJS+= sd.o nand.o ecc.o
+OBJS+= sd.o nand.o ecc.o isa_mmio.o
 CPPFLAGS += -DHAS_AUDIO
 endif
 ifeq ($(TARGET_BASE_ARCH), sh4)
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [Qemu-devel] [PATCH 15/15] add option to disable virtio drivers
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (13 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc quintela
@ 2009-06-23 14:14 ` quintela
  2009-06-23 19:09 ` [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options Anthony Liguori
  15 siblings, 0 replies; 31+ messages in thread
From: quintela @ 2009-06-23 14:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.hw     |    2 ++
 Makefile.target |    2 ++
 configure       |    9 +++++++++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Makefile.hw b/Makefile.hw
index 6075fd3..3302555 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -16,7 +16,9 @@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CPPFLAGS+=-I$(SRC_PATH)/fpu

 OBJS=
+ifdef CONFIG_VIRTIO
 OBJS+= virtio.o virtio-pci.o
+endif
 OBJS+= fw_cfg.o
 OBJS+= watchdog.o

diff --git a/Makefile.target b/Makefile.target
index 7240f81..1ba81df 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -498,7 +498,9 @@ OBJS=vl.o osdep.o monitor.o pci.o loader.o machine.o  gdbstub.o gdbstub-xml.o

 # virtio has to be here due to weird dependency between PCI and virtio-net.
 # need to fix this properly
+ifdef CONFIG_VIRTIO
 OBJS+=virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
+endif
 ifdef CONFIG_KVM
 OBJS+=kvm.o kvm-all.o
 endif
diff --git a/configure b/configure
index 5554934..8a6660d 100755
--- a/configure
+++ b/configure
@@ -195,6 +195,7 @@ usb="yes"
 smb="yes"
 scsi="yes"
 vmware="no"
+virtio="yes"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -454,6 +455,8 @@ for opt do
   ;;
   --disable-vmware) vmware="no"
   ;;
+  --disable-virtio) virtio="no"
+  ;;
   --disable-kvm) kvm="no"
   ;;
   --enable-profiler) profiler="yes"
@@ -649,6 +652,7 @@ echo "  --disable-usb            disable usb stack connectivity"
 echo "  --disable-smb            disable smb directories support"
 echo "  --disable-scsi           disable scsi support"
 echo "  --disable-vmware         disable vmware devices"
+echo "  --disable-virtio         disable virtio devices"
 echo "  --disable-kvm            disable KVM acceleration support"
 echo "  --disable-nptl           disable usermode NPTL support"
 echo "  --enable-system          enable all system emulation targets"
@@ -1476,6 +1480,7 @@ echo "usb support       $usb"
 echo "smb directories   $smb"
 echo "scsi support      $scsi"
 echo "vwmare devices    $vmware"
+echo "virtio devices    $virtio"

 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1809,6 +1814,10 @@ if test "$vmware" = "yes" ; then
   echo "#define CONFIG_VMWARE 1" >> $config_h
   echo "CONFIG_VMWARE=yes" >> $config_mak
 fi
+if test "$virtio" = "yes" ; then
+  echo "#define CONFIG_VIRTIO 1" >> $config_h
+  echo "CONFIG_VIRTIO=yes" >> $config_mak
+fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_h
   echo "CONFIG_AIO=yes" >> $config_mak
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers
  2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
@ 2009-06-23 15:52   ` malc
  0 siblings, 0 replies; 31+ messages in thread
From: malc @ 2009-06-23 15:52 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

On Tue, 23 Jun 2009, quintela@redhat.com wrote:

> From: Juan Quintela <quintela@redhat.com>
> 
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  Makefile.target |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile.target b/Makefile.target
> index a0f24fa..60326fe 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -523,7 +523,16 @@ ifdef CONFIG_OSS
>  LIBS += $(CONFIG_OSS_LIB)
>  endif
> 
> -SOUND_HW = sb16.o es1370.o ac97.o
> +SOUND_HW =
> +ifdef CONFIG_SB16
> +SOUND_HW += sb16.o
> +endif
> +ifdef CONFIG_ES1370
> +SOUND_HW += es1370.o
> +endif
> +ifdef CONFIG_AC97
> +SOUND_HW += ac97.o
> +endif
>  ifdef CONFIG_ADLIB
>  SOUND_HW += fmopl.o adlib.o
>  adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
> 

Fine by me, while you are at it pcspk can also be made conditional.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices quintela
@ 2009-06-23 16:19   ` Blue Swirl
  2009-06-23 16:27     ` [Qemu-devel] " Juan Quintela
  2009-06-23 19:11     ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:19 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>

While $SUBJECT may be true, the patch still goes to wrong direction.
The long term goal is to have a single binary for all systems. This
means that devices should get more generic and not be tied to some
systems.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target quintela
@ 2009-06-23 16:20   ` Blue Swirl
  0 siblings, 0 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:20 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>

See my comment on 11/15.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it quintela
@ 2009-06-23 16:20   ` Blue Swirl
  0 siblings, 0 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:20 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>
>

See my comment on 11/15.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets quintela
@ 2009-06-23 16:21   ` Blue Swirl
  0 siblings, 0 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:21 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>

See my comment on 11/15.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc quintela
@ 2009-06-23 16:21   ` Blue Swirl
  0 siblings, 0 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:21 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>

See my comment on 11/15.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [PATCH 11/15] sd flash is only used in arm devices
  2009-06-23 16:19   ` Blue Swirl
@ 2009-06-23 16:27     ` Juan Quintela
  2009-06-23 16:43       ` Blue Swirl
  2009-06-23 19:11     ` [Qemu-devel] " Anthony Liguori
  1 sibling, 1 reply; 31+ messages in thread
From: Juan Quintela @ 2009-06-23 16:27 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

Blue Swirl <blauwirbel@gmail.com> wrote:
> On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
>> From: Juan Quintela <quintela@redhat.com>
>
> While $SUBJECT may be true, the patch still goes to wrong direction.
> The long term goal is to have a single binary for all systems. This
> means that devices should get more generic and not be tied to some
> systems.

What do you prefer then, a config option that get only enabled for each
arch when it is needed?

Something like ARCH_HAS_SD=0|1

and then have the sd.o file in a single place on the Makefile.

What we are searching here is to be able to compile-out functionality
that we are not interested in.  This RFC was related about how people
preffer it implemented.

Thanks for de review, Juan.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [PATCH 11/15] sd flash is only used in arm devices
  2009-06-23 16:27     ` [Qemu-devel] " Juan Quintela
@ 2009-06-23 16:43       ` Blue Swirl
  0 siblings, 0 replies; 31+ messages in thread
From: Blue Swirl @ 2009-06-23 16:43 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

On 6/23/09, Juan Quintela <quintela@redhat.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> wrote:
>  > On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
>  >> From: Juan Quintela <quintela@redhat.com>
>  >
>  > While $SUBJECT may be true, the patch still goes to wrong direction.
>  > The long term goal is to have a single binary for all systems. This
>  > means that devices should get more generic and not be tied to some
>  > systems.
>
>
> What do you prefer then, a config option that get only enabled for each
>  arch when it is needed?
>
>  Something like ARCH_HAS_SD=0|1
>
>  and then have the sd.o file in a single place on the Makefile.

Or CONFIG_SD, defined only if needed.

>  What we are searching here is to be able to compile-out functionality
>  that we are not interested in.  This RFC was related about how people
>  preffer it implemented.

Sounds like we'd get faster builds when building only a few targets, nice.

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [PATCH 06/15] Add --disable-smb to remove smb directories support
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support quintela
@ 2009-06-23 17:25   ` Jan Kiszka
  0 siblings, 0 replies; 31+ messages in thread
From: Jan Kiszka @ 2009-06-23 17:25 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

quintela@redhat.com wrote:
> From: Juan Quintela <quintela@redhat.com>
> 
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  configure       |    9 +++++++++
>  net.c           |    2 ++
>  qemu-options.hx |    2 +-
>  vl.c            |    2 +-
>  4 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index f859065..93823cb 100755
> --- a/configure
> +++ b/configure
> @@ -192,6 +192,7 @@ mixemu="no"
>  bluez="yes"
>  kvm="no"
>  usb="yes"
> +smb="yes"
>  kerneldir=""
>  aix="no"
>  blobs="yes"
> @@ -439,6 +440,8 @@ for opt do
>    ;;
>    --disable-usb) usb="no"
>    ;;
> +  --disable-smb) smb="no"
> +  ;;
>    --disable-kvm) kvm="no"
>    ;;
>    --enable-profiler) profiler="yes"
> @@ -631,6 +634,7 @@ echo "  --disable-curses         disable curses output"
>  echo "  --disable-curl           disable curl connectivity"
>  echo "  --disable-bluez          disable bluez stack connectivity"
>  echo "  --disable-usb            disable usb stack connectivity"
> +echo "  --disable-smb            disable smb directories support"
>  echo "  --disable-kvm            disable KVM acceleration support"
>  echo "  --disable-nptl           disable usermode NPTL support"
>  echo "  --enable-system          enable all system emulation targets"
> @@ -663,6 +667,7 @@ if test "$mingw32" = "yes" ; then
>      oss="no"
>      linux_user="no"
>      bsd_user="no"
> +    smb="no"
>      OS_CFLAGS="$OS_CFLAGS -DWIN32_LEAN_AND_MEAN -DWINVER=0x501"
>  fi
> 
> @@ -1454,6 +1459,7 @@ echo "fdt support       $fdt"
>  echo "preadv support    $preadv"
>  echo "bluetooth support $bluez"
>  echo "usb support       $usb"
> +echo "smb directories   $smb"
> 
>  if test $sdl_too_old = "yes"; then
>  echo "-> Your SDL version is too old - please upgrade to have SDL support"
> @@ -1776,6 +1782,9 @@ fi
>  if test "$xen" = "yes" ; then
>    echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_mak
>  fi
> +if test "$smb" = "yes" ; then
> +  echo "#define CONFIG_SMB 1" >> $config_h
> +fi
>  if test "$aio" = "yes" ; then
>    echo "#define CONFIG_AIO 1" >> $config_h
>    echo "CONFIG_AIO=yes" >> $config_mak
> diff --git a/net.c b/net.c
> index 55f70f2..8142f5e 100644
> --- a/net.c
> +++ b/net.c
> @@ -996,6 +996,7 @@ static void slirp_smb(const char *exported_dir)
>      slirp_add_exec(0, smb_cmdline, 4, 139);
>  }
> 
> +#ifdef CONFIG_SMB
>  /* automatic user mode samba server configuration */
>  void net_slirp_smb(const char *exported_dir)
>  {
> @@ -1008,6 +1009,7 @@ void net_slirp_smb(const char *exported_dir)
>          slirp_smb(exported_dir);
>      }
>  }
> +#endif
> 
>  #endif /* !defined(_WIN32) */
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index c765869..0a0f327 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -937,7 +937,7 @@ qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0
>  @end example
>  ETEXI
> 
> -#ifndef _WIN32
> +#ifdef CONFIG_SMB
>  DEF("smb", HAS_ARG, QEMU_OPTION_smb, \
>             "-smb dir        allow SMB access to files in 'dir' [-net user]\n")
>  #endif
> diff --git a/vl.c b/vl.c
> index e1ead85..830ffa3 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -5314,7 +5314,7 @@ int main(int argc, char **argv, char **envp)
>              case QEMU_OPTION_bootp:
>                  bootp_filename = optarg;
>                  break;
> -#ifndef _WIN32
> +#ifdef CONFIG_SMB
>              case QEMU_OPTION_smb:
>  		net_slirp_smb(optarg);
>                  break;

This patch collides with pending rework of the slirp stack. I hope to
role them out the next days (some tests and one feature is missing ATM).
I would appreciate if we can synchronize before merging -- if we really
want it...

I think the patch does not reflect the dependency of CONFIG_SMB on
CONFIG_SLIRP. Moreover, I bet it's not covering all bits. Given the
small amount of code it avoids, I would say: keep this feature under the
hood of CONFIG_SLIRP. It's not worth the complication (it will become
much more complicated with my fully configurable slirp stack, see
earlier postings).

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [PATCH 05/15] Make --disable-usb to really remove usb support
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support quintela
@ 2009-06-23 17:29   ` Jan Kiszka
  0 siblings, 0 replies; 31+ messages in thread
From: Jan Kiszka @ 2009-06-23 17:29 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

quintela@redhat.com wrote:
> From: Juan Quintela <quintela@redhat.com>
> 
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  Makefile          |    7 ++++++-
>  Makefile.target   |    7 ++++++-
>  configure         |   34 ++++++++++++++++++++++------------
>  hw/nseries.c      |    2 ++
>  hw/pc.c           |    2 ++
>  hw/ppc_newworld.c |    2 ++
>  hw/ppc_oldworld.c |    3 ++-
>  hw/ppc_prep.c     |    2 ++
>  hw/pxa2xx.c       |    4 ++++
>  hw/realview.c     |    2 ++
>  hw/usb.h          |    3 +++
>  hw/versatilepb.c  |    2 ++
>  monitor.c         |    2 ++
>  qemu-monitor.hx   |    4 ++++
>  qemu-options.hx   |    2 ++
>  sysemu.h          |    4 ++++
>  vl.c              |   14 +++++++++++---
>  17 files changed, 78 insertions(+), 18 deletions(-)
> 

...

> diff --git a/hw/nseries.c b/hw/nseries.c
> index b412aa0..55648e1 100644
> --- a/hw/nseries.c
> +++ b/hw/nseries.c
> @@ -1314,8 +1314,10 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
>      n8x0_dss_setup(s);
>      n8x0_cbus_setup(s);
>      n8x0_uart_setup(s);
> +#ifdef CONFIG_USB
>      if (usb_enabled)
>          n8x0_usb_setup(s);
> +#endif

I think there are some good patterns available to avoid this #ifdef all
over the place. Check how kvm_enabled works, e.g.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options
  2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
                   ` (14 preceding siblings ...)
  2009-06-23 14:14 ` [Qemu-devel] [PATCH 15/15] add option to disable virtio drivers quintela
@ 2009-06-23 19:09 ` Anthony Liguori
  2009-06-24 18:17   ` [Qemu-devel] " Juan Quintela
  15 siblings, 1 reply; 31+ messages in thread
From: Anthony Liguori @ 2009-06-23 19:09 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

quintela@redhat.com wrote:
> From: Juan Quintela <quintela@redhat.com>
>
> Hi
>
> this series of patches:
> a- move object files only used by one target to that target Makefile.target
> b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi}
>    defaults is leave it enabled.  You need to add the --disable-* flag to get any change
> c- disable the use of --smb <dir>
>
> What is the intent:  we want to be able to not compile-in things that we are not
> interested in (they are experimental/not needed for our target/...).
>
> Is this the right approach?  Should I do something different?
>
> For the next series, I am also interested on enable/disabling bits of a subsysem:
> being able to support usb-hid but not usb-{host,net,msnd}.  I already have patches
> to disable that, just waiting to hear what is the preffered way to get
> that functionality.
>
> Known problems:
> - qemu-*.hx files don't run over cpp and then we are not able to remove from
>   the help page the options that we don't support.
> - drive_hot_add without scsi support do nothing.
>
> Any comments?
>   

To me, there are a few fundamental requirements for this:

1) This be configurable via a .config file instead of via ./configure 
options.
2) This involve no additional #ifdefs in the code
3) In the Makefiles, instead of having ifdef conditionals, we do:
    objs-$(CONFIG_FOO) += foo.o

The block/ drivers are the model here.  If you drop individual files 
from the build, it Just Works.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices
  2009-06-23 16:19   ` Blue Swirl
  2009-06-23 16:27     ` [Qemu-devel] " Juan Quintela
@ 2009-06-23 19:11     ` Anthony Liguori
  1 sibling, 0 replies; 31+ messages in thread
From: Anthony Liguori @ 2009-06-23 19:11 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, quintela

Blue Swirl wrote:
> On 6/23/09, quintela@redhat.com <quintela@redhat.com> wrote:
>   
>> From: Juan Quintela <quintela@redhat.com>
>>     
>
> While $SUBJECT may be true, the patch still goes to wrong direction.
> The long term goal is to have a single binary for all systems. This
> means that devices should get more generic and not be tied to some
> systems.
>   

While I agree with you, I think we want the device models to be treated 
as modules.  This would allow someone to easily create a small version 
of QEMU that just emulated the things they were interested in.

But the overriding goal should be to do this while eliminating #ifdefs 
and ifdefs so I think this series needs to take a different approach.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [RFC PATCH 00/15] Be able to compile out not needed options
  2009-06-23 19:09 ` [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options Anthony Liguori
@ 2009-06-24 18:17   ` Juan Quintela
  2009-06-24 18:31     ` Anthony Liguori
  0 siblings, 1 reply; 31+ messages in thread
From: Juan Quintela @ 2009-06-24 18:17 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Anthony Liguori <anthony@codemonkey.ws> wrote:
> quintela@redhat.com wrote:
>> From: Juan Quintela <quintela@redhat.com>
>>
>> Hi
>>
>> this series of patches:
>> a- move object files only used by one target to that target Makefile.target
>> b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi}
>>    defaults is leave it enabled.  You need to add the --disable-* flag to get any change
>> c- disable the use of --smb <dir>
>>
>> What is the intent:  we want to be able to not compile-in things that we are not
>> interested in (they are experimental/not needed for our target/...).
>>
>> Is this the right approach?  Should I do something different?
>>
>> For the next series, I am also interested on enable/disabling bits of a subsysem:
>> being able to support usb-hid but not usb-{host,net,msnd}.  I already have patches
>> to disable that, just waiting to hear what is the preffered way to get
>> that functionality.
>>
>> Known problems:
>> - qemu-*.hx files don't run over cpp and then we are not able to remove from
>>   the help page the options that we don't support.
>> - drive_hot_add without scsi support do nothing.
>>
>> Any comments?
>>   
>
> To me, there are a few fundamental requirements for this:
>
> 1) This be configurable via a .config file instead of via ./configure
> options.

We have config-hosts.mak.
If we don't want to do it with ./configure, with what/how do you want it
to happen.

Do we agree in having:

qemu/.config
qemu/.config.mak
target-*/.config
target-*/.config.mak

And remove Makefile.target (i.e. split it in the target directories).

The problem that I saw otherwise with current approach is that it
is difficult to have a module linked for one target and not for another.
(No adding yet more ifdefs tricks is not a solution IMHO).

> 2) This involve no additional #ifdefs in the code

That is doable, if we agree that putting stub declarations in .h files
is ok.  I was following the "current style".

> 3) In the Makefiles, instead of having ifdef conditionals, we do:
>    objs-$(CONFIG_FOO) += foo.o

No problem with that for me if people agree in merging this solution.

> The block/ drivers are the model here.  If you drop individual files
> from the build, it Just Works.

But block/ drivers are _easy_ in this regard, you only have to register
a struct, and they become available.  USB/SCSI/... touch code in the
middle of pc.c and the other platforms "machine" files.

On the other hand, block implementation is not flexible enough for us
yet (TM).  We would like to be able to complie all block drivers for
qemu-img and only some of them for qemu :)

Will redo the patches with this (and the other people suggestions).

Thank for the input, Juan.

> Regards,
>
> Anthony Liguori

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [Qemu-devel] Re: [RFC PATCH 00/15] Be able to compile out not needed options
  2009-06-24 18:17   ` [Qemu-devel] " Juan Quintela
@ 2009-06-24 18:31     ` Anthony Liguori
  2009-06-29  9:45       ` Gerd Hoffmann
  0 siblings, 1 reply; 31+ messages in thread
From: Anthony Liguori @ 2009-06-24 18:31 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

Juan Quintela wrote:
> Anthony Liguori <anthony@codemonkey.ws> wrote:
>   
>> quintela@redhat.com wrote:
>>     
>>> From: Juan Quintela <quintela@redhat.com>
>>>
>>> Hi
>>>
>>> this series of patches:
>>> a- move object files only used by one target to that target Makefile.target
>>> b- add flags to disable parts: --disable-{bluez,usb,vwmare,virtio,scsi}
>>>    defaults is leave it enabled.  You need to add the --disable-* flag to get any change
>>> c- disable the use of --smb <dir>
>>>
>>> What is the intent:  we want to be able to not compile-in things that we are not
>>> interested in (they are experimental/not needed for our target/...).
>>>
>>> Is this the right approach?  Should I do something different?
>>>
>>> For the next series, I am also interested on enable/disabling bits of a subsysem:
>>> being able to support usb-hid but not usb-{host,net,msnd}.  I already have patches
>>> to disable that, just waiting to hear what is the preffered way to get
>>> that functionality.
>>>
>>> Known problems:
>>> - qemu-*.hx files don't run over cpp and then we are not able to remove from
>>>   the help page the options that we don't support.
>>> - drive_hot_add without scsi support do nothing.
>>>
>>> Any comments?
>>>   
>>>       
>> To me, there are a few fundamental requirements for this:
>>
>> 1) This be configurable via a .config file instead of via ./configure
>> options.
>>     
>
> We have config-hosts.mak.
>   

config-host.mak is generated.  We need something that isn't generated.

> If we don't want to do it with ./configure, with what/how do you want it
> to happen.
>
> Do we agree in having:
>
> qemu/.config
> qemu/.config.mak
> target-*/.config
> target-*/.config.mak
>   

I don't think we need all of these.  I don't think we need separate .mak 
and .h files.  The later can be generated from the former.

> The problem that I saw otherwise with current approach is that it
> is difficult to have a module linked for one target and not for another.
> (No adding yet more ifdefs tricks is not a solution IMHO).
>   

I suspect we will need to restructure Makefile.target to get this 
working.  I'd suggest focusing on host configuration to start with to 
avoid this problem.

>> 2) This involve no additional #ifdefs in the code
>>     
>
> That is doable, if we agree that putting stub declarations in .h files
> is ok.  I was following the "current style".
>   

You usually shouldn't need stubs either.  Take for instance, the changes 
you make for --disable-bluez.

First, you'll want to move all the stuff in vl.c that's bluez specific 
to a separate file.

For usb_device_add, you would need to add a registration API that allows 
registering an emulated usb device.  In your new file, in a module load 
function, you would register bt and the bt: protocol as emulated usb 
devices.

Getting the actual bt options is a bit trickier.  I think we have to 
deal with #ifdefs on that one.  We can at least make the bt_parse() 
calls part of an option parsing callback or something.

>> The block/ drivers are the model here.  If you drop individual files
>> from the build, it Just Works.
>>     
>
> But block/ drivers are _easy_ in this regard, you only have to register
> a struct, and they become available.  USB/SCSI/... touch code in the
> middle of pc.c and the other platforms "machine" files.
>   

Yes, that's precisely what we want to fix :-)  block is easy because a 
lot of work was put into making it well isolated from everything else.  
It's the new model for how the rest of QEMU should look :-)

> On the other hand, block implementation is not flexible enough for us
> yet (TM).  We would like to be able to complie all block drivers for
> qemu-img and only some of them for qemu :)
>   

That's an interesting idea.

> Will redo the patches with this (and the other people suggestions).
>
> Thank for the input, Juan.
>   

Thanks for taking up this effort!

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [Qemu-devel] Re: [RFC PATCH 00/15] Be able to compile out not needed options
  2009-06-24 18:31     ` Anthony Liguori
@ 2009-06-29  9:45       ` Gerd Hoffmann
  0 siblings, 0 replies; 31+ messages in thread
From: Gerd Hoffmann @ 2009-06-29  9:45 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, Juan Quintela

On 06/24/09 20:31, Anthony Liguori wrote:

> For usb_device_add, you would need to add a registration API that allows
> registering an emulated usb device.

man qdev ;)

And usb is relatively easy as devices are added via -usbdevice and there 
is almost no windup in the hw/${machine}.c files.

cheers,
   Gerd

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2009-06-29  9:46 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-23 14:13 [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options quintela
2009-06-23 14:13 ` [Qemu-devel] [PATCH 01/15] Only compile-in selected audio drivers quintela
2009-06-23 15:52   ` malc
2009-06-23 14:14 ` [Qemu-devel] [PATCH 02/15] Make --disable-bluez to really remove bluetooth support quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 03/15] rename usb variable to usb host quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 04/15] protect with CONFIG_BRLAPI quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 05/15] Make --disable-usb to really remove usb support quintela
2009-06-23 17:29   ` [Qemu-devel] " Jan Kiszka
2009-06-23 14:14 ` [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support quintela
2009-06-23 17:25   ` [Qemu-devel] " Jan Kiszka
2009-06-23 14:14 ` [Qemu-devel] [PATCH 07/15] add option to remove scsi support quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 08/15] add option to disable wmware devices quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 09/15] ssi bus is only used on the arm platform quintela
2009-06-23 14:14 ` [Qemu-devel] [PATCH 10/15] move i2c devices only used in arm devices to arm target quintela
2009-06-23 16:20   ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 11/15] sd flash is only used in arm devices quintela
2009-06-23 16:19   ` Blue Swirl
2009-06-23 16:27     ` [Qemu-devel] " Juan Quintela
2009-06-23 16:43       ` Blue Swirl
2009-06-23 19:11     ` [Qemu-devel] " Anthony Liguori
2009-06-23 14:14 ` [Qemu-devel] [PATCH 12/15] move m48t59 and ecc driver to ppc and sparc, that are the targets that use it quintela
2009-06-23 16:20   ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 13/15] nand and ecc are only used on arm and cris argets quintela
2009-06-23 16:21   ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 14/15] enable isa_mmio only in the platforms that use it: ppc, arm, mips and sparc quintela
2009-06-23 16:21   ` Blue Swirl
2009-06-23 14:14 ` [Qemu-devel] [PATCH 15/15] add option to disable virtio drivers quintela
2009-06-23 19:09 ` [Qemu-devel] [RFC PATCH 00/15] Be able to compile out not needed options Anthony Liguori
2009-06-24 18:17   ` [Qemu-devel] " Juan Quintela
2009-06-24 18:31     ` Anthony Liguori
2009-06-29  9:45       ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.