Skip to content

gentoo-sources compilation helper

Latest
Compare
Choose a tag to compare
@rewtnull rewtnull released this 17 Jan 20:38
33d5bf4

If you're tired of manually (re)compiling your gentoo-sources for the N:th time, or you're just lazy, this is the script for you.

If a new gentoo-sources update has been synced, or you want to recompile your kernel for what ever reason, all you need to do is to run this script without arguments, or explicitly choose kernel version to install by using the --kernel option. No need to run eselect or symlinking kernel manually.

What this script does:

Leads you through kernel configuration and compilation by boolean (y/n) questions (or optionally answers these for you because your time is too valuable to answer questions)
Checks if your /boot directory is empty, and if it is, asks to mount it
Automatically re-links your current (or explicit) kernel version to /usr/src/linux
Checks if a .config file exists, if not, you will either get an option to deflate it from /proc/config.gz, or manually setup new kernel .config
Compiles kernel and (optionally) modules, depending on your makearg settings
Optionally generates initramfs to /boot with the --initramfs option
Adds kernel to grub by running grub-mkconfig
Automatically unmounts /boot, if mounted, after installation
Makes a copy of /usr/src/linux/.config to /boot/config-
Adds -x64 to naming because i don't know

v0.19 (20171122) [*] Now using tput instead of hardcoded terminal sequences for output
[!] Fixed silly little bug in bash version check
v0.20 (20190128) [!] Came Bash v5 and guess what. Yes, bash version check was apparently still broken :[

Sorry for late update