This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

M2-CC3351: Patching kernel removes wireless interface

Part Number: M2-CC3351
Other Parts Discussed in Thread: CC3351, SK-AM62-SIP

Tool/software:

Hello All,

I lose the wireless interface wlan0 whenever I patch the kernel for a cc3351.

Main question: Am I patching and building the kernel incorrectly? 

We plan to deploy thousands of these Wi-Fi modules starting early next year, so resolving this video streaming issue is critical to our success. We would greatly appreciate your support in addressing this!

Starting info

Steps I used for Installing SDK, patching, and building kernel + SD img

Summary: install sdk, patch kernel, build a default image, cp the patched kernel and dtbs and replace the non-patched kernel + dbts. Show that wireless interface breaks as a result of cp patched kernel. (NOTE: this happens if I cp any other kernel Image into rootfs/boot





  • After installing SDK, we run the following in the root SDK directory.

export ARCH=arm64

export CROSS_COMPILE=$HOME/Desktop/5-7-10x-SDK/linux-devkit/\

sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-

  • Go into the TI ARM64 kernel tree

cd ~/Desktop/5-7-10x-SDK/board-support/ti-linux-kernel-6.6.58+git-ti

  • Start from a clean tree

make mrproper

  • Load TI’s baseline + prune fragment

make defconfig ti_arm64_prune.config

  • Open menuconfig and save without making changes 

make savedefconfig

cp defconfig arch/arm64/configs/defconfig   # overwrite generic defconfig



  • Create new branch and check it out 

  • Apply the patch
    • Here are the results as well

davidsober@davidsober-AORUS-16X-ASG ~/Desktop/5-30-SDK/board-support/ti-linux-kernel-6.6.58+git-ti [testing-wlan0-showingup*]$ patch -p1 < ~/Downloads/drivers-cc33xx-update-to-1.0.0.8.patch

patching file drivers/bluetooth/Kconfig

patching file drivers/bluetooth/Makefile

patching file drivers/bluetooth/btti_debugfs.c

patching file drivers/bluetooth/btti_drv.h

patching file drivers/bluetooth/btti_main.c

patching file drivers/bluetooth/btti_sdio.c

patching file drivers/bluetooth/btti_sdio.h

patching file drivers/bluetooth/btti_uart.c

patching file drivers/net/wireless/ti/cc33xx/Makefile

patching file drivers/net/wireless/ti/cc33xx/acx.c

patching file drivers/net/wireless/ti/cc33xx/acx.h

patching file drivers/net/wireless/ti/cc33xx/boot.c

patching file drivers/net/wireless/ti/cc33xx/cc33xx_i.h

patching file drivers/net/wireless/ti/cc33xx/cmd.c

patching file drivers/net/wireless/ti/cc33xx/cmd.h

patching file drivers/net/wireless/ti/cc33xx/conf.h

patching file drivers/net/wireless/ti/cc33xx/debugfs.c

patching file drivers/net/wireless/ti/cc33xx/debugfs.h

patching file drivers/net/wireless/ti/cc33xx/io.c

patching file drivers/net/wireless/ti/cc33xx/main.c

patching file drivers/net/wireless/ti/cc33xx/ps.c

patching file drivers/net/wireless/ti/cc33xx/rx.c

patching file drivers/net/wireless/ti/cc33xx/rx.h

  • Back to the SDK root and rebuild everything

cd ~/Desktop/5-30-SDK

make clean           

make all -j$(nproc)  

make linux_stage                



  • Create the SD card image 

sudo bin/create-sdcard.sh 

When create-sdcard.sh asks 

“    Choose file path to install from

    1 ) Install pre-built images from SDK

    2 ) Enter in custom boot and rootfs file paths”

We select 1. Install prebuilt image

Then we select “1:tisdk-default-image-am62xxsip-evm.rootfs.tar.xz” 



  • Modified uEnv.txt in boot partition and pasted this at the bottom
    • name_overlays=ti/k3-am625-sk-m2-cc3301.dtbo



  • Running ifconfig we can see wlan0 interface shows up 

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether f8:fb:90:13:6c:52  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



  • Plug SD card back into host PC then cp our built kernel image and dtb into rootfs/boot 



BOOT=/media/$USER/rootfs/boot    # ext4 partition already mounted

sudo cp ~/Desktop/5-30-SDK/board-support/built-images/Image  $BOOT/

sudo cp -r ~/Desktop/5-30-SDK/board-support/built-images/dtb/ti  $BOOT/dtb/

sudo cp /home/davidsober/Desktop/5-30-SDK/board-support/built-images/fitImage \

     /media/davidsober/rootfs/boot/fitImage

sync

  • Boot and check ifconfig 

Result

root@am62xxsip-evm:~# ifconfig

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 08:04:b4:31:13:8a  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.165  netmask 255.255.255.0  broadcast 192.168.1.255

        ether 5e:78:4e:13:25:33  txqueuelen 1000  (Ethernet)

        RX packets 31  bytes 3314 (3.2 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 13  bytes 2110 (2.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 12  bytes 1078 (1.0 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 12  bytes 1078 (1.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



  • Now wireless interface is not appearing anymore

To fully evaluate the WiFi module we need to be able to patch the kernel and keep the wireless interface. This has been the main issue. If you see incorrect steps, please feel free to respond. We are excited to evaluate the cc3351!