qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu sources and makefile system


From: Vasile Catalin-B50542
Subject: Re: [Qemu-devel] qemu sources and makefile system
Date: Fri, 9 Jan 2015 10:02:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Thanks. It will be helpful in the future.
I managed to make it work. The code was included, but I forgot to register the device type on the virtio-pci bus.

static void virtio_pci_register_types(void)
{
    /* ... */
    type_register_static(&virtio_src_pci_info);
    /* ... */
}

On 07.01.2015 15:02, Stefan Hajnoczi wrote:
On Tue, Jan 06, 2015 at 11:44:34AM +0200, Catalin Vasile wrote:
I'm new to qemu-devel and I'm trying to add a ".c" source to qemu.
To be more specific, I'm trying to add a file into <qemu src>/hw/virtio/.
I've added "common-obj-y += virtio-src.o" to the Makefile.objs in that
folder
and when I'm compiling qemu it seems to compile the sources, but I don't
know
if they are added to the qemu binary.
Is there anything else left to do in order for qemu build system to include
my source file?
You could look at the link map to see which object files are included by the linker:

1. Run make V=1 to see the final gcc command-line.
2. Copy the command-line and append -Xlinker -Map=output.map
3. Now look at the output.map file

Or look at the symbol table in the binary:

$ readelf -s x86_64-softmmu/qemu-system-x86_64 | grep virtio-
   740: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-blk.c
   791: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-blk.c
   799: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-serial-bus.c
  1158: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-net.c
  1262: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-scsi.c
  1329: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-scsi-dataplane.c
  1554: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-balloon.c
  4884: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-console.c
  9308: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-rng.c
  9333: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-pci.c
  9453: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-bus.c
  9476: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS virtio-mmio.c

If you need help, please post a git URL so we can see your code.

Stefan

--

Catalin Vasile

Intern, DN-Software

Freescale Semiconductor, Inc.

www.freescale.com

phone: 073-021-1938

e-mail: address@hidden

Freescale_Logo-nosemi_Lh_4c

This e-mail, and any associated attachments have been classified as:

[ ] Public

[ ] Freescale Semiconductor Internal Use Only

[ ] Freescale Semiconductor Confidential Proprietary


reply via email to

[Prev in Thread] Current Thread [Next in Thread]