Skip to main content
Hsn
Associate II
September 15, 2020
Question

How to disable bluetooth and USB-OTG in yocto distribution?

  • September 15, 2020
  • 1 reply
  • 1869 views

I would like to disable bluetooth & USB-OTG from the distribution package. I have removed Usbgadget,usbip, bluetooth,bluez5 from the distribution and also try to remove it from the local.conf file by using PACKAGE_EXCLUDE ="" but somehow its still built in the image.

I have tried to search all the packages inlcuded in my image using this command

 bitbake -g image_name && cat pn-buildlist | grep -ve "native" | sort | uniq

and some of the packages which i excluded in the local.conf file is still there. One of the package is "linux-firmware-bluetooth-bcm4343". This package is coming from the machine. can i remove it somehow using local.conf?

I have also tried it using bitbake menuconfig..

after all the configurations i generatedthe fragment.cfg with.

bitbake -c diffconfig virtual/kernel

Then i make a .bbappend file in recipes-kernel/linux directory and bitbake my image.

Now the problem is that all the configuration which i did is reset to the default everytime for some reason. how can i make the configuration permanent ?

This topic has been closed for replies.

1 reply

Christophe Guibout
ST Employee
September 29, 2020

Hi @Hsn​ ,

The best way to customize Yocto distribution at this level is to create your own machine.

In layers/meta-st/meta-st-stm32mp/conf/machine, you will find two machines :

  • stm32mp1-eval.conf : doesn't have bluetooth/wifi
  • stm32mp1-disco.conf : has bluetooth/wifi

Bluetooth is easily configurable through MACHINE_FEATURES variables.

So, in your case, the following lines have to be commented:

#MACHINE_FEATURES += "bluetooth"
#BLUETOOTH_LIST += "linux-firmware-bluetooth-bcm4343"

Then, inside the layer which contains your machine, you can also add a recipe which contains the .bbappend of your kernel.

BR,

Christophe

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.