UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor samuelnj
Visitor
1,483 Views
Registered: ‎08-21-2017

Compiling AC1200 driver for ZCU102 board

I'm attempting to have USB wifi support on my SCU102 board. I'm new to this and when I try to compile the driver found at https://github.com/abperiasamy/rtl8812AU_8821AU_linux, I get the following error:

 

make ARCH=x86_64 CROSS_COMPILE=aarch64-linux-gnu- -C /lib/modules/4.10.0-32-generic/build M=/home/user/Documents/driver/rtl8812AU_8821AU_linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-32-generic'
arch/x86/Makefile:140: CONFIG_X86_X32 enabled but no binutils support
CC [M] /home/user/Documents/driver/rtl8812AU_8821AU_linux/core/rtw_cmd.o
aarch64-linux-gnu-gcc: error: unrecognized argument in option ‘-mcmodel=kernel’
aarch64-linux-gnu-gcc: note: valid arguments to ‘-mcmodel=’ are: large small tiny
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mno-sse’; did you mean ‘-fno-dse’?
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mno-mmx’
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mno-sse2’; did you mean ‘-fno-dse’?
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mno-3dnow’
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-m64’
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mno-red-zone’; did you mean ‘-fno-regmove’?
scripts/Makefile.build:294: recipe for target '/home/sam/Documents/driver/rtl8812AU_8821AU_linux/core/rtw_cmd.o' failed
make[2]: *** [/home/user/Documents/driver/rtl8812AU_8821AU_linux/core/rtw_cmd.o] Error 1
Makefile:1524: recipe for target '_module_/home/sam/Documents/driver/rtl8812AU_8821AU_linux' failed
make[1]: *** [_module_/home/user/Documents/driver/rtl8812AU_8821AU_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-32-generic'
Makefile:1584: recipe for target 'modules' failed
make: *** [modules] Error 2

 

Not exactly sure what I'm doing wrong here or if I'm even taking the right approach. Any advice would be appreciated.

0 Kudos
2 Replies
Visitor eatnafou
Visitor
1,176 Views
Registered: ‎10-25-2017

Re: Compiling AC1200 driver for ZCU102 board

I get an almost identical error. Did you ever solve it? If so, please let us know. Thanks.

0 Kudos
Visitor samuelnj
Visitor
1,129 Views
Registered: ‎08-21-2017

Re: Compiling AC1200 driver for ZCU102 board

I did get it resolved with some modifications to the makefiles, etc.

 

I assume you're using petalinux tools for the linux image as well?

 

NOTE:

$CROSS_COMPILE=aarch64-linux-gnu-

$ARCH=arm64

 

My solution is below:

 

First, clone the git repository to obtain the files:

 

$ git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux

Now, we are going to edit some of the files to successfully cross-compile.

$ cd rtl8812AU_8821AU_linux
$ gedit core/rtw-br-ext.c

On line 25 of this file insert:

#include <net/ip6_checksum.h>

Close and save the file, then open and edit the makefile:

$ gedit Makefile

Replace line 1584 with:

$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C <petalinux-project-directory>/build/tmp/work/plnx_aarch64-xilinx-linux/linux-xlnx/4.9-xilinx-v2017.2+gitAUTOINC+5d029fdc25-r0/linux-plnx_aarch64-standard-build M=$(shell pwd)  modules

Now, compile the driver and move it to the appropriate folder for drivers on the board:

$ make
$ cd ..
$ scp -r rtl8812AU_8821AU_linux root@<IPADDRESS>:/lib/modules/4.9.0-xilinx-v2017.2/kernel/drivers/net

If the driver doesn’t compile, try commenting out line 6 (EXTRA_CFLAGS += -Werror). And set the environmental variables CFLAGS and LDFLAGS to “”. If it says the directory is missing for the kernel, run petalinux-build on your project.

0 Kudos