Wifi bring up for Nvidia Nano B01 board

Hello ,

I have built WIFI backports driver modules for Jetson Nano B01 platform. Below are the packages and versions used for the build:
Linux Driver Package -32.7.3
JetPack - 4.6.3
Kernel version - 4.9.299 tegra
Infineon wifi backport package- v5.15.58-backports

The 4 .ko files -compat.ko,brcmutil.ko,brcmfmac.ko and cfg80211.ko are generated after building Wifi backports for Nvidia latest kernel 4.9.

Dts file for wifi-fmac is copied to the below path in the nano kernel-source and also in the Makefile. Also I have copied the dts file to the overlays path also.

The screenshots for the Makefile and the path are shown below :

/home/eng/Documents/NvidiaNano/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts

/home/eng/Documents/NvidiaNano/Linux_for_Tegra/source/public/hardware/nvidia/platform/tegra/common/kernel-dts/overlays

tegra210-p3448-0000-p3449-0000-b00-cypress-btwifi-fmac.dts (323.5 KB)

I wanted to know whether the dts file attached for btwifi fmac is fine (it will work) or any changes need to be done for Jetson Nano B01 board.


Then ,I did the steps for kernel compilation and generation of boot Images as mentioned below :

  1. The paths for the toolchain and kernel output directory are set for Jetson Nano Linux kernel as mentioned below :
  • export TEGRA_KERNEL_OUT=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export ARCH=arm64
  • export LOCALVERSION=“-tegra”

2.Cleaning the kernel for a clean build and Jetson nano configuration is made as the default configuration in kernel, which is tegra_defconfig as shown in the below commands :

  • make distclean
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” tegra_defconfig
  1. The kernel is configured with respect to WIFI by setting the flags as mentioned below in the menuconfig.
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” menuconfig

Setting the below configuration in .config file.
CONFIG_CFG80211=m
CONFIG_BCMDHD=n
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y
CONFIG_ARCH_LAYERSCAPE=y
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
CONFIG_MODULE_SIG=y
CONFIG_OID_REGISTRY=y
CONFIG_ASN1=y
CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_KEYS=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_RSA=y

  1. After configuring the kernel with respect to WIFI, kernel configuration is saved through the below command :
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” savedefconfig
  1. Compilation of the kernel and image file generation in the output kernel directory,that is ,L4T_Kernel_Blt .
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” -j8

I am also facing issues in this compilation step.I tried to solve but its not going ahead. I am not sure whether it is related to dts file changes. Please guide for the same.
PFA the screenshots for the errors.





e

How did you manage to build those kernel modules?

Steps should be:

get Jetson kernel src
patch kernel with Infineon files
build jetson kernel
build Infineon modules against patched Jetson kernel

If you still get build errors, you have to manually patch/backport kernel src/driver src.

sorry I can’t be more helpful.

See:
Compiling Custom Kernel Modules on the Jetson Nano | Kevin’s Blog (kevmo314.com)

Backporting Linux Kernel driver to an older kernel (site.com)

Hi ,

Thanks a lot for the help.
I got the Jetson kernel source,compiled nvidia kernel source kernel 4.9 I shall show in the below steps:
The modules are built against Jetson kernel-cfg80211.ko,brcmfmac.ko,brcmutil.ko and compat.ko. got generated.Here I followed the steps:

1.Manually downloaded the latest kernel source package 32.7.3 from the below link.

Also, downloaded and extracted the Jetson Linux toolchain from the below link.
https://developer.nvidia.com/embedded/dlc/l4t-gcc-7-3-1-toolchain-64-bit

  1. The paths for the toolchain and kernel output directory are set for Jetson Nano Linux kernel as mentioned below :
  • export TEGRA_KERNEL_OUT=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export ARCH=arm64
  • export LOCALVERSION=“-tegra”

3.Cleaning the kernel for a clean build and Jetson nano configuration is made as the default configuration in kernel, which is tegra_defconfig as shown in the below commands :

  • make distclean
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” tegra_defconfig
  1. The kernel is configured with respect to WIFI by setting the flags as mentioned below in the menuconfig.
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” menuconfig

Setting the below configuration in .config file.
CONFIG_CFG80211=m
CONFIG_BCMDHD=n
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y

  1. After configuring the kernel with respect to WIFI, kernel configuration is saved through the below command :
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” savedefconfig
  1. Compilation of the kernel and image file generation in the output kernel directory,that is ,L4T_Kernel_Blt .
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” -j8
  1. The images -Image,Image.gz and dts are generated in the output kernel directory .The Linux kernel image and dts are stored in arch/arm64/boot/Image and arch/arm64/boot/dts respectively. They are copied to JetPack 4.6.3 release packages in the below path :

~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/

  1. The kernel modules and firmware is installed through the below command :
  • sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/
  1. Running the applybinaries.sh in JetPack4.6.3 release package and copy the kernel_supplements.tbz2 from rootfs to kernel in Jetpack package.

*cp ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/kernel_supplements.tbz2 ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel

  1. The kernel headers for Jetson nano kernel is extracted and then prepared through the below commands :
  • mkdir FMAC_module
  • mkdir mod_dep
  • cd mod_dep
  • tar -xjf /nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/kernel_headers.tbz2
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8 modules_prepare
  1. Kernel headers are installed through the below step:
  • make ARCH=arm64 INSTALL_HDR_PATH=$TEGRA_KERNEL_OUT headers_install
  1. Building WIFI backports modules (v5.15.58) for Nvidia kernel 4.9.
    The steps done are mentioned below :
    a) Backports package is diwnloaded from the below link :

https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Linux-WiFi-Driver-Release-FMAC-2022-12-23/td-p/389610

b) Extract the packages and go into backport source code directory.
cd v5.15.58-backports

c) The MY_KERNEL ,MY_ROOT and CROSS_COMPILE paths are exported for compilation. MY_KERNEL represents compiled target Jetson kernel built in Step 6. MY_ROOT represents the rootfs path where the modules were installed.

  • export MY_KERNEL=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export MY_ROOT=/home/eng/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/lib/modules/4.9.299-tegra/

d) The .config file is generated using defconfig-brcmfmac,which is configuration for FMAC driver as mentioned below in the command:

make ARCH=arm64 KLIB=$MY_ROOT KLIB_BUILD=$MY_KERNEL defconfig-brcmfmac

e) Kernel modules are cross compiled and FMAC driver modules(.ko files) are generated through the below command :

make ARCH=arm64 KLIB=$MY_ROOT KLIB_BUILD=$MY_KERNEL LOCALVERSION=“-tegra” modules

Here in the above step,the 4 .ko files wifi driver modules were built -compat.ko,brcmfmac.ko,brcmutil.ko and cfg80211.ko are generated.

After backport compilation,I made dts file for wifi fmac and copied to the above mentioned path in the previous post.

I am getting the issues after compiling nvidia kernel source again (2nd time) after copying the dts file in the below path:
/home/eng/Documents/NvidiaNano/Linux_for_Tegra/source/public/hardware/nvidia/platform/t210/porg/kernel-dts.





After generating backport modules,I need to insert the wifi modules interfacing CYW54591 wifi card to jetson nano for wifi bring up.
I wanted to know whether the above screenshots of issues signify kernel
corruption or should I deelete and rebuild again?

I also wanted to know whether the dts file for brcmfmac btwifi attached will work fine or need to do any changes for Nvidia Nano B01 Board.
tegra210-p3448-0000-p3449-0000-b00-cypress-btwifi-fmac.dts (323.5 KB).
Please guide for the same.Needed help in the dts file

Thanks and Regards,
Akshay Dharmapuri

You don’t build the kernel twice. And unless Infineon has a device tree for Jetson Nano, you have to modify one yourself.

Sure thanks a lot…
I had faced few issues in backport ,but I had solved them by adding header definations.
Here I have followed steps:
1.Manually downloaded the latest kernel source package 32.7.3 from the below link.

Also, downloaded and extracted the Jetson Linux toolchain from the below link.
https://developer.nvidia.com/embedded/dlc/l4t-gcc-7-3-1-toolchain-64-bit

  1. The paths for the toolchain and kernel output directory are set for Jetson Nano Linux kernel as mentioned below :
  • export TEGRA_KERNEL_OUT=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export ARCH=arm64
  • export LOCALVERSION=“-tegra”

3.Cleaning the kernel for a clean build and Jetson nano configuration is made as the default configuration in kernel, which is tegra_defconfig as shown in the below commands :

  • make distclean
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” tegra_defconfig
  1. The kernel is configured with respect to WIFI by setting the flags as mentioned below in the menuconfig.
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” menuconfig

Setting the below configuration in .config file.
CONFIG_CFG80211=m
CONFIG_BCMDHD=n
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y

  1. After configuring the kernel with respect to WIFI, kernel configuration is saved through the below command :
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” savedefconfig
  1. Compilation of the kernel and image file generation in the output kernel directory,that is ,L4T_Kernel_Blt .
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” -j8
  1. The images -Image,Image.gz and dts are generated in the output kernel directory .The Linux kernel image and dts are stored in arch/arm64/boot/Image and arch/arm64/boot/dts respectively. They are copied to JetPack 4.6.3 release packages in the below path :

~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/

  1. The kernel modules and firmware is installed through the below command :
  • sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/
  1. Running the applybinaries.sh in JetPack4.6.3 release package and copy the kernel_supplements.tbz2 from rootfs to kernel in Jetpack package.

*cp ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/kernel_supplements.tbz2 ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel

  1. The kernel headers for Jetson nano kernel is extracted and then prepared through the below commands :
  • mkdir FMAC_module
  • mkdir mod_dep
  • cd mod_dep
  • tar -xjf /nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/kernel_headers.tbz2
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8 modules_prepare
  1. Kernel headers are installed through the below step:
  • make ARCH=arm64 INSTALL_HDR_PATH=$TEGRA_KERNEL_OUT headers_install
  1. Building WIFI backports modules (v5.15.58) for Nvidia kernel 4.9.
    The steps done are mentioned below :
    a) Backports package is diwnloaded from the below link :

https://community.infineon.com/t5/Wi-Fi-Bluetooth-for-Linux/Cypress-Linux-WiFi-Driver-Release-FMAC-2022-12-23/td-p/389610

b) Extract the packages and go into backport source code directory.
cd v5.15.58-backports

c) The MY_KERNEL ,MY_ROOT and CROSS_COMPILE paths are exported for compilation. MY_KERNEL represents compiled target Jetson kernel built in Step 6. MY_ROOT represents the rootfs path where the modules were installed.

  • export MY_KERNEL=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export MY_ROOT=/home/eng/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/lib/modules/4.9.299-tegra/

d) The .config file is generated using defconfig-brcmfmac,which is configuration for FMAC driver as mentioned below in the command:

make ARCH=arm64 KLIB=$MY_ROOT KLIB_BUILD=$MY_KERNEL defconfig-brcmfmac

e) Kernel modules are cross compiled and FMAC driver modules(.ko files) are generated through the below command :

make ARCH=arm64 KLIB=$MY_ROOT KLIB_BUILD=$MY_KERNEL LOCALVERSION=“-tegra” modules

I faced the issue in this command while generating driver modules.
I am getting implicit declaration error for the functions BUILD_BUG_ON ,BUILD_BUG,etc.I attached the screenshots below for the issues I had faced :




I have added the header definations in the include file-backport-include/linux/bug.h file as shown below :



I just wanted to know whether we can modify source code and add the headers for BUILD_BUG,BUILD_BUG_ON,etc. for generating driver modules compat.ko,brcmutil.ko,brcmfmac.ko,cfg80211.ko .
I triedto add headers in nvidia source code kernel4.9,was getting same error

Thanks and Regards
Akshay Dharmapuri

have you seen this?
Infineon/ifx-linux-wireless: ifx-linux-wireless (github.com)

Ya I checked that one…I am referring and using the backport v5.15.58 from the same github link.
While compiling the backport,was getting the header issues.But,if I add and define those headers in backport-include/linux/bug.h,the issue doesn’t arise.
wanted to know whether we can add and include headers in the backport source code.

Thats just your compiler not knowing where the files are

Oh ok sure mhd0425…Thanks a lot for the support.

Regarding the issue quadd_event_comm as mentioned in the earlier post,the headers problem will arise everytime when I try to compile kernel 2nd time.Header issues arises everytime when we try to compile twice?
we need to insert the dts file at once and compile the kernel once only ?



Does the kernel get corrupt whenever we build kernel 2nd time
Thanks and Regards
Akshay Dharmapuri

Why do you insist on compiling the kernel twice? Follow the instructions starting with tegra_defconfig as is.

OK sure thanks a lot .no issues mhd0425…
Will follow the instructions with tegra_defconfig

only then you can try to build kernel according to Infineon:

  1. Edit .config and build cfg80211 as module
    CONFIG_CFG80211=m
    CONFIG_BCMDHD=n
  2. Enable below configs in .config
    CONFIG_ASYMMETRIC_KEY_TYPE=y
    CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
    CONFIG_X509_CERTIFICATE_PARSER=y
    CONFIG_PKCS7_MESSAGE_PARSER=y

and then build the modules
and then, try modifying device tree. You won’t be compiling the kernel again.

OK sure mhd0425. will follow that.Thanks a lot for the guidance…
The backport driver modules got generated in the backport package.
I needed one more clarification in the config file setting in the menuconfig before compiling the nvidia kernel source 4.9.

CONFIG_CFG80211=m
CONFIG_BCMDHD=n
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y

Apart from the above mentioned flags to enable in the .config file,should I also enable the below flags for Wifi fmac driver kernel configuration

CONFIG_ARCH_LAYERSCAPE=y
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
CONFIG_MODULE_SIG=y
CONFIG_OID_REGISTRY=y
CONFIG_ASN1=y
CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_KEYS=y
CONFIG_CRYPTO=y
CONFIG_CRYPTO_RSA=y

Are these flags also necessary to be set before compiling the nvidia kernel source kernel 4.9?

Thanks and Regards,
Akshay Dharmapuri

I don’t know.

Ok sure no issues mhd0425…Thanks a lot for the support and guidance

did you get it to work?

HI mhd0425…we are getting a different issue while considering the crypto flags and CAAM flags …while compiling along with quadd comm issue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.