nikkel ブログ Wireless/English/Cryptocurrency/NFT

Cross compile of rtl8852au driver for jetson nano

Wireless

In this page, I’ll introduce how to cross compile of rtl8852au driver for jetson nano.

host computer:

Ubuntu 18.04 LTS

Jetpack installed
・Kernel cross-compiled

target board:

Jetson nano

procedure for cross compile:

git clone http://github.com/lwfinger/rtl8852au.git

Get driver source codes.

cd rtl8852au/platform/
vi jetson_nano.mk

Switch directory and make new “.mk” file to compile for jetson nano.

+ifeq ($(CONFIG_PLATFORM_JETSON_NANO), y)
+EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
+EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
+ARCH ?= arm64
+CROSS_COMPILE := $(HOME)/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
+KSRC := $(HOME)/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/source/public/build
+MODULE_NAME = wlan
+endif

Add cross compiler path and kernel source etc.
 

cd ../
vi Makefile

Modify Makefile to read “.mk” file that made before.

###################### Platform Related #######################
-CONFIG_PLATFORM_I386_PC = y
+CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_RTL8198D = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
@@ -154,6 +154,7 @@ CONFIG_PLATFORM_NV_TK1_UBUNTU = n
CONFIG_PLATFORM_ARM_SUNxI = n
CONFIG_PLATFORM_RTK1319 = n
CONFIG_PLATFORM_AML_S905 = n
+CONFIG_PLATFORM_JETSON_NANO = y

 

make

Start compilation.

Install driver

Finishing compilation, wlan.ko is generated.

Transfer wlan.ko to jetson nano with SCP or TFTP.
We can find WI-U3-1200AX2 as USB device on jetson nano.

Install wireless driver.

sudo insmod wlan.ko

wlan0 is generated.