diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a4e0f3a..7abf145 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,6 +27,10 @@ jobs: mv iso/packages-nvidia.x86_64 iso/packages.x86_64 mv iso/profiledef-nvidia.sh iso/profiledef.sh mv iso/airootfs/etc/mkinitcpio.conf-nvidia iso/airootfs/etc/mkinitcpio.conf + chmod +x iso/airootfs/etc/systemd/system/envycontrol.sh + rm -f iso/airootfs/etc/mkinitcpio.conf-amd + rm -f iso/airootfs/etc/systemd/amd.service + rm -f iso/airootfs/etc/systemd/amd.sh - name: Build Nvidia image run: mkarchiso -v iso/ - name: Upload Nvidia iso to the release @@ -39,7 +43,7 @@ jobs: md5sum iso_parts/* > iso_parts/md5sums-nvidia.txt gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }} - build-non-nvidia: + build-intel: permissions: contents: write runs-on: ubuntu-latest @@ -50,12 +54,17 @@ jobs: - uses: actions/checkout@v3 - name: Install Packages via Pacman run: pacman -Syu --noconfirm; pacman --noconfirm -S git archiso python python-pygithub github-cli p7zip zip - - name: remove packages and profile of nvidia versions + - name: remove packages and profile of amd/nvidia versions run: | rm -f iso/airootfs/etc/mkinitcpio.conf-nvidia - - name: Build non-Nvidia image + rm -f iso/airootfs/etc/mkinitcpio.conf-amd + rm -f iso/airootfs/etc/systemd/system/envycontrol.sh + rm -f iso/airootfs/etc/systemd/system/envycontrol.service + rm -f iso/airootfs/etc/systemd/amd.service + rm -f iso/airootfs/etc/systemd/amd.sh + - name: Build intel image run: mkarchiso -v iso/ - - name: Upload non-Nvidia iso to the release + - name: Upload intel iso to the release run: | rm -rf ./work cd ./out @@ -64,3 +73,38 @@ jobs: zip -s 1500m iso_parts/"$(ls *.iso)".zip "$(ls *.iso)" md5sum iso_parts/* > iso_parts/md5sums.txt gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }} + + + + build-amd: + permissions: + contents: write + runs-on: ubuntu-latest + container: + image: archlinux:latest + options: --privileged + steps: + - uses: actions/checkout@v3 + - name: Install Packages via Pacman + run: pacman -Syu --noconfirm; pacman --noconfirm -S git archiso python python-pygithub github-cli p7zip zip + - name: remove packages and profile of nvidia versions and Replace packages and profile with AMD versions + run: | + rm -f iso/airootfs/etc/mkinitcpio.conf-nvidia + rm -f iso/airootfs/etc/mkinitcpio.conf + mv iso/airootfs/etc/mkinitcpio.conf-amd iso/airootfs/etc/mkinitcpio.conf + mv iso/packages-amd.x86_64 iso/packages.x86_64 + mv iso/profiledef-amd.sh iso/profiledef.sh + rm -f iso/airootfs/etc/systemd/system/envycontrol.sh + rm -f iso/airootfs/etc/systemd/system/envycontrol.service + chmod +x iso/airootfs/etc/systemd/system/amd.sh + - name: Build AMD image + run: mkarchiso -v iso/ + - name: Upload AMD iso to the release + run: | + rm -rf ./work + cd ./out + mkdir iso_parts + md5sum "$(ls *.iso)" > iso_parts/iso-md5sums-amd.txt + zip -s 1500m iso_parts/"$(ls *.iso)".zip "$(ls *.iso)" + md5sum iso_parts/* > iso_parts/md5sums-amd.txt + gh release upload ${{ github.event.release.tag_name }} ./iso_parts/* -R ${{ github.repository }} diff --git a/iso/airootfs/etc/mkinitcpio.conf-amd b/iso/airootfs/etc/mkinitcpio.conf-amd new file mode 100644 index 0000000..2d5cc8c --- /dev/null +++ b/iso/airootfs/etc/mkinitcpio.conf-amd @@ -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=(amdgpu radeon) + +# 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 modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard) + +# 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/iso/airootfs/etc/systemd/system/amd.service b/iso/airootfs/etc/systemd/system/amd.service new file mode 100644 index 0000000..218609b --- /dev/null +++ b/iso/airootfs/etc/systemd/system/amd.service @@ -0,0 +1,8 @@ +[Unit] +Description=Enable AMD mode + +[Service] +ExecStart=/bin/bash /etc/systemd/system/amd.sh + +[Install] +WantedBy=multi-user.target diff --git a/iso/airootfs/etc/systemd/system/amd.sh b/iso/airootfs/etc/systemd/system/amd.sh new file mode 100644 index 0000000..749a602 --- /dev/null +++ b/iso/airootfs/etc/systemd/system/amd.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [[ -f "/etc/modprobe.d/amd.conf" ]]; then + systemctl disable amd.service +else + echo DRI_PRIME=1 >> /etc/environment + touch /etc/modprobe.d/amd.conf && echo options amdgpu si_support=1 >> /etc/modprobe.d/amd.conf && echo options amdgpu cik_support=1 >> /etc/modprobe.d/amd.conf + echo options radeon si_support=0 >> /etc/modprobe.d/amd.conf && echo options radeon cik_support=0 >> /etc/modprobe.d/amd.conf + mkinitcpio -P && grub-mkconfig -o /boot/grub/grub.cfg +fi diff --git a/iso/airootfs/etc/systemd/system/envycontrol.service b/iso/airootfs/etc/systemd/system/envycontrol.service new file mode 100644 index 0000000..2ede0e2 --- /dev/null +++ b/iso/airootfs/etc/systemd/system/envycontrol.service @@ -0,0 +1,8 @@ +[Unit] +Description=Enable Nvidia mode for envycontrol + +[Service] +ExecStart=/bin/bash /etc/systemd/system/envycontrol.sh + +[Install] +WantedBy=multi-user.target diff --git a/iso/airootfs/etc/systemd/system/envycontrol.sh b/iso/airootfs/etc/systemd/system/envycontrol.sh new file mode 100644 index 0000000..dd3b9fd --- /dev/null +++ b/iso/airootfs/etc/systemd/system/envycontrol.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [[ -f "/etc/modprobe.d/nvidia.conf" ]]; then + systemctl disable envycontrol.service +else + envycontrol -s nvidia --dm sddm +fi + diff --git a/iso/packages-amd.x86_64 b/iso/packages-amd.x86_64 new file mode 100644 index 0000000..2cea6ab --- /dev/null +++ b/iso/packages-amd.x86_64 @@ -0,0 +1,241 @@ +alsa-utils +amd-ucode +arch-install-scripts +b43-fwcutter +base +base-devel +bind +brltty +broadcom-wl-dkms +btrfs-progs +clonezilla +cloud-init +cryptsetup +darkhttpd +ddrescue +dhclient +dhcpcd +diffutils +dmidecode +dmraid +dnsmasq +dosfstools +e2fsprogs +edk2-shell +efibootmgr +espeakup +ethtool +exfatprogs +f2fs-tools +fatresize +fsarchiver +git +gnu-netcat +gpart +gpm +gptfdisk +grml-zsh-config +grub +hdparm +hyperv +intel-ucode +irssi +iw +iwd +jfsutils +kitty-terminfo +less +libfido2 +libusb-compat +linux +linux-headers +linux-atm +linux-firmware +linux-firmware-marvell +livecd-sounds +lsscsi +lvm2 +lynx +man-db +man-pages +mc +mdadm +memtest86+ +mkinitcpio +mkinitcpio-archiso +mkinitcpio-nfs-utils +modemmanager +mtools +nano +nbd +ndisc6 +nfs-utils +nilfs-utils +nmap +ntfs-3g +nvme-cli +open-iscsi +openconnect +openssh +openvpn +partclone +parted +partimage +pcsclite +pipewire +pipewire-pulse +pipewire-alsa +ppp +pptpclient +pv +python +python-psutil +python-systemd +refind +reiserfsprogs +rp-pppoe +rsync +rxvt-unicode-terminfo +screen +sdparm +sg3_utils +smartmontools +sof-firmware +squashfs-tools +sudo +syslinux +systemd-resolvconf +tcpdump +terminus-font +testdisk +tmux +tpm2-tss +udftools +usb_modeswitch +usbmuxd +usbutils +vim +virtualbox-guest-utils-nox +vpnc +which +wireplumber +wireless-regdb +wireless_tools +wpa_supplicant +wvdial +xfsprogs +xl2tpd +xorg-server +xorg-twm +xorg-xinit +zsh +archlinux-keyring +openssl-1.1 +openssl +gvfs +gvfs-mtp +networkmanager +sddm + +# Minnimal Plasma Desktop for start +bluedevil +breeze +breeze-gtk +breeze-plymouth +drkonqi +flatpak-kcm +kactivitymanagerd +kde-cli-tools +kde-gtk-config +kdecoration +kdeplasma-addons +kgamma +kglobalacceld +kinfocenter +kmenuedit +kpipewire +krdp +kscreen +kscreenlocker +ksshaskpass +ksystemstats +kwallet-pam +kwayland +kwin +kwrited +layer-shell-qt +libkscreen +libksysguard +libplasma +milou +ocean-sound-theme +oxygen +oxygen-sounds +plasma-activities +plasma-activities-stats +plasma-browser-integration +plasma-desktop +plasma-disks +plasma-firewall +plasma-integration +plasma-nm +plasma-pa +plasma-sdk +plasma-systemmonitor +plasma-thunderbolt +plasma-vault +plasma-workspace +plasma-workspace-wallpapers +plasma5support +plymouth-kcm +polkit-kde-agent +powerdevil +print-manager +qqc2-breeze-style +sddm-kcm +systemsettings +wacomtablet +xdg-desktop-portal-kde +dolphin +ark +unzip +unrar +firefox +konsole + +#systemutils +btop +xdg-user-dirs +neofetch-git +fastfetch + +# Drivers +mesa +vulkan-radeon +amdvlk +lib32-mesa +lib32-amdvlk +lib32-vulkan-radeon +xf86-video-amdgpu +lib32-vulkan-icd-loader +vulkan-icd-loader +xf86-video-ati +mesa-vdpau +lib32-mesa-vdpau +libva-mesa-driver +lib32-libva-mesa-driver + +# Gaming Stuff +steam +wine +wine-gecko +wine-mono +lutris +protonup-qt-bin + +#ParchLinux Core Packages +calamares +calamares-parch +os-prober +parch-base +parch-wallpapers diff --git a/iso/packages-nvidia.x86_64 b/iso/packages-nvidia.x86_64 index 528da5d..05c3ee2 100644 --- a/iso/packages-nvidia.x86_64 +++ b/iso/packages-nvidia.x86_64 @@ -212,10 +212,14 @@ fastfetch # Drivers nvidia-dkms nvidia-settings -bumblebee +envycontrol nvidia-prime nvidia-utils mesa +lib32-nvidia-utils +lib32-mesa +lib32-vulkan-icd-loader +vulkan-icd-loader # Gaming Stuff steam diff --git a/iso/packages.x86_64 b/iso/packages.x86_64 index 43981de..cdb49eb 100644 --- a/iso/packages.x86_64 +++ b/iso/packages.x86_64 @@ -209,11 +209,13 @@ xdg-user-dirs neofetch-git fastfetch vulkan-intel -vulkan-radeon -amdvlk +lib32-vulkan-intel # Drivers mesa +lib32-mesa +lib32-vulkan-icd-loader +vulkan-icd-loader # Gaming Stuff diff --git a/iso/profiledef-amd.sh b/iso/profiledef-amd.sh new file mode 100644 index 0000000..ff5c67e --- /dev/null +++ b/iso/profiledef-amd.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2034 + +iso_name="Parchlinux Gaming AMD" +iso_label="PARCHLINUX_GAMING_AMD$(date +%Y%m)" +iso_publisher="Parch Linux " +iso_application="Parch Linux Live/Rescue CD" +iso_version="$(date +%Y.%m.%d)" +install_dir="arch" +buildmodes=('iso') +bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' + 'uefi-x64.systemd-boot.esp' + 'uefi-x64.systemd-boot.eltorito') +arch="x86_64" +pacman_conf="pacman.conf" +airootfs_image_type="squashfs" +airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M') +file_permissions=( + ["/etc/shadow"]="0:0:400" + ["/root"]="0:0:750" + ["/root/.automated_script.sh"]="0:0:755" + ["/usr/local/bin/choose-mirror"]="0:0:755" + ["/usr/local/bin/Installation_guide"]="0:0:755" + ["/usr/local/bin/livecd-sound"]="0:0:755" +) diff --git a/iso/profiledef.sh b/iso/profiledef.sh index 3fdb6e1..fe42e6d 100644 --- a/iso/profiledef.sh +++ b/iso/profiledef.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # shellcheck disable=SC2034 -iso_name="Parchlinux Gaming" -iso_label="PARCHLINUX_GAMING$(date +%Y%m)" +iso_name="Parchlinux Gaming Intel" +iso_label="PARCHLINUX_GAMING_INTEL$(date +%Y%m)" iso_publisher="Parch Linux " iso_application="Parch Linux Live/Rescue CD" iso_version="$(date +%Y.%m.%d)"