AnsweredAssumed Answered

Adding rtl8812au driver support

Question asked by Saseendranath VS on Oct 16, 2017
Latest reply on Jan 2, 2018 by Schorschi Decker

Hi,

 

Is it possible to add an extra driver support to linux kernel using bitbake?

Is there any patch for this? If not, how could I add the support for a particular driver module?

 

I want to add the driver support for rtl8812au  in my kernel. I have to add the source files, then I have to enable it in config, and all. I tried to manually cross compile the module by setting the cross compile path and kernel source directory. But it failed.

 

I got the source code for driver from :  https://github.com/abperiasamy/rtl8812AU_8821AU_linux/archive/master.zip

I changed the Makefile like this ;

CONFIG_PLATFORM_ARM_RPI = y

 

ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH ?= arm
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /media/IMXwayland/bin/fsl-release-bsp/build/tmp/work-shared/imx6qsabreauto/kernel-source #/lib/modules/$(KVER)/build
MODDESTDIR := /media/IMXwayland/bin/fsl-release-bsp/build/tmp/work-shared/imx6qsabreauto/kernel-source/drivers/net/wireless/#/lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif

 

But I got error like this :

make


make ARCH=arm CROSS_COMPILE=arm-poky-linux-gnueabi- -C /media/IMXwayland/bin/fsl-release-bsp/build/tmp/work-shared/imx6qsabreauto/kernel-source M=/home/saseendranath.sasi/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master modules
make[1]: Entering directory 'IMXwayland/bin/fsl-release-bsp/build/tmp/work-shared/imx6qsabreauto/kernel-source'

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

CC [M] /home/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master/core/rtw_cmd.o
cc1: fatal error: ./include/linux/kconfig.h: No such file or directory
compilation terminated.
scripts/Makefile.build:258: recipe for target '/home/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master/core/rtw_cmd.o' failed
make[2]: *** [/home/saseendranath.sasi/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master/core/rtw_cmd.o] Error 1
Makefile:1384: recipe for target '_module_/home/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master' failed
make[1]: *** [_module_/home/Downloads/ArcherT4U/Archer_T4U_V1_150821/rtl8812AU_8821AU_linux-master] Error 2
make[1]: Leaving directory '/media/IMXwayland/bin/fsl-release-bsp/build/tmp/work-shared/imx6qsabreauto/kernel-source'
Makefile:1584: recipe for target 'modules' failed
make: *** [modules] Error 2

 

Is this the proper way to add the driver support ? Kindly guide me.

Outcomes