Porting QCA988X in Linux BSP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting QCA988X in Linux BSP

Porting QCA988X in Linux BSP

Harware:
- i.MX7D-SDB board
- QCA9880 card with MINI PCIe Interface

The Wifi module is connected to the PCIe slot on the board.1.png1.png

 

 

Software:
- Ubuntu 18.04 LTS Host
- L4.19.35_1.1.0 BSP

 

Tool:
- uuu 1.2.68 for linux (run on ubuntu host)

 

Toolchain:

- The toolchain can be obtained from the Yocto BSP. Please read and follow the steps in i.MX_Yocto_Project_User's_Guide to build the BSP and then read the Chapter of "How to build U-Boot and Kernel in standalone environment" in i.MX_Linux_User's_Guide to build the toolchain.

 

Build the Kernel:

# mkdir imx_build

# cd imx_build

# git clone https://source.codeaurora.org/external/imx/linux-imx -b imx_4.19.35_1.1.0

# cd linux-imx

# source /opt/fsl-imx-fb/4.19-warrior/imx6/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

# export ARCH=arm
# make clean
# make imx_v7_defconfig
# make menuconfig

- Select the PCIe driver and the Wifi support

2.png2.png

- PCI controller drivers--->
                   DesignWare PCI Core Support---->

3.png3.png

- Networking support----->
                            Wireless----->

4.png4.png

 

- Select the ath10 driver (it supports QCA988X)
Device Drivers---->
            Network device support----->
                                     Wirless LAN---->

5.png5.png

- Save and Exit.

- Add the firmware in the .config file:

  1. Get the firmware file (e.g. firmware-2.bin) from your wifi vendor or download it from the web.
  2. Put the firmware in linux-imx/firmware/ folder.
  3. Edit the .config file and add these two lines:

CONFIG_EXTRA_FIRMWARE="board.bin firmware-2.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/home/jimmy/imx_build/linux-imx/firmware"

- Build the kernel

# make

Then the zImage will be obtained in arch/arm/boot.

 

Using uuu to program the SD card:

- Downloading demo image of L4.19.35_1.10 from the nxp website.

- Copy the zImage to the directory

- Copy the uuu (V1.2.68) to the directory

- Copy the samples/example_kernel_emmc.uuu to imx7d_kernel_emmc.uuu

- Modify the image the imx7d_kernel_emmc.uuu

- In the demo image, you will see the files like this:

6.png6.png

- run uuu and the script to program the images.

 

Wifi driver loaded and wlan0 is up:

# dmesg | grep pci

7.png7.png

 

# ifconfig -a

8.png8.png

 

Reference Document:
- i.MX_Linux_User's_Guide.pdf
- i.MX_Porting_Guide.pdf

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1165784%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPorting%20QCA988X%20in%20Linux%20BSP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1165784%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EHarware%3A%3C%2FSTRONG%3E%3C%2FU%3E%3CBR%20%2F%3E-%20i.MX7D-SDB%20board%3CBR%20%2F%3E-%20QCA9880%20card%20with%20MINI%20PCIe%20Interface%3C%2FP%3E%0A%3CP%3EThe%20Wifi%20module%20is%20connected%20to%20the%20PCIe%20slot%20on%20the%20board.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20864px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20864px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127180iBD9BD00B75A1EDCC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E1.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3ESoftware%3A%3C%2FSTRONG%3E%3C%2FU%3E%3CBR%20%2F%3E-%20Ubuntu%2018.04%20LTS%20Host%3CBR%20%2F%3E-%20L4.19.35_1.1.0%20BSP%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3ETool%3A%3C%2FSTRONG%3E%3C%2FU%3E%3CBR%20%2F%3E-%20uuu%201.2.68%20for%20linux%20(run%20on%20ubuntu%20host)%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EToolchain%3A%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E-%20The%20toolchain%20can%20be%20obtained%20from%20the%20Yocto%20BSP.%20Please%20read%20and%20follow%20the%20steps%20in%20i.MX_Yocto_Project_User's_Guide%20to%20build%20the%20BSP%20and%20then%20read%20the%20Chapter%20of%20%22How%20to%20build%20U-Boot%20and%20Kernel%20in%20standalone%20environment%22%20in%20i.MX_Linux_User's_Guide%20to%20build%20the%20toolchain.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CU%3E%3CSTRONG%3EBuild%20the%20Kernel%3A%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%23%20mkdir%20imx_build%3C%2FP%3E%0A%3CP%3E%23%20cd%20imx_build%3C%2FP%3E%0A%3CP%3E%23%20git%20clone%20%3CA%20href%3D%22https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Flinux-imx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Flinux-imx%3C%2FA%3E%20-b%20imx_4.19.35_1.1.0%3C%2FP%3E%0A%3CP%3E%23%20cd%20linux-imx%3C%2FP%3E%0A%3CP%3E%23%20source%20%2Fopt%2Ffsl-imx-fb%2F4.19-warrior%2Fimx6%2Fenvironment-setup-cortexa9hf-neon-poky-linux-gnueabi%3C%2FP%3E%0A%3CP%3E%23%20export%20ARCH%3Darm%3CBR%20%2F%3E%23%20make%20clean%3CBR%20%2F%3E%23%20make%20imx_v7_defconfig%3CBR%20%2F%3E%23%20make%20menuconfig%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20Select%20the%20PCIe%20driver%20and%20the%20Wifi%20support%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20600px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20600px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127188i9F50FA35EB9B666B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.png%22%20alt%3D%222.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E2.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20PCI%20controller%20drivers---%26gt%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DesignWare%20PCI%20Core%20Support----%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%223.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%223.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127189i9F508542D3E0144C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%223.png%22%20alt%3D%223.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E3.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20Networking%20support-----%26gt%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Wireless-----%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%224.png%22%20style%3D%22width%3A%20818px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%224.png%22%20style%3D%22width%3A%20818px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127190i32E82B42CC2A6316%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%224.png%22%20alt%3D%224.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E4.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorjimmychan_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSTRONG%3E-%20Select%20the%20ath10%20driver%20(it%20supports%20QCA988X)%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EDevice%20Drivers----%26gt%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Network%20device%20support-----%26gt%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Wirless%20LAN----%26gt%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%225.png%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%225.png%22%20style%3D%22width%3A%20640px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127191i2C91870D6A25EB8B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%225.png%22%20alt%3D%225.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E5.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20Save%20and%20Exit.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20Add%20the%20firmware%20in%20the%20.config%20file%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EGet%20the%20firmware%20file%20(e.g.%20firmware-2.bin)%20from%20your%20wifi%20vendor%20or%20download%20it%20from%20the%20web.%3C%2FLI%3E%0A%3CLI%3EPut%20the%20firmware%20in%20linux-imx%2Ffirmware%2F%20folder.%3C%2FLI%3E%0A%3CLI%3EEdit%20the%20.config%20file%20and%20add%20these%20two%20lines%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%20style%3D%22padding-left%20%3A%2060px%3B%22%20style%3D%22padding-left%20%3A%2060px%3B%22%3ECONFIG_EXTRA_FIRMWARE%3D%22board.bin%20firmware-2.bin%22%3CBR%20%2F%3ECONFIG_EXTRA_FIRMWARE_DIR%3D%22%2Fhome%2Fjimmy%2Fimx_build%2Flinux-imx%2Ffirmware%22%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E-%20Build%20the%20kernel%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%23%20make%3C%2FP%3E%0A%3CP%3EThen%20the%20zImage%20will%20be%20obtained%20in%20arch%2Farm%2Fboot.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EUsing%20uuu%20to%20program%20the%20SD%20card%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E-%20Downloading%20demo%20image%20of%20L4.19.35_1.10%20from%20the%20nxp%20website.%3C%2FP%3E%0A%3CP%3E-%20Copy%20the%20zImage%20to%20the%20directory%3C%2FP%3E%0A%3CP%3E-%20Copy%20the%20uuu%20(V1.2.68)%20to%20the%20directory%3C%2FP%3E%0A%3CP%3E-%20Copy%20the%20samples%2Fexample_kernel_emmc.uuu%20to%20imx7d_kernel_emmc.uuu%3C%2FP%3E%0A%3CP%3E-%20Modify%20the%20image%20the%20imx7d_kernel_emmc.uuu%3C%2FP%3E%0A%3CP%3E-%20In%20the%20demo%20image%2C%20you%20will%20see%20the%20files%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%226.png%22%20style%3D%22width%3A%20903px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%226.png%22%20style%3D%22width%3A%20903px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127194i55B5B0831B645D7D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%226.png%22%20alt%3D%226.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E6.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E-%20run%20uuu%20and%20the%20script%20to%20program%20the%20images.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%3CU%3EWifi%20driver%20loaded%20and%20wlan0%20is%20up%3A%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%23%20dmesg%20%7C%20grep%20pci%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%227.png%22%20style%3D%22width%3A%20658px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%227.png%22%20style%3D%22width%3A%20658px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127197i73C43BBD94700D5C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%227.png%22%20alt%3D%227.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E7.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%23%20ifconfig%20-a%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%228.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127198iBFF90CC0E3C622E2%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%228.png%22%20alt%3D%228.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3E8.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EReference%20Document%3A%3CBR%20%2F%3E-%20i.MX_Linux_User's_Guide.pdf%3CBR%20%2F%3E-%20i.MX_Porting_Guide.pdf%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎10-11-2020 09:22 PM
Updated by: