-
Notifications
You must be signed in to change notification settings - Fork 0
/
5-Inside_Gentoo.sh
41 lines (33 loc) · 1.07 KB
/
5-Inside_Gentoo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
source /etc/profile
export PS1="(CHROOT) $PS1"
function pre_emerge {
emerge-webrsync
eselect news list
eselect news read
eselect profile list
}
function use_flags {
# Defaults
less /usr/portage/profiles/use.desc
# User Defined
echo 'CFLAGS="-march=native -O2 -pipe"' >> /etc/portage/make.conf
echo 'CXXFLAGS="${CFLAGS}"' >> /etc/portage/make.conf
num=$(nproc); let num++
echo MAKEOPTS=\"-j ${num}\" >> /etc/portage/make.conf
nano /etc/portage/make.conf
}
function kernel {
emerge --ask sys-kernel/gentoo-sources
# So that you can use `lspci`:
emerge --ask sys-apps/pciutils
cd /usr/src/linux
make menuconfig
num=$(nproc); let num++
make -j $num #; halt
make modules_install -j $num
make install
cp /boot/vmlinuz-*-gentoo /boot/efi/EFI/bootx64.efi
emerge --ask sys-kernel/linux-firmware
emerge --ask app-admin/mcelog
}