View previous topic :: View next topic |
Author |
Message |
ttre n00b
Joined: 04 Aug 2016 Posts: 29
|
Posted: Thu Mar 23, 2017 8:11 pm Post subject: Kernel compilation |
|
|
I have questions about kernel.
Last kernel that I compiled was 4.9.6, and It was last week and it was first time since I have installed gentoo in spring 2016.
Now I see that emerge took gentoo sources 4.9.16, so I probably need to compile again.
1. How often is released new kernel version ?
2. Do I need to compile new kernel always ?
3. My size of kernel is 5282832 is it too big ?
4. I have netbook 1,6 GHz - one core and my kernel compile 10 hours - is not too long ? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Mar 23, 2017 8:41 pm Post subject: |
|
|
ttre,
You should update your kernel once every minor release. That's 4.x to 4.x+1. Its about every 8 weeks.
Consider doing security updates as they happen, if you need the fixes.
5.2Mb is only part of your kernel. Thats the binary with all the built in modules.
The loadable modules are in /lib/modules. They are a part of the kernel build.
You can save kernel compile time by removing things you will never need, in the menuconfig stage.
How you do that and what you can remove, depends on your hardware and how you build your kernel.
I have a netbook like that too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
ttre n00b
Joined: 04 Aug 2016 Posts: 29
|
Posted: Thu Mar 23, 2017 8:53 pm Post subject: |
|
|
I noticed that a lot of modules installation took a lot of time.
I wonder if there are parts in menuconfig level that I do not need in normal desktop using or if it need to be individual approach. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Mar 23, 2017 9:01 pm Post subject: |
|
|
ttre,
The kernel can almost drive all of the hardware made in the last 20 years, much of which is now forgotten.
You probably don't have much of that in your netbook. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Thu Mar 23, 2017 9:54 pm Post subject: |
|
|
Hey ttre,
You can actually disable most of the drivers and only enable what you need...
The good thing is that the kernel is quite good in finding out what it needs to be built/rebuilt after a config change!
So if you compile the kernel once and change the config, the next run will be quite quick as it only compiles the changes.
This is the default with manual compilation and can be achieved with genkernel by adding --no-clean.
So don't be afraid of disabling stuff as long as you keep a rescue kernel that at least boots (either a different version or one with everything needed such as the disk built in and not as module... because modules get rewritten within the same version!
Of course, also little core changes might affect all modules and take quite long to compile therefore..................
HTH, cheers _________________ Power to the people! |
|
Back to top |
|
|
ttre n00b
Joined: 04 Aug 2016 Posts: 29
|
Posted: Fri Mar 24, 2017 4:27 pm Post subject: |
|
|
nativemad wrote: | Hey ttre,
You can actually disable most of the drivers and only enable what you need...
The good thing is that the kernel is quite good in finding out what it needs to be built/rebuilt after a config change!
So if you compile the kernel once and change the config, the next run will be quite quick as it only compiles the changes.
This is the default with manual compilation and can be achieved with genkernel by adding --no-clean.
So don't be afraid of disabling stuff as long as you keep a rescue kernel that at least boots (either a different version or one with everything needed such as the disk built in and not as module... because modules get rewritten within the same version!
Of course, also little core changes might affect all modules and take quite long to compile therefore..................
HTH, cheers |
ok, my last compilation seemed:
Code: |
zcat /proc/config.gz > /usr/src/linux/.config
cd /usr/src/linux
cp .config ~/kernel-config-`uname -r`
make oldconfig && make && make modules_install install
genkernel --install initramfs
grub-mkconfig -o /boot/grub/grub.cfg
emerge --ask @module-rebuild |
I think that using genkernel with --no-clean option it should be a little differently. |
|
Back to top |
|
|
nativemad Developer
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Sat Mar 25, 2017 4:00 pm Post subject: |
|
|
Quote: | genkernel --install initramfs |
No, you seem to use genkernel only to create the initramfsthat way!
Quote: | make oldconfig && make && make modules_install install |
This is what takes ages, and there it shouldn't clear a previous compile run...
You can customize the kernel by running "make menuconfig" before the actual "make". _________________ Power to the people! |
|
Back to top |
|
|
ttre n00b
Joined: 04 Aug 2016 Posts: 29
|
Posted: Sat Mar 25, 2017 4:18 pm Post subject: |
|
|
nativemad wrote: |
No, you seem to use genkernel only to create the initramfsthat way! |
ok, I followed https://wiki.gentoo.org/wiki/Kernel/Upgrade
there is nothing about genkernel to use. |
|
Back to top |
|
|
|