3.1.3 Building Kernel Image
Perform the following steps to build the 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
commands:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sama5_defconfig - Modify the default kernel configuration using the menuconfig. Use the following command
to
execute:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig - Select the ATWILC driver module, from the GUI selection window:
- Go to Device Drivers > Network device support > Wireless LAN.
- Press M to modularize WILC SDIO to include the module during run time.
- Save the configuration.
- Include the cfg80211 module as an inbuilt
module to kernel, from the GUI selection window:
- Go to Networking support > wireless.
- Press * to include the cfg80211 – wireless configuration API module to the kernel.
- Save the configuration.
- Build the kernel using the following
command:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImagezImage is available in the
arch/arm/bootdirectory. - Build the modules using the following
command:
The file$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- moduleswilc-sdio.kowill be available in thedriver/net/wireless/microchip/wilc1000directory. - Build the
.dtbfile using the following command:
The$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- at91-sama5d2_xplained.dtbat91-sama5d2_xplained.dtbfile is available in thearch/arm/boot/dtsfolder.
