Customizing the Linux kernel¶
Introduction¶
This guide demonstrates how to patch and rebuild Debian Linux images.
After customizing the kernel, you can either build the complete Debian image
with var_build_image, or build the kernel alone:
See the Build Debian from source code page for the initial FlexBuild setup.
Requirements¶
Before modifying the kernel source code, follow the initial setup steps in the Build Linux from source code page.
Modifying the Kernel¶
Make the desired changes to the kernel source code. For example:
Configuring the Kernel¶
The default kernel configuration file used by FlexBuild is part of the kernel source tree and is located at:
Clean and prepare the kernel:
Customize the kernel configuration and save it back to the default defconfig:
Generate a Patch¶
Commit the changes locally and generate a patch:
Build Modified Linux¶
Make sure the FlexBuild Docker environment is set up as described in Build Debian from source code.
FlexBuild retrieves the source code from the default Variscite repository and applies patches from the Linux patch folder before building it. Copy the patch to the FlexBuild Linux patch folder:
Do not run git am or git apply manually. FlexBuild applies the patch during
the Linux build.
Enter the Docker environment if needed:
Build Linux individually:
If a rebuild is required, clean the Linux build first: