Skip to content

How to compile for ARM (raspberry) - only USB part #17

@nikallian

Description

@nikallian

Hi,

I tried to compile for ARM (raspbeerry pi 3+ latest kernel) but the first attempt ended with an error

/root/rtw88-usb/rtw8822be.c:27:1: warning: data definition has no type or storage class
 module_pci_driver(rtw_8822be_driver);
 ^~~~~~~~~~~~~~~~~
/root/rtw88-usb/rtw8822be.c:27:1: error: type defaults to ‘int’ in declaration of ‘module_pci_driver’ [-Werror=implicit-int]
/root/rtw88-usb/rtw8822be.c:27:1: warning: parameter names (without types) in function declaration
/root/rtw88-usb/rtw8822be.c:19:26: warning: ‘rtw_8822be_driver’ defined but not used [-Wunused-variable]
 static struct pci_driver rtw_8822be_driver = {
                          ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

When I removed all the references to pci and all other drivers except the one I am interested to (8822bu) the compilation almost completed but this time another error occured

make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7+'
  CC [M]  /root/rtw88-usb/main.o
  CC [M]  /root/rtw88-usb/mac80211.o
  CC [M]  /root/rtw88-usb/util.o
  CC [M]  /root/rtw88-usb/debug.o
  CC [M]  /root/rtw88-usb/tx.o
  CC [M]  /root/rtw88-usb/rx.o
  CC [M]  /root/rtw88-usb/mac.o
  CC [M]  /root/rtw88-usb/phy.o
  CC [M]  /root/rtw88-usb/coex.o
  CC [M]  /root/rtw88-usb/efuse.o
  CC [M]  /root/rtw88-usb/fw.o
  CC [M]  /root/rtw88-usb/ps.o
  CC [M]  /root/rtw88-usb/sec.o
  CC [M]  /root/rtw88-usb/bf.o
  CC [M]  /root/rtw88-usb/wow.o
  CC [M]  /root/rtw88-usb/regd.o
  CC [M]  /root/rtw88-usb/rtw8822bu.o
  CC [M]  /root/rtw88-usb/usb.o
  LD [M]  /root/rtw88-usb/rtw88_core.o
  LD [M]  /root/rtw88-usb/rtw88_8822bu.o
  LD [M]  /root/rtw88-usb/rtw88_usb.o
  MODPOST /root/rtw88-usb/Module.symvers
ERROR: modpost: "rtw8822b_hw_spec" [/root/rtw88-usb/rtw88_8822bu.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /root/rtw88-usb/Module.symvers] Error 1
make[2]: *** Deleting file '/root/rtw88-usb/Module.symvers'
make[1]: *** [Makefile:1708: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7+'
make: *** [Makefile:51: all] Error 2

Any help on how to proceed ?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions