I have downloaded the linux driver from the TP-Link website. I am trying to follow the Ubuntu instuctions, but *(https://static.tp-link.com/2018/201812/20181207/Installation%20Guide%20for%20Linux.pdf):
linux-17qf:/home/bigb/Driver # make clean
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
linux-17qf:/home/bigb/Driver # make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.12.14-lp151.28.20-default/build M=/home/bigb/Driver modules
make[1]: Entering directory '/usr/src/linux-4.12.14-lp151.28.20-obj/x86_64/default'
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
CC [M] /home/bigb/Driver/core/rtw_cmd.o
In file included from /home/bigb/Driver/include/drv_types.h:32:0,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/home/bigb/Driver/include/osdep_service.h: In function ‘thread_enter’:
/home/bigb/Driver/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? -Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^~~~~~~~~~~~
do_signal
/home/bigb/Driver/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/bigb/Driver/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? -Werror=implicit-function-declaration]
if (signal_pending (current))
^~~~~~~~~~~~~~
timer_pending
/home/bigb/Driver/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? -Werror=implicit-function-declaration]
flush_signals(current);
^~~~~~~~~~~~~
do_signal
In file included from /home/bigb/Driver/include/drv_types.h:35:0,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/home/bigb/Driver/include/wifi.h: At top level:
/home/bigb/Driver/include/wifi.h:994:0: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
#define IEEE80211_MAX_AMPDU_BUF 0x40
In file included from /usr/src/linux-4.12.14-lp151.28.20/include/net/cfg80211.h:24:0,
from /home/bigb/Driver/include/osdep_service_linux.h:81,
from /home/bigb/Driver/include/osdep_service.h:41,
from /home/bigb/Driver/include/drv_types.h:32,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/usr/src/linux-4.12.14-lp151.28.20/include/linux/ieee80211.h:1442:0: note: this is the location of the previous definition
#define IEEE80211_MAX_AMPDU_BUF 0x100
In file included from /home/bigb/Driver/include/drv_types.h:95:0,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/home/bigb/Driver/include/hal_com.h:413:13: error: ‘file_path’ redeclared as different kind of symbol
extern char file_path[PATH_LENGTH_MAX];
^~~~~~~~~
In file included from /usr/src/linux-4.12.14-lp151.28.20/include/linux/compat.h:17:0,
from /usr/src/linux-4.12.14-lp151.28.20/include/linux/ethtool.h:16,
from /usr/src/linux-4.12.14-lp151.28.20/include/linux/netdevice.h:41,
from /home/bigb/Driver/include/osdep_service_linux.h:35,
from /home/bigb/Driver/include/osdep_service.h:41,
from /home/bigb/Driver/include/drv_types.h:32,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/usr/src/linux-4.12.14-lp151.28.20/include/linux/fs.h:2812:14: note: previous declaration of ‘file_path’ was here
extern char *file_path(struct file *, char *, int);
^~~~~~~~~
In file included from /home/bigb/Driver/include/drv_types.h:65:0,
from /home/bigb/Driver/core/rtw_cmd.c:22:
/home/bigb/Driver/core/rtw_cmd.c: In function ‘btinfo_evt_dump’:
/home/bigb/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
#define _seqdump seq_printf
^
/home/bigb/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
^~~~~~~~
/home/bigb/Driver/core/rtw_cmd.c:3293:2: note: in expansion of macro ‘DBG_871X_SEL_NL’
DBG_871X_SEL_NL(sel, "cid:0x%02x, len:%u
", info->cid, info->len);
^~~~~~~~~~~~~~~
/home/bigb/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
#define _seqdump seq_printf
^
/home/bigb/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
^~~~~~~~
/home/bigb/Driver/core/rtw_cmd.c:3296:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
DBG_871X_SEL_NL(sel, "byte2:%s%s%s%s%s%s%s%s
"
^~~~~~~~~~~~~~~
/home/bigb/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
#define _seqdump seq_printf
^
/home/bigb/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
^~~~~~~~
/home/bigb/Driver/core/rtw_cmd.c:3308:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
DBG_871X_SEL_NL(sel, "retry_cnt:%u
", info->retry_cnt);
^~~~~~~~~~~~~~~
/home/bigb/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
#define _seqdump seq_printf
^
/home/bigb/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
^~~~~~~~
/home/bigb/Driver/core/rtw_cmd.c:3311:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
DBG_871X_SEL_NL(sel, "rssi:%u
", info->rssi);
^~~~~~~~~~~~~~~
/home/bigb/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
#define _seqdump seq_printf
^
/home/bigb/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
^~~~~~~~
/home/bigb/Driver/core/rtw_cmd.c:3314:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
DBG_871X_SEL_NL(sel, "byte5:%s%s
"
^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-4.12.14-lp151.28.20/scripts/Makefile.build:325: /home/bigb/Driver/core/rtw_cmd.o] Error 1
make[3]: *** [/usr/src/linux-4.12.14-lp151.28.20/Makefile:1569: _module_/home/bigb/Driver] Error 2
make[2]: *** [Makefile:152: sub-make] Error 2
make[1]: *** [Makefile:24: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.12.14-lp151.28.20-obj/x86_64/default'
make: *** [Makefile:1696: modules] Error 2
An older version of the installation instrucionts gave me further hints. Do I need to change anything on the makefile?
Compile and install the Driver
- Access the directory of driver.
- Before compile, make sure the parameters in “makefile.c” is suitable for your
compile environment of your Linux system.
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
Explanation:
· KSRC is used to specify the kernel source path for driver compilation.
· CROSS_COMPILE is used to specify the toolchain.
· ARCH is used to specify the target platform’s CPU architectures such as arm, mips,
i386 and so on.
3. Type “sudo make” to compile the driver file.
4. Type “sudo make install” to install the driver file.