* [Qemu-devel] [PATCH] Compile usb_ohci only for targets that need it
@ 2009-08-25 18:16 Juan Quintela
2009-08-26 10:04 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: Juan Quintela @ 2009-08-25 18:16 UTC (permalink / raw)
To: qemu-devel
It is only needed for arm, ppc and sh4.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile.target | 2 +-
configure | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 4fdf59c..b71f214 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -175,7 +175,7 @@ QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
# USB layer
-obj-y += usb-ohci.o
+obj-$(CONFIG_USB_OHCI) += usb-ohci.o
# PCI network cards
obj-y += eepro100.o
diff --git a/configure b/configure
index 7273b1d..03010b4 100755
--- a/configure
+++ b/configure
@@ -1798,6 +1798,7 @@ esp=no
ecc_flash=no
nand=no
taddr=no
+usb_ohci=no
for target in $target_list; do
target_dir="$target"
@@ -2027,6 +2028,7 @@ if test "$target_softmmu" = "yes" ; then
ptimer=yes
ecc_flash=yes
nand=yes
+ usb_ohci=yes
;;
sparc)
ptimer=yes
@@ -2043,6 +2045,7 @@ if test "$target_softmmu" = "yes" ; then
ppc*)
m48t59=yes
escc=yes
+ usb_ohci=yes
;;
mips*)
esp=yes
@@ -2050,6 +2053,9 @@ if test "$target_softmmu" = "yes" ; then
cris)
nand=yes
;;
+ sh4)
+ usb_ohci=yes
+ ;;
esac
fi
if test "$target_user_only" = "yes" ; then
@@ -2289,6 +2295,10 @@ if test "$taddr" = "yes" ; then
echo "CONFIG_TADDR=y" >> $config_host_mak
fi
+if test "$usb_ohci" = "yes" ; then
+ echo "CONFIG_USB_OHCI=y" >> $config_host_mak
+fi
+
echo "/* Automatically generated by configure - do not modify */" > $config_host_h
/bin/sh $source_path/create_config < $config_host_mak >> $config_host_h
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] Compile usb_ohci only for targets that need it
2009-08-25 18:16 [Qemu-devel] [PATCH] Compile usb_ohci only for targets that need it Juan Quintela
@ 2009-08-26 10:04 ` Gerd Hoffmann
2009-08-26 10:13 ` [Qemu-devel] " Juan Quintela
2009-08-26 10:15 ` Juan Quintela
0 siblings, 2 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2009-08-26 10:04 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On 08/25/09 20:16, Juan Quintela wrote:
> It is only needed for arm, ppc and sh4.
Ahem. It works just fine on a pc too. And once qdev-ified you can even
add it via -device.
While it probably makes sense to not build it by default because we use
uhci for pc I certainly want to have the option to include it.
What is the long-term plan this stuff? I think it isn't useful to
hard-code all this in configure. How about having a
target-$arch/default-config file with 'CONFIG_FOO=y' lines? Also look
for (and prefer if present) a target-$arch/user-config file?
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] Compile usb_ohci only for targets that need it
2009-08-26 10:04 ` Gerd Hoffmann
@ 2009-08-26 10:13 ` Juan Quintela
2009-08-26 10:15 ` Juan Quintela
1 sibling, 0 replies; 5+ messages in thread
From: Juan Quintela @ 2009-08-26 10:13 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Gerd Hoffmann <kraxel@redhat.com> wrote:
> On 08/25/09 20:16, Juan Quintela wrote:
>> It is only needed for arm, ppc and sh4.
>
> Ahem. It works just fine on a pc too. And once qdev-ified you can
> even add it via -device.
>
> While it probably makes sense to not build it by default because we
> use uhci for pc I certainly want to have the option to include it.
>
> What is the long-term plan this stuff? I think it isn't useful to
> hard-code all this in configure. How about having a
> target-$arch/default-config file with 'CONFIG_FOO=y' lines? Also look
> for (and prefer if present) a target-$arch/user-config file?
>
> cheers,
> Gerd
Same thing complained by Anthony yesterday at irc.
Yet knew approach:
a new config-devices.mak file
with a new configuration system: vi/emacs, you select your poison
checking that the configuration is valid:
by now: you try to compile it, and if it works great, if it don't work,
that was a bad configuration.
Will let the creation of tools to a second phase.
1st one is to create a file where all devices are configured for each
target.
What do you think?
Later, Juan.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] Compile usb_ohci only for targets that need it
2009-08-26 10:04 ` Gerd Hoffmann
2009-08-26 10:13 ` [Qemu-devel] " Juan Quintela
@ 2009-08-26 10:15 ` Juan Quintela
2009-08-26 10:28 ` Gerd Hoffmann
1 sibling, 1 reply; 5+ messages in thread
From: Juan Quintela @ 2009-08-26 10:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Gerd Hoffmann <kraxel@redhat.com> wrote:
> On 08/25/09 20:16, Juan Quintela wrote:
>> It is only needed for arm, ppc and sh4.
>
> Ahem. It works just fine on a pc too. And once qdev-ified you can
> even add it via -device.
>
> While it probably makes sense to not build it by default because we
> use uhci for pc I certainly want to have the option to include it.
>
> What is the long-term plan this stuff? I think it isn't useful to
> hard-code all this in configure. How about having a
> target-$arch/default-config file with 'CONFIG_FOO=y' lines? Also look
> for (and prefer if present) a target-$arch/user-config file?
>
> cheers,
> Gerd
Same thing complained by Anthony yesterday at irc.
Yet knew approach:
a new config-devices.mak file
with a new configuration system: vi/emacs, you select your poison
checking that the configuration is valid:
by now: you try to compile it, and if it works great, if it don't work,
that was a bad configuration.
Will let the creation of tools to a second phase.
1st one is to create a file where all devices are configured for each
target.
Current thing that I am doing is similar to what you propose:
default-configs/<target_name>
<target_name>/config-devices.mak
if it don't exist, it get copied from default-configs/<target_name> one
What do you think?
Later, Juan.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] Compile usb_ohci only for targets that need it
2009-08-26 10:15 ` Juan Quintela
@ 2009-08-26 10:28 ` Gerd Hoffmann
0 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2009-08-26 10:28 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
Hi,
> default-configs/<target_name>
ok.
> <target_name>/config-devices.mak
target name == x86_64-softmmu, i.e. build tree (with separate
source/build trees)?
> if it don't exist, it get copied from default-configs/<target_name> one
configure can copy stuff for now, so you can do:
mkdir build-myconfig
cd build-myconfig
../configure --target-list=x86_64-softmmu
vi x86_64-softmmu/config-devices.mak
make
later on we can replace the 'vi' step with something more clever.
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-26 10:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 18:16 [Qemu-devel] [PATCH] Compile usb_ohci only for targets that need it Juan Quintela
2009-08-26 10:04 ` Gerd Hoffmann
2009-08-26 10:13 ` [Qemu-devel] " Juan Quintela
2009-08-26 10:15 ` Juan Quintela
2009-08-26 10:28 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).