Message ID | 20250530070151.537124-1-v-singh1@ti.com |
---|---|
State | New |
Headers | show |
Series | [V3] Add rpmsg DMA library and simple DSP offload example | expand |
On 5/30/25 2:01 AM, Vishnu Singh via lists.yoctoproject.org wrote: > From: Vishnu Singh <v-singh1@ti.com> > > 1. rpmsg DMA library (meta-ti-bsp/recipes-ti/ipc): > based on rpmsg & DMA Heap buffers. this includes librpmsg_dma.so shared library > which provides apis for API should be capitalized. Same for DMA, Linux, and the first letter of sentences.. > 1. rpmsg interface initialization > 2. rpmsg based recv/send api for communication > 3. dma heap buffer management > 4. DSP firmware synamin load/unload synamin? > > 2. rpmsg DMA offload example (meta-ti-extras/recipes-ti/ipc): > provides example foraudio offloading to DSP from linux using > ti-rpmsg-dma library. Alsove provide Ethernet based control Alsove? Please run spell check. > utility (host). > > Signed-off-by: Vishnu Singh <v-singh1@ti.com> > --- > .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb | 25 +++++++++++++++++ > .../ipc/ti-librpmsg-dma-example_1.0.bb | 27 +++++++++++++++++++ > 2 files changed, 52 insertions(+) > create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb > create mode 100644 meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb > > diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb > new file mode 100644 > index 00000000..0461ac46 > --- /dev/null > +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb > @@ -0,0 +1,25 @@ > +SUMMARY = "RPMsg DMA shared library" > +LICENSE = "MIT" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" > + > +SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" > +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" > + > +S = "${WORKDIR}/git" > + > +DEPENDS = "ti-rpmsg-char" > + > +EXTRA_OEMAKE = "lib" > +do_compile() { > + oe_runmake ${EXTRA_OEMAKE} > +} > + > +do_install() { > + install -d ${D}${libdir} > + install -m 0755 lib/librpmsg_dma.so.1.0 ${D}${libdir}/ > + ln -sf librpmsg_dma.so.1.0 ${D}${libdir}/librpmsg_dma.so.1 > + ln -sf librpmsg_dma.so.1 ${D}${libdir}/librpmsg_dma.so This is messy, why should we handle basic installation tasks here in the Yocto recipe? This should be done by the project's build system. Since this is your project you should go fix that. Otherwise someone will have to deal with adding these steps manually like this to every distro system that wants to use this project. I'd recommend just having CMake do this for you. > + > + install -d ${D}${includedir}/rpmsg_dma > + install -m 0644 include/*.h ${D}${includedir}/rpmsg_dma/ > +} > diff --git a/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb > new file mode 100644 > index 00000000..0806cccd > --- /dev/null > +++ b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb The example can/should just build as part of the library build, these come from the same source / project. One recipe can make more than one package. The -example package can be made as part of the above recipe. PACKAGES =+ "${PN}-examples" FILES:${PN}-examples += "${bindir}/rpmsg_audio_offload_example" Andrew > @@ -0,0 +1,27 @@ > +SUMMARY = "Audio Offload Example using RPMsg DMA" > +LICENSE = "MIT" > +LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" > + > +SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" > +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" > + > +S = "${WORKDIR}/git" > + > +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib" > + > +do_compile() { > + oe_runmake -C example/audio_offload > +} > + > +do_install() { > + install -d ${D}${bindir} > + install -m 0755 example/audio_offload/bin/rpmsg_audio_offload_example ${D}${bindir}/ > + > + install -d ${D}${sysconfdir} > + install -d ${D}/opt > + install -m 0644 example/audio_offload/config/dsp_offload.cfg ${D}${sysconfdir}/dsp_offload.cfg > + install -m 0644 example/audio_offload/audio_sample/sample_audio.wav ${D}/opt/sample_audio.wav > +} > + > +FILES:${PN} += "${sysconfdir}/dsp_offload.cfg" > +FILES:${PN} += "/opt/sample_audio.wav" > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#18614): https://lists.yoctoproject.org/g/meta-ti/message/18614 > Mute This Topic: https://lists.yoctoproject.org/mt/113375625/3619733 > Group Owner: meta-ti+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 31/05/25 01:42, Andrew Davis wrote: > On 5/30/25 2:01 AM, Vishnu Singh via lists.yoctoproject.org wrote: >> From: Vishnu Singh <v-singh1@ti.com> >> >> 1. rpmsg DMA library (meta-ti-bsp/recipes-ti/ipc): >> based on rpmsg & DMA Heap buffers. this includes librpmsg_dma.so >> shared library >> which provides apis for > > API should be capitalized. Same for DMA, Linux, and the first letter > of sentences.. > All will be corrected in next vesrion >> 1. rpmsg interface initialization >> 2. rpmsg based recv/send api for communication >> 3. dma heap buffer management >> 4. DSP firmware synamin load/unload > > synamin? dynamic, wil correct in next version > >> >> 2. rpmsg DMA offload example (meta-ti-extras/recipes-ti/ipc): >> provides example foraudio offloading to DSP from linux using >> ti-rpmsg-dma library. Alsove provide Ethernet based control > > Alsove? Please run spell check. > ok >> utility (host). >> >> Signed-off-by: Vishnu Singh <v-singh1@ti.com> >> --- >> .../recipes-ti/ipc/ti-librpmsg-dma_1.0.bb | 25 +++++++++++++++++ >> .../ipc/ti-librpmsg-dma-example_1.0.bb | 27 +++++++++++++++++++ >> 2 files changed, 52 insertions(+) >> create mode 100644 meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb >> create mode 100644 >> meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb >> >> diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb >> b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb >> new file mode 100644 >> index 00000000..0461ac46 >> --- /dev/null >> +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb >> @@ -0,0 +1,25 @@ >> +SUMMARY = "RPMsg DMA shared library" >> +LICENSE = "MIT" >> +LIC_FILES_CHKSUM = >> "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" >> + >> +SRC_URI = >> "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" >> +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" >> + >> +S = "${WORKDIR}/git" >> + >> +DEPENDS = "ti-rpmsg-char" >> + >> +EXTRA_OEMAKE = "lib" >> +do_compile() { >> + oe_runmake ${EXTRA_OEMAKE} >> +} >> + >> +do_install() { >> + install -d ${D}${libdir} >> + install -m 0755 lib/librpmsg_dma.so.1.0 ${D}${libdir}/ >> + ln -sf librpmsg_dma.so.1.0 ${D}${libdir}/librpmsg_dma.so.1 >> + ln -sf librpmsg_dma.so.1 ${D}${libdir}/librpmsg_dma.so > > This is messy, why should we handle basic installation tasks here > in the Yocto recipe? This should be done by the project's build system. > Since this is your project you should go fix that. Otherwise someone will > have to deal with adding these steps manually like this to every distro > system that wants to use this project. > > I'd recommend just having CMake do this for you. Changed to cmake based, will push in next version > >> + >> + install -d ${D}${includedir}/rpmsg_dma >> + install -m 0644 include/*.h ${D}${includedir}/rpmsg_dma/ >> +} >> diff --git >> a/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb >> b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb >> new file mode 100644 >> index 00000000..0806cccd >> --- /dev/null >> +++ b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb > > The example can/should just build as part of the library build, these > come from the same source / project. One recipe can make more than > one package. The -example package can be made as part of the above > recipe. > > PACKAGES =+ "${PN}-examples" > FILES:${PN}-examples += "${bindir}/rpmsg_audio_offload_example" > > Andrew > 2 recipes are created for below reasons: 1st recipe will provide rpmsg-dma library which can be used for any project which has rpmsg bases IPC, this recipe only depends on rpmsg_char 2nd recipe will be product specific examples, may not be common, also issues here is that example depends upon fftw3 packages which comes part of oe-core. Currently we are discussing where we should keep this recipe so that meta-ti layer will not have any dependency on oe-core. what you suggest where to keep this recipe. Once we decided where to keep then i will post next version with all your comments addressed. >> @@ -0,0 +1,27 @@ >> +SUMMARY = "Audio Offload Example using RPMsg DMA" >> +LICENSE = "MIT" >> +LIC_FILES_CHKSUM = >> "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" >> + >> +SRC_URI = >> "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" >> +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" >> + >> +S = "${WORKDIR}/git" >> + >> +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib" >> + >> +do_compile() { >> + oe_runmake -C example/audio_offload >> +} >> + >> +do_install() { >> + install -d ${D}${bindir} >> + install -m 0755 >> example/audio_offload/bin/rpmsg_audio_offload_example ${D}${bindir}/ >> + >> + install -d ${D}${sysconfdir} >> + install -d ${D}/opt >> + install -m 0644 example/audio_offload/config/dsp_offload.cfg >> ${D}${sysconfdir}/dsp_offload.cfg >> + install -m 0644 >> example/audio_offload/audio_sample/sample_audio.wav >> ${D}/opt/sample_audio.wav >> +} >> + >> +FILES:${PN} += "${sysconfdir}/dsp_offload.cfg" >> +FILES:${PN} += "/opt/sample_audio.wav" >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#18614): >> https://lists.yoctoproject.org/g/meta-ti/message/18614 >> Mute This Topic: https://lists.yoctoproject.org/mt/113375625/3619733 >> Group Owner: meta-ti+owner@lists.yoctoproject.org >> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com] >> -=-=-=-=-=-=-=-=-=-=-=- >>
diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb new file mode 100644 index 00000000..0461ac46 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-librpmsg-dma_1.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "RPMsg DMA shared library" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" + +SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" + +S = "${WORKDIR}/git" + +DEPENDS = "ti-rpmsg-char" + +EXTRA_OEMAKE = "lib" +do_compile() { + oe_runmake ${EXTRA_OEMAKE} +} + +do_install() { + install -d ${D}${libdir} + install -m 0755 lib/librpmsg_dma.so.1.0 ${D}${libdir}/ + ln -sf librpmsg_dma.so.1.0 ${D}${libdir}/librpmsg_dma.so.1 + ln -sf librpmsg_dma.so.1 ${D}${libdir}/librpmsg_dma.so + + install -d ${D}${includedir}/rpmsg_dma + install -m 0644 include/*.h ${D}${includedir}/rpmsg_dma/ +} diff --git a/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb new file mode 100644 index 00000000..0806cccd --- /dev/null +++ b/meta-ti-extras/recipes-ti/ipc/ti-librpmsg-dma-example_1.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "Audio Offload Example using RPMsg DMA" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=744e63d2bb8c6151dcdd97f49aa02c53" + +SRC_URI = "git://github.com/TexasInstruments/rpmsg-dma.git;protocol=https;branch=main" +SRCREV = "cd18ced927aa2b916708d611758caab25a795feb" + +S = "${WORKDIR}/git" + +DEPENDS = "ti-librpmsg-dma fftw libsndfile1 alsa-lib" + +do_compile() { + oe_runmake -C example/audio_offload +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 example/audio_offload/bin/rpmsg_audio_offload_example ${D}${bindir}/ + + install -d ${D}${sysconfdir} + install -d ${D}/opt + install -m 0644 example/audio_offload/config/dsp_offload.cfg ${D}${sysconfdir}/dsp_offload.cfg + install -m 0644 example/audio_offload/audio_sample/sample_audio.wav ${D}/opt/sample_audio.wav +} + +FILES:${PN} += "${sysconfdir}/dsp_offload.cfg" +FILES:${PN} += "/opt/sample_audio.wav"