
Custom Linux Kernel - Walkthrough Guide - Chris Titus Tech
video description
Date: 2022-03-21
Related videos
Comments and reviews: 10
Cat22
I was expecting to see how you setup the .config
For me, i take the latest stable kernel from kernel.org do an 'make olddefconfg' to get a runnable baseline and then run xconfig or menuconfig and go through it removing stuff I don't need and enabling a few things like changing the processor from 'generic' to 'core2/xeon or newer', removing bounce buffers and since I run an Intel based system i also disable all the AMD stuff, along with video and networking items that are not applicable to my system, disable Trusted Platform,Industrial support, and a lot more. I also do INSTALL_MOD_STRIP=1 to reduce module size. There --are-- things you can enable or disable that improve kernel performance, you need to dig to find the stuff that fits your system. As just one simple example, i found that zswap was disabled so i enabled it for faster swap performance. Anyway, the result is a streamlined kernel that works great on my system. BTW: you should use make - j-(4-num_cpu) and the compile will run very fast. I just compiled 5.8.11 from a make clean state and it only took me 17 minutes 30 seconds on OpenSuse Leap 15.2 and an Intel 3960x with 16G of ram which was running milkyway at home at the same time which puts a heavy load on the cpu by itself. In the end is it faster? Yes, but not noticeably so. Its now able to use more current instructions and that and things like zswap ought to help. It also gets rid of a lot of cruft and takes up a lot less space between /boot and /lib/modules
Never stop tinkering!
reply
I was expecting to see how you setup the .config
For me, i take the latest stable kernel from kernel.org do an 'make olddefconfg' to get a runnable baseline and then run xconfig or menuconfig and go through it removing stuff I don't need and enabling a few things like changing the processor from 'generic' to 'core2/xeon or newer', removing bounce buffers and since I run an Intel based system i also disable all the AMD stuff, along with video and networking items that are not applicable to my system, disable Trusted Platform,Industrial support, and a lot more. I also do INSTALL_MOD_STRIP=1 to reduce module size. There --are-- things you can enable or disable that improve kernel performance, you need to dig to find the stuff that fits your system. As just one simple example, i found that zswap was disabled so i enabled it for faster swap performance. Anyway, the result is a streamlined kernel that works great on my system. BTW: you should use make - j-(4-num_cpu) and the compile will run very fast. I just compiled 5.8.11 from a make clean state and it only took me 17 minutes 30 seconds on OpenSuse Leap 15.2 and an Intel 3960x with 16G of ram which was running milkyway at home at the same time which puts a heavy load on the cpu by itself. In the end is it faster? Yes, but not noticeably so. Its now able to use more current instructions and that and things like zswap ought to help. It also gets rid of a lot of cruft and takes up a lot less space between /boot and /lib/modules
Never stop tinkering!
reply
gwgux
I haven't built a kernel form source since the late 2.4 and early 2.6 days. Back then it was sometimes necessary to get a working system though it sucked to have to manually stay on top of kernel patches and having to keep the standard kernels from the distribution from getting installed. Sure you can get some performance out of it, but not enough to be a practical use of my time so after the distros starting baking in the correct drivers for my hardware I stopped building custom kernels. Nowadays it's more for hard core enthusiasts, people who want to learn, and people working on projects where it makes sense to do so.
That said, building a custom kernel from the source on kernel.org is still a right of passage in learning all things Linux so it's a good project to do at least once. If nothing else it'll make you really glad for the developers of you favorite Linux distros since they do have to keep up with it to give you the binaries for the updates.
reply
I haven't built a kernel form source since the late 2.4 and early 2.6 days. Back then it was sometimes necessary to get a working system though it sucked to have to manually stay on top of kernel patches and having to keep the standard kernels from the distribution from getting installed. Sure you can get some performance out of it, but not enough to be a practical use of my time so after the distros starting baking in the correct drivers for my hardware I stopped building custom kernels. Nowadays it's more for hard core enthusiasts, people who want to learn, and people working on projects where it makes sense to do so.
That said, building a custom kernel from the source on kernel.org is still a right of passage in learning all things Linux so it's a good project to do at least once. If nothing else it'll make you really glad for the developers of you favorite Linux distros since they do have to keep up with it to give you the binaries for the updates.
reply
Zaubermaus
when i tried to build a custom kernel for debian (that was 10 years ago, so i don't know exactly how i started that anymore), there was an ncurses based menu with DOZENS of options to choose, what actually would be in the kernel and what would be left out... and i have to say that i didn't know what the majority of those options did (maybe except the driver section). i understand that an explanation video of that would take far too long to make and very long to watch, but if you maybe know a link to an (preferably understandable ) explanation of all that stuff, i would appreciate it if you could share that with me/us. thanks ;)
reply
when i tried to build a custom kernel for debian (that was 10 years ago, so i don't know exactly how i started that anymore), there was an ncurses based menu with DOZENS of options to choose, what actually would be in the kernel and what would be left out... and i have to say that i didn't know what the majority of those options did (maybe except the driver section). i understand that an explanation video of that would take far too long to make and very long to watch, but if you maybe know a link to an (preferably understandable ) explanation of all that stuff, i would appreciate it if you could share that with me/us. thanks ;)
reply
Tukoz
Compiling the kernel under Arch never takes over an hour on my gen 3 Core i3. Strange what I hear at 3:50, as I doubt using only efficient software (eg our desktops are differents) makes any more than a tiny portion of this difference.
Also Debian is more stable than Arch. hmmm, untill you want or need to tinker Debian to get the juice of your system. Then Arch is -definitively- more stable in my experience :)
reply
Compiling the kernel under Arch never takes over an hour on my gen 3 Core i3. Strange what I hear at 3:50, as I doubt using only efficient software (eg our desktops are differents) makes any more than a tiny portion of this difference.
Also Debian is more stable than Arch. hmmm, untill you want or need to tinker Debian to get the juice of your system. Then Arch is -definitively- more stable in my experience :)
reply
Daniel
Someone give me advice have a lenovo legion 5 touchpad will only work with with if elants ekth i2c is modularise in menuconfig all linux distros kernel has it as built in (-) and will not work but nvidia driver doesn't like custom kernels always fails so I just run my apu or nouveau driver is there a way to get nvidia drivers and custom kernels to work
reply
Someone give me advice have a lenovo legion 5 touchpad will only work with with if elants ekth i2c is modularise in menuconfig all linux distros kernel has it as built in (-) and will not work but nvidia driver doesn't like custom kernels always fails so I just run my apu or nouveau driver is there a way to get nvidia drivers and custom kernels to work
reply
Paul
Compiling a kernel takes a while if you compile crap you don't need. The trick is to configure the kernel to only include what you do need. And that takes a really long time. But it is the only way to derive any benefit from compiling your own kernel. Run the command make menuconfig I'll see you in a few days!
reply
Compiling a kernel takes a while if you compile crap you don't need. The trick is to configure the kernel to only include what you do need. And that takes a really long time. But it is the only way to derive any benefit from compiling your own kernel. Run the command make menuconfig I'll see you in a few days!
reply
Hanro50
Personally I'm using the Xanmod custom kernel. From what I've gathered it pulls in some kernel patches from Intel's clear Linux and the like. And my system feels a bit more responsive.
My Ubuntu 19.10 install seems to be running fine so far. Only major change I had to do was wipe out my swap partition.
reply
Personally I'm using the Xanmod custom kernel. From what I've gathered it pulls in some kernel patches from Intel's clear Linux and the like. And my system feels a bit more responsive.
My Ubuntu 19.10 install seems to be running fine so far. Only major change I had to do was wipe out my swap partition.
reply
Jim
This is not a good tutorial. There's missing steps that he skipped over.- Do it proper and start from the beginning step by step. You don't have to show it compiling since it takes so long.
reply
This is not a good tutorial. There's missing steps that he skipped over.- Do it proper and start from the beginning step by step. You don't have to show it compiling since it takes so long.
reply
Jmvars
After installing the zen kernel I got rid of all lag from Rocket League. It would lag on game join and during kickoff, but with the zen kernel it just doesn't.
Great success!
reply
After installing the zen kernel I got rid of all lag from Rocket League. It would lag on game join and during kickoff, but with the zen kernel it just doesn't.
Great success!
reply
MattsCreative
Yes a custom kernel can give alot of performance if its done right pds kernel from tkg is that such kernel it makes nvidia run at full speed and helps in emulation
reply
Yes a custom kernel can give alot of performance if its done right pds kernel from tkg is that such kernel it makes nvidia run at full speed and helps in emulation
reply
Add a review, comment
Other channel videos















