Kernel Porting Guide

Overview

The cc33xx-linux-mpu-ports is written to support Linux kernel version 6.1.y, yet developers may require to use a different kernel version due to hardware or vendor support restrictions. Therefore, developers need a process to move the CC33xx driver from 6.1.y to the intended kernel version. This guide provides a method for developers to leverage the GitHub repository cc33xx-linux-mpu-ports which contains patches to move the CC33xx Linux driver to the intended kernel version. Developers must also use the CC33xx firmware binaries from the corresponding CC33xx SDK version.

The cc33xx-linux-mpu-ports contains patches to port the kernel 6.1 based CC33xx Linux driver to both older and newer kernels. The repository will only contain patches for kernels that were marked LTS by Linux Kernel Organization.

Porting Steps

Users should first read the README within the cc33xx-linux-mpu-ports repository as the backport patches correlate to a specific CC33xx Linux SDK version. The port patch within the GitHub repo depends on the driver provided within the CC33xx Linux SDK, so it is critical that the port patch is used with the listed SDK version.

  1. Download and install the CC33xx Linux SDK version matching the one described in the README

  2. Clone the GitHub repository:

    $ git clone https://github.com/TexasInstruments-Sandbox/cc33xx-linux-mpu-ports.git
    
  3. Change directory to the linux kernel source and then apply the patches from the CC33xx SDK and porting patch:

    $ patch -p0 < <path_to_cc33xx_sdk_folder>/patches/cc33xx_kernel.patch
    $ git am <path_to_cc33xx_linux_mpu_ports_repo>/<kernel_version>/backport.patch
    
  4. Enable the CC33xx kernel modules in the target’s kernel defconfig using the following diff:

    -CONFIG_WL18XX=m
    -CONFIG_WLCORE=m
    -CONFIG_WLCORE_SDIO=m
    +CONFIG_WL18XX=n
    +CONFIG_WLCORE=n
    +CONFIG_WLCORE_SDIO=n
    +CONFIG_CC33XX=m
    +CONFIG_CC33XX_SDIO=m
    +CONFIG_CC33XX_SPI=m
    +CONFIG_BT_TI_UART=m
    +CONFIG_CFG80211=m
    +CONFIG_MAC80211=m
    
  5. Build and install the new kernel and kernel modules specific to the target’s build system

  6. Copy the firmware from the CC33xx SDK and install onto the target.

    $ cd <path_to_cc33xx_sdk_folder>/cc33xx_rootfs
    $ sudo cp -r lib/ /media/<user>/root/
    

Updating TI Processor SDK 10.x or Newer

Users who use the TI Processor SDK 10.x or newer will find that some of the CC33xx SDK has already been included. However, this was an earlier version of the CC33xx SDK and also does not contain support for BLE. Users who want the latest features and fixes provided by the newer CC33xx SDK or add BLE support should use the patches contained in the ti-linux-x.y folders. These folders provide a patch to update the kernel used in TI Processor SDKs to match the newer CC33xx SDK. After building and installing the patched kernel, the developer must then install the firmware binaries contained in the CC33xx SDK.

  1. Download and install the CC33xx Linux SDK version

  2. Clone the GitHub repository:

    $ git clone https://github.com/TexasInstruments-Sandbox/cc33xx-linux-mpu-ports.git
    
  3. Change directory to the linux kernel source directory:

    $ cd ~/ti-processor-sdk-linux-.../board-support/ti-linux-kernel-....
    
  4. Apply the forward porting patch from the GitHub repository:

    $ git am <path_to_cc33xx_linux_mpu_ports_repo>/<kernel_version>/forwardport.patch
    
  5. Build and install the new kernel and kernel modules as suggested in the TI Processor SDK documentation

  6. Copy the firmware from the CC33xx SDK and install onto the target.

    $ cd <path_to_cc33xx_sdk_folder>/cc33xx_rootfs
    $ sudo cp -r lib/ /media/<user>/root/