Update gentoo.sh

This commit is contained in:
verita84 2023-12-13 09:18:37 -07:00
parent 4b1963c7a8
commit ed69b1ff4a

View File

@ -61,7 +61,7 @@ DISTCC_HOSTS+=(192.168.0.44/2 192.168.0.146/2 192.168.0.153/2 192.168.0.148/2 19
DISTCC_LISTEN="192.168.0.0/24"
DISTCC_CORES="30"
#Add Masked Packages to the Array
MASKED_PACKAGES+=(www-client/firefox net-im/element-desktop-bin media-libs/harfbuzz games-util/game-device-udev-rules dev-lang/python dev-python/pyrate-limiter dev-python/moddb dev-python/pypresence games-util/lutris games-util/steam-launcher app-misc/fastfetch net-im/telegram-desktop-bin dev-libs/yyjson)
MASKED_PACKAGES+=(dev-libs/nss www-client/firefox net-im/element-desktop-bin media-libs/harfbuzz games-util/game-device-udev-rules dev-lang/python dev-python/pyrate-limiter dev-python/moddb dev-python/pypresence games-util/lutris games-util/steam-launcher app-misc/fastfetch net-im/telegram-desktop-bin dev-libs/yyjson)
partitionDetection() {
#This is used for the installer to do script-based actions
@ -493,6 +493,7 @@ tweaks() {
echo
echo "[1] Reinstall Bootloader"
echo "[2] Chroot into existing OS"
echo "[3] Compile the Kernel"
echo
read -p 'Your Choice: ' choice
if [[ $choice = 1 ]]; then
@ -502,6 +503,10 @@ tweaks() {
set-devices
systemMounts
/usr/bin/chroot $TARGET /bin/bash
elif [[ $choice = 3 ]]; then
compile-kernel
else
tweaks
fi
}
@ -556,7 +561,7 @@ menu() {
tar xf $STAGE3_FILE -C $TARGET/
fstab
sed -i "s/-O2/-march=$CPU_TYPE -O2/i" $TARGET/etc/portage/make.conf
if [ -z "$DISTCC_LISTEN" ]; then
echo
echo "Not using DistCC"
@ -569,6 +574,7 @@ menu() {
MAKEOPTS="-j30 -l$(cat /proc/cpuinfo | grep -i processor | grep -vi 'model' | wc -l)"
echo "MAKEOPTS=\"$MAKEOPTS\"" >>$TARGET/etc/portage/make.conf
echo "FEATURES=\"distcc\"" >>$TARGET/etc/portage/make.conf
echo "L10N=\"en en-US\"" >>$TARGET/etc/portage/make.conf
fi
echo "VIDEO_CARDS=\"amdgpu radeon radeonsi fbdev intel vesa nvidia-drivers\"" >>$TARGET/etc/portage/make.conf
@ -707,6 +713,16 @@ set-devices() {
partitionDetection
}
compile-kernel() {
cd /usr/src/linux
#echo y | make localmodconfig
time make $MAKEOPTS CC="distcc gcc"
time make $MAKEOPTS CC="distcc gcc" modules_install
time make install
dracut --kver "$(eselect kernel list | grep \* | cut -d '-' -f2-3 | sed 's/\*//' | sed 's/ //g')-gentoo-dist" --force
grub-mkconfig -o /boot/grub/grub.cfg
}
if [ "$1" = "desktop" ]; then
desktop
elif [ "$1" = "tar" ]; then
@ -733,6 +749,8 @@ elif [ "$1" = "cockpit" ]; then
installCockpit
elif [ "$1" = "btrfs-tweaks" ]; then
btrfs-tweaks
elif [ "$1" = "compile-kernel" ]; then
compile-kernel
elif [ "$1" = "remove-snapshot" ]; then
remove-snapshots
elif [ "$1" = "help" ]; then