Linux RTL8821CE(wifi)驱动程序安装问题:KBUILD_MODNAME

Linux RTL8821CE(wifi)驱动程序安装问题:KBUILD_MODNAME,linux,makefile,cross-compiling,Linux,Makefile,Cross Compiling,我为运行Linux Mint 19的新HP 17z笔记本电脑下载了以下驱动程序: 根据指令修改makefile后,我运行了“make”命令,并出现以下错误: z 问题文件是rtw_br_ext.c,它使用来自Linux内核的头文件。因此,makefile中没有KBUILD标志。解决此问题的最佳方法是什么?请勿更改make文件。 在不进行更改的情况下,运行该文件,它将正常运行。 在该Github url上,没有更改make文件的说明 ermacroyd@DALEK:~/Downloads/rtl8

我为运行Linux Mint 19的新HP 17z笔记本电脑下载了以下驱动程序:

根据指令修改makefile后,我运行了“make”命令,并出现以下错误:

z


问题文件是rtw_br_ext.c,它使用来自Linux内核的头文件。因此,makefile中没有KBUILD标志。解决此问题的最佳方法是什么?

请勿更改make文件。 在不进行更改的情况下,运行该文件,它将正常运行。 在该Github url上,没有更改make文件的说明

ermacroyd@DALEK:~/Downloads/rtl8821ce$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-20-generic/build M=/home/zermacroyd/Downloads/rtl8821ce  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_cmd.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_security.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_debug.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_io.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_ioctl_query.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_ioctl_set.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_ieee80211.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_mlme.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_mlme_ext.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_mi.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_wlan_util.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_vht.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_pwrctrl.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_rf.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_recv.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_sta_mgt.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_ap.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_xmit.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_p2p.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_tdls.o
  CC [M]  /home/zermacroyd/Downloads/rtl8821ce/core/rtw_br_ext.o
In file included from ./include/linux/printk.h:350:0,
                 from ./include/linux/kernel.h:14,
                 from ./include/linux/skbuff.h:17,
                 from ./include/linux/if_arp.h:26,
                 from /home/zermacroyd/Downloads/rtl8821ce/core/rtw_br_ext.c:23:
./include/net/inet_connection_sock.h: In function ‘inet_csk_clear_xmit_timer’:
./include/linux/dynamic_debug.h:77:14: error: ‘KBUILD_MODNAME’ undeclared (first use in this function); did you mean ‘KBUILD_BASENAME’?
   .modname = KBUILD_MODNAME,   \
              ^
./include/linux/dynamic_debug.h:99:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA_KEY’
  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:125:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/printk.h:354:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~
./include/net/inet_connection_sock.h:216:3: note: in expansion of macro ‘pr_debug’
   pr_debug("%s", inet_csk_timer_bug_msg);
   ^~~~~~~~
./include/linux/dynamic_debug.h:77:14: note: each undeclared identifier is reported only once for each function it appears in
   .modname = KBUILD_MODNAME,   \
              ^
./include/linux/dynamic_debug.h:99:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA_KEY’
  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:125:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/printk.h:354:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~
./include/net/inet_connection_sock.h:216:3: note: in expansion of macro ‘pr_debug’
   pr_debug("%s", inet_csk_timer_bug_msg);
   ^~~~~~~~
./include/net/inet_connection_sock.h: In function ‘inet_csk_reset_xmit_timer’:
./include/linux/dynamic_debug.h:77:14: error: ‘KBUILD_MODNAME’ undeclared (first use in this function); did you mean ‘KBUILD_BASENAME’?
   .modname = KBUILD_MODNAME,   \
              ^
./include/linux/dynamic_debug.h:99:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA_KEY’
  DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, .key.dd_key_false, \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:125:2: note: in expansion of macro ‘DEFINE_DYNAMIC_DEBUG_METADATA’
  DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/printk.h:354:2: note: in expansion of macro ‘dynamic_pr_debug’
  dynamic_pr_debug(fmt, ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~
./include/net/inet_connection_sock.h:232:3: note: in expansion of macro ‘pr_debug’
   pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
   ^~~~~~~~
scripts/Makefile.build:332: recipe for target '/home/zermacroyd/Downloads/rtl8821ce/core/rtw_br_ext.o' failed
make[2]: *** [/home/zermacroyd/Downloads/rtl8821ce/core/rtw_br_ext.o] Error 1
Makefile:1552: recipe for target '_module_/home/zermacroyd/Downloads/rtl8821ce' failed
make[1]: *** [_module_/home/zermacroyd/Downloads/rtl8821ce] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:1897: recipe for target 'modules' failed
make: *** [modules] Error 2