Open main menu

Funtoo β


Building a Kernel from Source

1,538 bytes removed, 5 years ago
blank prerequisites. It's too specific. Need more generic info.
=== Prerequisites ===
Regardless of the tools you already have installed, it is recommended to follow the steps below, even if you find them to be redundant.
First, we edit our <code>/etc/portage/[[make.conf]]</code>:
#These compiler flags are just tweaking (optimazation) and NOT necessary:
CFLAGS="-O2 -pipe -march=native -ftracer -fforce-addr"
CXXFLAGS="${CFLAGS} -fpermissive -fomit-frame-pointer"
KERNEL="symlink build"
USE="$KERNEL are your use flags...."
## These modules are available:
## DRACUT_MODULES="dracut_modules_biosdevname dracut_modules_btrfs dracut_modules_caps dracut_modules_crypt dracut_modules_crypt-gpg dracut_modules_dmraid dracut_modules_dmsquash-live dracut_modules_gensplash dracut_modules_iscsi dracut_modules_livenet dracut_modules_lvm dracut_modules_mdraid dracut_modules_multipath dracut_modules_nbd dracut_modules_nfs dracut_modules_plymouth dracut_modules_ssh-client dracut_modules_syslog"
## We will use these modules for LVM / LUKS:
DRACUT_MODULES="crypt lvm plymouth biosdevname dmraid crypt-gpg dmsquash-live ssh-client syslog"
Next, we set the package keywords by adding the following to <code>/etc/portage/package.use</code>:
sys-kernel/dracut dm net device-mapper crypt lvm
{{note|If you don't have lvm over encrypted LUKS you just add the "net" keyword here, or "selinux".}}
Next, we build our packages:
###i## emerge -av app-portage/gentoolkit sys-kernel/pf-sources sys-kernel/dracut sys-boot/plymouth sys-boot/plymouth-openrc-plugin
=== Preparing the kernel ===