From 6775eaf9c686600590cf43fd338909db30da02b1 Mon Sep 17 00:00:00 2001 From: theVakhovskeIsTaken Date: Thu, 13 Jul 2023 17:28:28 +0000 Subject: [PATCH] Enable plymouth and add NVIDIA driver packages --- .gitignore | 1 + .../post_install/install_holoiso.sh | 9 ++- .../holoinstall/pre_install/iso_build_deps.sh | 19 ++++- .../holoinstall/pre_install/mkinitcpio.conf | 73 +++++++++++++++++++ gen_entries.sh | 11 ++- 5 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 airootfs/etc/holoinstall/pre_install/mkinitcpio.conf diff --git a/.gitignore b/.gitignore index 1791c1c..9be17c7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ steamdeck-20230323.1000-snapshot.manifest.pacman pkglist.x86_64.txt test2.sh test +efiboot/loader/entries/* diff --git a/airootfs/etc/holoinstall/post_install/install_holoiso.sh b/airootfs/etc/holoinstall/post_install/install_holoiso.sh index 5da0f7e..709c441 100644 --- a/airootfs/etc/holoinstall/post_install/install_holoiso.sh +++ b/airootfs/etc/holoinstall/post_install/install_holoiso.sh @@ -327,16 +327,17 @@ base_os_install() { clear } full_install() { - if [[ "${GAMEPAD_DRV}" == "1" ]]; then - echo "You're running this on Anbernic Win600. A suitable gamepad driver will be installed." - arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep win600-xpad-dkms) - fi if [[ "${FIRMWARE_INSTALL}" == "1" ]]; then echo "You're running this on a Steam Deck. linux-firmware-neptune will be installed to ensure maximum kernel-side compatibility." arch-chroot ${HOLO_INSTALL_DIR} pacman -Rdd --noconfirm linux-firmware arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep linux-firmware-neptune) arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P fi + if [[ -n "$(lspci -nn | grep -i vga | grep -Po "10de:[a-z0-9]{4}")" ]]; then + echo "NVIDIA GPU detected. Installing NVIDIA Drivers." + arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs/nv | grep pkg.tar.zst) + arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P + fi echo "\nConfiguring Steam Deck UI by default..." ln -s /usr/share/applications/steam.desktop ${HOLO_INSTALL_DIR}/etc/skel/Desktop/steam.desktop echo -e "[General]\nDisplayServer=wayland\n\n[Autologin]\nUser=${HOLOUSER}\nSession=gamescope-wayland.desktop\nRelogin=true\n\n[X11]\n# Janky workaround for wayland sessions not stopping in sddm, kills\n# all active sddm-helper sessions on teardown\nDisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround" >> ${HOLO_INSTALL_DIR}/etc/sddm.conf.d/autologin.conf diff --git a/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh b/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh index 5f28e04..bf42e3e 100644 --- a/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh +++ b/airootfs/etc/holoinstall/pre_install/iso_build_deps.sh @@ -42,14 +42,15 @@ cp /etc/holoinstall/post_install/pacman.conf /etc/pacman.conf pacman --overwrite="*" --noconfirm -S holoiso-updateclient wireplumber flatpak packagekit-qt5 rsync unzip sddm-wayland dkms steam-im-modules systemd-swap ttf-twemoji-default ttf-hack ttf-dejavu pkgconf pavucontrol partitionmanager gamemode lib32-gamemode cpupower bluez-plugins bluez-utils mv /etc/xdg/autostart/steam.desktop /etc/xdg/autostart/desktopshortcuts.desktop /etc/skel/Desktop/steamos-gamemode.desktop /etc/holoinstall/post_install_shortcuts pacman --noconfirm -S base-devel +sed -i 's/base udev autodetect/base udev plymouth autodetect/g' /etc/mkinitcpio.conf +mkinitcpio -P # Enable stuff systemctl enable sddm NetworkManager systemd-timesyncd cups bluetooth sshd # Download extra stuff -mkdir -p /etc/holoinstall/post_install/pkgs +mkdir -p /etc/holoinstall/post_install/pkgs/nv mkdir -p /etc/holoinstall/post_install/kernels -wget $(pacman -Sp win600-xpad-dkms) -P /etc/holoinstall/post_install/pkgs_addon wget $(pacman -Sp linux-firmware-neptune) -P /etc/holoinstall/post_install/pkgs_addon for kernel in $(cat /etc/holoinstall/post_install/kernel_list.bootstrap) @@ -57,9 +58,20 @@ do cp $(pacman -Sp $kernel | cut -c8-) /etc/holoinstall/post_install/kernels done +wget $(pacman -Sp extra-main/nvidia-dkms) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp extra-main/nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp multilib-main/lib32-nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp egl-wayland) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp egl-external-platform) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp extra-main/opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp multilib-main/lib32-opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp extra-main/nvtop) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp extra-main/nvidia-settings) -P /etc/holoinstall/post_install/pkgs/nv +wget $(pacman -Sp extra-main/nvidia-prime) -P /etc/holoinstall/post_install/pkgs/nv + # Workaround mkinitcpio bullshit so that i don't KMS after rebuilding ISO each time and having users reinstalling their fucking OS bullshit every goddamn time. rm /etc/mkinitcpio.conf -mv /etc/mkinitcpio.conf.pacnew /etc/mkinitcpio.conf +mv /etc/holoinstall/pre_install/mkinitcpio.conf /etc/mkinitcpio.conf rm /etc/mkinitcpio.d/* # This removes shitty unasked presets so that this thing can't overwrite it next time mkdir -p /etc/mkinitcpio.d @@ -68,3 +80,4 @@ rm -rf /etc/holoinstall/pre_install rm /etc/pacman.conf mv /etc/pacold /etc/pacman.conf rm /usr/bin/jupiter-plasma-bootstrap +systemctl disable qemu-guest-agent diff --git a/airootfs/etc/holoinstall/pre_install/mkinitcpio.conf b/airootfs/etc/holoinstall/pre_install/mkinitcpio.conf new file mode 100644 index 0000000..1f44c40 --- /dev/null +++ b/airootfs/etc/holoinstall/pre_install/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base udev plymouth autodetect modconf kms keyboard keymap consolefont block filesystems fsck) + +# COMPRESSION +# Use this to compress the initramfs image. By default, zstd compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" diff --git a/gen_entries.sh b/gen_entries.sh index 4c500f1..2ce6a3e 100644 --- a/gen_entries.sh +++ b/gen_entries.sh @@ -7,8 +7,15 @@ do if [ -z "$kernel" ]; then continue fi - echo -e "title HoloISO installer (${kernel}, Copy to RAM)\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel-copytoram.conf + if [[ "$kernel" != "linux-neptune" ]]; then + echo -e "title HoloISO installer (${kernel}, NVIDIA/Unverified devices, Copy to RAM)\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions quiet splash plymouth.nolog archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel-copytoram.conf count=$((count+1)) - echo -e "title HoloISO installer (${kernel})\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel.conf + echo -e "title HoloISO installer (${kernel}, NVIDIA/Unverified devices)\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions quiet splash plymouth.nolog archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel.conf count=$((count+1)) + else + echo -e "title HoloISO installer (${kernel}, Copy to RAM)\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions quiet splash plymouth.nolog archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel-copytoram.conf + count=$((count+1)) + echo -e "title HoloISO installer (${kernel})\nlinux /%INSTALL_DIR%/boot/x86_64/vmlinuz-${kernel}\ninitrd /%INSTALL_DIR%/boot/intel-ucode.img\ninitrd /%INSTALL_DIR%/boot/amd-ucode.img\ninitrd /%INSTALL_DIR%/boot/x86_64/initramfs-${kernel}.img\noptions quiet splash plymouth.nolog archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%" > ${PROFILEDIR}/efiboot/loader/entries/$count-$kernel.conf + count=$((count+1)) + fi done \ No newline at end of file