How do in include module-combine.so and module-combine-sink.so into rootfs

I tried with the bellow recipe but it doesn’t work.
lab3@daikokunw-Server:~/YY/imx-yocto-bsp/sources/meta-dkk/recipe-multimedia/pulseaudio$ cat myrecipe/files/module-combine
module-combine-sink.so module-combine.so
lab3@daikokunw-Server:~/YY/imx-yocto-bsp/sources/meta-dkk/recipe-multimedia/pulseaudio$ cat myrecipe/myrecipe.bb
DESCRIPTION = “Copy PulseAudio modules to the image”
LICENSE = “CLOSED”
PN = “myrecipe”
PV = “0.0.1”

Specify the path to your files

FILESEXTRAPATHS_prepend := “${THISDIR}/files:”

Specify the source files to copy

SRC_URI += “file://module-combine-sink.so
file://module-combine.so”

Set the working directory

S = “${WORKDIR}”

do_install() {
# Create the target directory
install -d ${D}${libdir}/pulseaudio/modules

# Copy the .so files into the target directory
install -m 755 module-combine-sink.so ${D}${libdir}/pulseaudio/modules/
install -m 755 module-combine.so ${D}${libdir}/pulseaudio/modules/

}

Specify that these files should be included in the final package

FILES_${PN} += “${libdir}/pulseaudio/modules/*”

lab3@daikokunw-Server:~/YY/imx-yocto-bsp/sources/meta-dkk/recipe-multimedia/pulseaudio$

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It looks like you are trying to include the PulseAudio modules module-combine-sink.so and module-combine.so into your root filesystem using a Yocto recipe. Your recipe seems mostly correct, but there are a few things you might want to check or adjust:

  1. Recipe Naming and Directory Structure: Ensure that your recipe is placed in the correct directory structure and named appropriately. Typically, the recipe should be in a directory like meta-dkk/recipes-multimedia/pulseaudio/myrecipe.bb.

  2. File Paths: Verify that the files module-combine-sink.so and module-combine.so are indeed located in the files directory relative to your recipe.

  3. Dependencies: Ensure that your recipe has the necessary dependencies. If your recipe depends on PulseAudio, you might need to add a dependency on it.

  4. Bitbake Cache: Sometimes, Bitbake’s cache might cause issues. Try cleaning the cache and rebuilding.

Here is a slightly modified version of your recipe with some additional comments:

DESCRIPTION = "Copy PulseAudio modules to the image"
LICENSE = "CLOSED"
PN = "myrecipe"
PV = "0.0.1"

# Specify the path to your files
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# Specify the source files to copy
SRC_URI += "file://module-combine-sink.so \
            file://module-combine.so"

# Set the working directory
S = "${WORKDIR}"

do_install() {
    # Create the target directory
    install -d ${D}${libdir}/pulseaudio/modules

    # Copy the .so files into the target directory
    install -m 755 ${WORKDIR}/module-combine-sink.so ${D}${libdir}/pulseaudio/modules/
    install -m 755 ${WORKDIR}/module-combine.so ${D}${libdir}/pulseaudio/modules/
}

# Specify that these files should be included in the final package
FILES_${PN} += "${libdir}/pulseaudio/modules/*"

Additional Steps to Troubleshoot:

  1. Check File Existence: Ensure the files exist in the files directory:

    ls ~/YY/imx-yocto-bsp/sources/meta-dkk/recipes-multimedia/pulseaudio/myrecipe/files/
    
  2. Clean and Rebuild: Clean the recipe and rebuild it:

    bitbake -c clean myrecipe
    bitbake myrecipe
    
  3. Inspect the Image: After building, inspect the image to ensure the files are included:

    find tmp/deploy/images/ -name "module-combine*.so"
    
  4. Dependencies: If your recipe depends on PulseAudio, add the dependency:

    DEPENDS += "pulseaudio"
    

If you follow these steps and ensure everything is correctly set up, your PulseAudio modules should be included in the root filesystem. If you still encounter issues, please provide more details about the error messages or behavior you are observing.

Please, also check if these links can help you solve your problem:

Recipe editing/modification in Yocto build system.