I'm attempting to re-compile a patched brcmfmac driver I have made myself. However, compilation has failed even after I have copied all the /include files into the usr/include folders.

The following compilation is done with the source itself. It does not contain any changes.

The error message is as follows:

alan@ubuntu:~/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac$ make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
make: Entering directory '/usr/src/linux-headers-4.15.0-30-generic'
  CC [M]  /home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.o
In file included from /home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:28:0:
/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:966:21: error: SDIO_DEVICE_ID_BROADCOM_43364’ undeclared here (not in a function); did you mean ‘SDIO_DEVICE_ID_BROADCOM_43362’?
./include/linux/mmc/sdio_func.h:97:31: note: in definition of macro ‘SDIO_DEVICE’
  .vendor = (vend), .device = (dev)
/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:966:3: note: in expansion of macro ‘BRCMF_SDIO_DEVICEBRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43364),
/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:1168:4: error: struct device_driver’ has no member named ‘coredump’; did you mean ‘resume’?
   .coredump = brcmf_dev_coredump,
/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:1168:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   .coredump = brcmf_dev_coredump,
/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:1168:15: note: (near initialization for ‘brcmf_sdmmc_driver.drv.p’)
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.o' failed
make[1]: *** [/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.o] Error 1
Makefile:1552: recipe for target '_module_/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac' failed
make: *** [_module_/home/alan/Desktop/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac] Error 2

Majority of the files were able to compile, this is one of the remaining few that wasn't able to.

I believe the main reason that it is unable to compile is because SDIO_DEVICE_ID_BROADCOM_43364 is not defined, which makes me wonder if I have the correct kernel source installed (repo was from https://github.com/torvalds/linux)

If anyone could identify the main reason behind the failed compilation I would be grateful.

Thank you!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.