Hi ,
  Thanks for the hints. I get better understanding to the kconfig tool now.
  I added "select  TI_DMA" in my DSP kconfig file. It is done.


best regards,
xiaolei




------------------ Original ------------------
From:&nbsp;"Philippe Mathieu-Daudé"<phi...@redhat.com&gt;;
Date:&nbsp;Fri, Jun 19, 2020 10:59 PM
To:&nbsp;"casmac"<climber....@qq.com&gt;;"qemu-devel"<qemu-devel@nongnu.org&gt;;

Subject:&nbsp;Re: how to build QEMU with the peripheral device modules



Hi,

On 6/19/20 3:24 PM, casmac wrote:
&gt; Hi All,
&gt; Â&nbsp; Â&nbsp;I am trying to add a DMA peripheral module. In hw/dma 
directory, a
&gt; fileÂ&nbsp; ti_dma.c is added.
&gt; Â&nbsp; Â&nbsp;Also, in hw/dma/kconfig, I added the following lines:
&gt; config TI_DMA
&gt; bool

You need some device that 'selects' your device.

You can select it by default:

&nbsp; config TI_DMA
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default y

You can enforce the selection on a target. For example to add it
to all the ARM machines, in default-configs/arm-softmmu.mak add:

CONFIG_TI_DMA=y

The best is to only select it when required. For example if you
need it on all machines using a TI OMAP SoC, then you'd select it
in the OMAP section of hw/arm/Kconfig:

&nbsp; config OMAP
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select FRAMEBUFFER
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select I2C
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select ECC
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select NAND
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select PFLASH_CFI01
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select SD
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select SERIAL
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select TI_DMA

You should have enough to adapt to your needs.

Regards,

Phil.

&gt; Â&nbsp; Â&nbsp;In hw/dma/makefile.ojb, added one line:
&gt; common-obj-$(CONFIG_TI_DMA) += ti_dma.o
&gt; Â&nbsp; Â&nbsp;However, ti_dma.c is not compiled as the QEMU project is 
built. Some
&gt; directories(eg. block, cpu...) under hw will be compiled though.Â&nbsp;
&gt; Â&nbsp; Â&nbsp;The makefile.obj seems to show that the DMA module would be 
built
&gt; along withÂ&nbsp; others:
&gt; devices-dirs-y = core/
&gt; ifeq ($(CONFIG_SOFTMMU), y)
&gt; devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call
&gt; land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
&gt; devices-dirs-y += acpi/
&gt; devices-dirs-y += adc/
&gt; devices-dirs-y += audio/
&gt; devices-dirs-y += block/
&gt; devices-dirs-y += bt/
&gt; devices-dirs-y += char/
&gt; devices-dirs-y += cpu/
&gt; devices-dirs-y += display/
&gt; devices-dirs-y += dma/
&gt; devices-dirs-y += gpio/
&gt; ......
&gt; Â&nbsp; Â&nbsp; I am not sure what is missing here. Any advise would be 
appreciated.
&gt; Thanks.
&gt; 
&gt; xiaolei

Reply via email to