# Compile Linux kernel ## Getting sources To get main repo kernel Default kernel is located here ``` git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ``` There is whole list of different kernels maintainer ones and much more. ``` https://git.kernel.org/cgit/ ``` some distros have their own kernels. Here whole list of kernels based on ubuntu version ``` http://kernel.ubuntu.com/git/ ``` And also there is little different native kernel building ways for some distros ## Compiling Run to configure kernel ``` make menuconfig ``` config is saved in _.config_ file. And now we are ready to compile our first kernel ``` make ``` ## Linux patches ### Grsecurity Linux security enhancments https://grsecurity.net/ ### Tomoyo MAC based securty mechanism http://tomoyo.osdn.jp/ ## Links 1. https://git.kernel.org/cgit/ 2. https://wiki.ubuntu.com/Kernel/SourceCode 3. https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel 4. https://fedoraproject.org/wiki/Building_a_custom_kernel