Bsp overrides kernel config

I tried to build a custom kernel for Rock 5b to add a custom wifi driver.

I used bsp for this task, as described in Kernel Development | Radxa Docs

I want to disable CONFIG_BCMDHD_SDIO, but each time I tried to change it, it is changed back by bsp, even when I use –no-prepare-source or –dirty. Is there some other way to disable this for my kernel build?

Best regards

Hi,

I believe the reason of failing disabling CONFIG_BCMDHD_SDIO is because of the Kconfig system. If you go to the source code and run make menuconfig. Search the configuration parameter using BCMDHD_SDIO and go to the result just given. You should see that you should always select an entry. From the source code[0], we can also see that BCMDHD_SDIO is in a choice. According to the Kconfig syntax[1], it says 'A choice only allows a single config entry to be selected.'. In addition, BCMDHD_SDIO is the default one to be selected[2], so I think that’s why you cannot disable CONFIG_BCMDHD_SDIO.

If you want to see CONFIG_BCMDHD_SDIO=n in .config during building the kernel for Rock 5B. I think you just need to add CONFIG_BCMDHD_PCIE=y to $(bsp_path)/linux/rk2410/kconfig.conf:

echo CONFIG_BCMDHD_PCIE=y >> linux/rk2410/kconfig.conf

and build the config file:

./bsp linux rk2410 -C --no-build

Then you should see:

> grep CONFIG_BCMDHD_SDIO .src/linux/.config
# CONFIG_BCMDHD_SDIO is not set
> grep CONFIG_BCMDHD_PCIE .src/linux/.config
CONFIG_BCMDHD_PCIE=y
1 Like

Thank you very much, your answer worked well and helped me a lot :slight_smile:

Then please mark my answer as solution so others can know the question has been answered :slight_smile: .

tbh I dont see an option to mark as an answer here