0

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.

SAI_TEJA
  • 1
  • 1
  • Which Yocto are you working on? In latest version, it updated the override operator `_` with `:`. So `MACHINE_FEATURES:remove = "alsa"` and `DISTRO_FEATURES:remove = "alsa"` should be used. And they could be set in local.conf for development. – Kai Jan 03 '23 at 07:23
  • Still these packages exists in the license.manifest file. PACKAGE NAME: alsa-conf PACKAGE NAME: alsa-lib PACKAGE NAME: alsa-ucm-conf – SAI_TEJA Jan 05 '23 at 09:12
  • 1
    You should check which packages installed inside your image depend on alsa, and either remove such packages or each definition of the dependency one by one, you can analyze package dependencies for your image using ` bitbake -g ` and then looking at the generated task-depends.dot file – ah008a Jan 10 '23 at 07:28

1 Answers1

0

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.

Kai
  • 356
  • 1
  • 6