4.2.2 Adding WILC Driver Support to Kernel

  • Clone the linux4microchip GitHub linux kernel repository by using the following command:
    $ git clone https://github.com/linux4microchip/linux.git
  • Move to the kernel directory and export the toolchain path by using the following command:
    export CROSS_COMPILE=arm-linux-gnueabi-
  • Configure the kernel by using the following command:
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sama5_defconfig
  • Modify the default kernel configuration using the following menuconfig command:
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
  • Select the ATWILC driver module, from the GUI selection window:
    1. Navigate to Device Drivers > Network device support > Wireless LAN.
    2. Press M to modularize WILC SDIO to include the module during runtime.
    3. Save the configuration.
  • Include the cfg80211 as an inbuild module to the kernel from the GUI selection window by performing the following steps:
    1. Navigate to Networking support > wireless.
    2. Press * to include the cfg80211 – wireless configuration API module to the kernel.
    3. Save the configuration.
  • Build the kernel using the following command:
    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage
    Note: zImage is available in arch/arm/boot directory.
  • Build the modules using the following command:
    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
    Note: wilc-sdio.ko file is available in driver/net/wireless/microchip/wilc1000 directory.
  • Build the .dtb file using the following command:
    $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- at91-sama5d3_xplained.dtb
    Note: The at91-sama5d3_xplained.dtb file is available in arch/arm/boot/dts directory.