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:
- Change the directory to the Linux
kernel source folder, using the following
command:
$ cd output/build/linux-xx
- Create the kernel with the help
of the
sama5_defconfig
defconfig file, using the following command:$ make ARCH=arm sama5_defconfig
- Perform the required changes
using the menuconfig tool, using the following
command:
$ make ARCH=arm menuconfig
- 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