Remove the package alsa from the Yocto Build

797 views Asked by At

My requirement -- was to Remove the package alsa from the Yocto Build. So

I just tried to Remove the ALSA Packages from the Yocto Build.

I followed same procedure as you stated 

  1. MACHINE_FEATURES_remove = "alsa" on your machine.conf

  2. poky.conf, used DISTRO_FEATURES_remove = "alsa". 

But it removed some of the alsa packages in rootfs looks good, these alsa-lib, alsa-conf still exists in the tmp/deploy/licenses/machine/licence.manifest file

Can any one suggest me the way to Remove that from Yocto Build.

1

There are 1 answers

0
Kai On

As @ah008a said, you could check the dependencies for your image such as core-image-sato with cmd bitbake -g core-image-sato. Then check the file task-depends.dot.

The other way is to check the dependency by starting the image. Append following to local.conf:

EXTRA_IMAGE_FEATURES += "package-management"

then build and start the image. Check alsa related packages and try to remove them:

root@qemumips:~# rpm -qa | grep alsa |xargs rpm -e --test                            
error: Failed dependencies:                                                                                                                                                 
        alsa-ucm-conf is needed by (installed) libasound2-1.2.8-r0.mips32r2                                                                                                 
        alsa-conf is needed by (installed) libasound2-1.2.8-r0.mips32r2               
        pulseaudio-module-alsa-card is needed by (installed) pulseaudio-server-16.1-r0.mips32r2                                                                             
        pulseaudio-module-alsa-sink is needed by (installed) pulseaudio-server-16.1-r0.mips32r2                                                                             
        pulseaudio-module-alsa-source is needed by (installed) pulseaudio-server-16.1-r0.mips32r2                                                                           
        alsa-plugins-pulseaudio-conf is needed by (installed) pulseaudio-server-16.1-r0.mips32r2 

Then try to remove the dependencies recursively such as:

root@qemumips:~# rpm -e --test libasound2

Finally find that

pulseaudio-server is needed by (installed) packagegroup-core-x11-sato-base-1.0-r33.qemumips

Check the recipe meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb and distro feature pulseaudio should be removed too. So set in local.conf:

MACHINE_FEATURES:remove = 'alsa'
DISTRO_FEATURES:remove = 'alsa pulseaudio'

Then there is no alsa related packages installed to the image core-image-sato.