2.4 Building Linux Kernel Individually

Buildroot downloads the Linux kernel as per the buildroot configuration file from GitHub. The downloaded kernel must be available in the buildroot-at91/output/build/linux-xxxx path, and is built automatically during the buildroot build operation.

However, if the kernel is modified after building the buildroot, the user must rebuild the kernel. The following is the procedure to build the Linux kernel against the toolchain and ARM architecture:

  1. Change the directory to the Linux kernel source folder, using the following command:
    $ cd output/build/linux-xx
  2. Create the kernel with the help of the sama5_defconfig defconfig file, using the following command:
    $ make ARCH=arm sama5_defconfig
  3. Perform the required changes using the menuconfig tool, using the following command:
    $ make ARCH=arm menuconfig
  4. Build the Linux kernel against the toolchain and ARM architecture, using the following commands:
    $ make ARCH=arm CROSS_COMPILE=../../../output/host/bin/arm-linux-
    $ make ARCH=arm CROSS_COMPILE=../../../output/host/bin/arm-linux- zImage
    $ make ARCH=arm CROSS_COMPILE=../../../output/host/bin/arm-linux- dtbs