filmov
tv
How to compile the Linux Kernel on a Debian-based system
Показать описание
We're going to compile the mainline Kernel and add CPU-specific optimizations so that our system is damn fast!
For more information:
Here are some CLI commands that can be copied and pasted in order.
First, make your source directory:
mkdir source
cd source
cd linux-5.7.12
make oldconfig
** Here is where you simply hit ENTER for each question **
make localmodconfig
** IMPORTANT: Before you run localmodconfig you MUST plug in all of your devices and make sure they are active. If you have a webcam then open Cheese and make sure the cam is working. This causes localmodconfig to add every driver that's loaded to be added to your new config as M. If it doesn't see your device then it will add N and the device won't work with the new Kernel **
sudo apt-get install kernel-package qt4-dev-tools pkg-config flex bison libssl-dev libelf-dev
make xconfig
** if this doesn't work then there are some dependency issues and you simply need to install the necessary files so you must sudo apt-get install other files**
Use this tool to search for keywords like "debug," "profile," "AMD" to both remove things you don't need and add things you do need. I remove 99% of all debug and trace features.
Remember that this menu allows for one of _3_ options:
N = remove
Y = add always
M = add as a module that will load when needed (best option, normally)
Some features cannot be added as a module and some can only be N or M.
Now for the actual compiling process!
sudo make -j`nproc` LOCALVERSION=joel CFLAGS="-O3 -march=native" CXXFLAGS="-O3 -march=native" CPPFLAGS="-O3 -march=native" bindeb-pkg
Once this finishes, you will install in a specific order:
sudo dpkg -i *header*.deb
sudo dpkg -i *image*.deb
Done! Make sure to use pick the right Kernel when booting. Grub Customizer will allow you to change the default so it always boots with that Kernel but first test it to make sure it works.
For more information:
Here are some CLI commands that can be copied and pasted in order.
First, make your source directory:
mkdir source
cd source
cd linux-5.7.12
make oldconfig
** Here is where you simply hit ENTER for each question **
make localmodconfig
** IMPORTANT: Before you run localmodconfig you MUST plug in all of your devices and make sure they are active. If you have a webcam then open Cheese and make sure the cam is working. This causes localmodconfig to add every driver that's loaded to be added to your new config as M. If it doesn't see your device then it will add N and the device won't work with the new Kernel **
sudo apt-get install kernel-package qt4-dev-tools pkg-config flex bison libssl-dev libelf-dev
make xconfig
** if this doesn't work then there are some dependency issues and you simply need to install the necessary files so you must sudo apt-get install other files**
Use this tool to search for keywords like "debug," "profile," "AMD" to both remove things you don't need and add things you do need. I remove 99% of all debug and trace features.
Remember that this menu allows for one of _3_ options:
N = remove
Y = add always
M = add as a module that will load when needed (best option, normally)
Some features cannot be added as a module and some can only be N or M.
Now for the actual compiling process!
sudo make -j`nproc` LOCALVERSION=joel CFLAGS="-O3 -march=native" CXXFLAGS="-O3 -march=native" CPPFLAGS="-O3 -march=native" bindeb-pkg
Once this finishes, you will install in a specific order:
sudo dpkg -i *header*.deb
sudo dpkg -i *image*.deb
Done! Make sure to use pick the right Kernel when booting. Grub Customizer will allow you to change the default so it always boots with that Kernel but first test it to make sure it works.
Комментарии