Am 19.11.2010 17:30, schrieb jes.soren...@redhat.com: > From: Jes Sorensen <jes.soren...@redhat.com> > > Signed-off-by: Jes Sorensen <jes.soren...@redhat.com>
You're compiling the nbd block driver out here. This is certainly not what you were attempting. (However, it's the only way to make it work, because otherwise qemu-img will need the top-level nbd.o) qemu-img -help before this change shows: Supported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 parallels nbd blkdebug sheepdog blkverify host_cdrom host_floppy host_device file tftp ftps ftp https http Afterwards: Supported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 parallels blkdebug sheepdog blkverify host_cdrom host_floppy host_device file tftp ftps ftp https http Kevin > --- > Makefile | 2 +- > Makefile.objs | 12 ++++++++++-- > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 747e47c..a503c1c 100644 > --- a/Makefile > +++ b/Makefile > @@ -154,7 +154,7 @@ qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: > $(GENERATED_HEADERS) > > qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(oslib-obj-y) > $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) > qemu-timer-common.o > > -qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) > $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) > qemu-timer-common.o > +qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) > $(trace-obj-y) $(block-obj-y) $(nbd-obj-y) $(qobject-obj-y) $(version-obj-y) > qemu-timer-common.o > > qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) > $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) > qemu-timer-common.o > > diff --git a/Makefile.objs b/Makefile.objs > index 23b17ce..5120e88 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -14,13 +14,13 @@ oslib-obj-$(CONFIG_POSIX) += oslib-posix.o > # 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 += nbd.o block.o aio.o aes.o qemu-config.o > +block-obj-y += block.o aio.o aes.o qemu-config.o > block-obj-$(CONFIG_POSIX) += posix-aio-compat.o > block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o > > block-nested-y += raw.o cow.o qcow.o vdi.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 blkdebug.o sheepdog.o blkverify.o > +block-nested-y += parallels.o blkdebug.o sheepdog.o blkverify.o > block-nested-$(CONFIG_WIN32) += raw-win32.o > block-nested-$(CONFIG_POSIX) += raw-posix.o > block-nested-$(CONFIG_CURL) += curl.o > @@ -45,6 +45,13 @@ net-obj-y += $(addprefix net/, $(net-nested-y)) > fsdev-nested-$(CONFIG_VIRTFS) = qemu-fsdev.o > fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y)) > > +####################################################################### > +# nbd-obj-y is code used by both qemu and qemu-nbd > + > +nbd-obj-y = nbd.o > +nbd-nested-y = nbd.o > +nbd-obj-y += $(addprefix block/, $(nbd-nested-y)) > + > ###################################################################### > # libqemu_common.a: Target independent part of system emulation. The > # long term path is to suppress *all* target specific code in case of > @@ -53,6 +60,7 @@ fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, > $(fsdev-nested-y)) > > common-obj-y = $(block-obj-y) blockdev.o > common-obj-y += $(net-obj-y) > +common-obj-y += $(nbd-obj-y) > common-obj-y += $(qobject-obj-y) > common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX)) > common-obj-y += readline.o console.o cursor.o async.o qemu-error.o