4. Prepare to Customize

Once you have unpacked the kernel source code, cd into the root of the source tree and run the following commands:


sudo make clean
sudo make mrproper
cp /boot/config-`uname -r` .config
The first two commands remove obsolete files that could corrupt the build process. The third command copies the configuration of your system's working kernel to your new kernel's configuration. This provides a solid foundation for the customizations that we will be making.[1]

Notes

[1]

While make clean and make mrproper have no effect if you are starting with a newly unpacked source tree, I have included them here just to provide a consistent procedure.