Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few changes to the instructions how to compile a new kernel #1

Closed
wants to merge 9 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions usr/src/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@ legend:
compile new kernel
1. mount "/boot/"

1.2. clean up "/boot/"
1.1. clean up "/boot/"

2. create a new symlink to the newest kernel source
2. check that /usr/src/linux points to the desired kernel version (USE flag 'symlink')

2.1. if not, create a new symlink to the desired kernel version
cd "/usr/src/"
ln --symbolic --force "linux-<new_kernel_version>-gentoo/" "linux"

3. copy the file ".config" file from the old kernel source to the newer one
cp "linux-<old_kernel_version>/.config" "linux/.config"
3. provide the file ".config" from the old kernel source to the newer one

3.1 or from the running kernel: zcat "/proc/config.gz" > "linux/.config"

3.2 or from a folder: cp "linux-<old_kernel_version>/.config" "linux/.config"

4. compile the new kernel

4.1. adapt new default values
make olddefconfig
4.1. get new values

4.1.1.or all by default:
make olddefconfig

4.1.2.or checking them all manually:
make oldconfig

4.2. compile the kernel and modules
make --jobs 4 --load-average 3.6 && make --jobs 4 --load-average 3.6 modules_install
Expand All @@ -41,16 +51,16 @@ compile new kernel

6.3. check, if the microcode was updated
dmesg | grep "microcode"

7. re-compile virtualbox and other modules for the new kernel:
emerge @module-rebuild

7. update the grub configuration:
8. update the grub configuration:
halcon74 marked this conversation as resolved.
Show resolved Hide resolved
grub-mkconfig --output="/boot/grub/grub.cfg"

8. use the new kernel:
9. use the new kernel:
reboot

9. re-compile virtualbox modules for the new kernel:
emerge @module-rebuild

10. clean up "/lib/modules/"

11. clean up "/usr/src/"
Expand Down