From 652df4f420c0b2e5bfe498239ba6793f4774de8a Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Mon, 11 Dec 2023 18:15:06 +0300 Subject: [PATCH] --- config/config_nvidia.mk | 2 +- mk/automatic.mk | 5 +++-- mk/iso.mk | 7 +++++++ scripts/chroot.sh | 16 ++++++++-------- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/config/config_nvidia.mk b/config/config_nvidia.mk index 20dc7975..478f8982 100644 --- a/config/config_nvidia.mk +++ b/config/config_nvidia.mk @@ -34,7 +34,7 @@ DISTRO_PKGS=\ f2fs-tools \ xfsprogs \ refind \ - nvidia-driver-535 + nvidia-driver-545 # Packages to install after (to avoid dependency issues) POST_DISTRO_PKGS=rsync diff --git a/mk/automatic.mk b/mk/automatic.mk index 64ccc5ab..a41e3399 100644 --- a/mk/automatic.mk +++ b/mk/automatic.mk @@ -6,8 +6,9 @@ USB=$(BUILD)/$(ISO_NAME).img CASPER_PATH=casper -VMLINUZ=vmlinuz-6.5.5-pikaos -INITRD=initrd.img-6.5.5-pikaos +VMLINUZ=vmlinuz-6.6.0-pikaos +INITRD=initrd.img-6.6.0-pikaos +HOST_KERNEL := $(shell uname -r) SED=\ s|CASPER_PATH|$(CASPER_PATH)|g; \ diff --git a/mk/iso.mk b/mk/iso.mk index 8bbff144..103ceab4 100644 --- a/mk/iso.mk +++ b/mk/iso.mk @@ -35,6 +35,13 @@ $(BUILD)/iso_casper.tag: $(BUILD)/live $(BUILD)/chroot.tag $(BUILD)/live.tag $(B # Update filesystem size sudo du -sx --block-size=1 "$(BUILD)/live" | cut -f1 > "$(BUILD)/iso/$(CASPER_PATH)/filesystem.size" + # Get rid of chroot kernel from image + sudo rm -rfv "$(BUILD)/live/boot/initrd.img-$(HOST_KERNEL)" + sudo rm -rfv "$(BUILD)/live/boot/vmlinuz-$(HOST_KERNEL)" + sudo rm -rfv "$(BUILD)/live/boot/config-$(HOST_KERNEL)" + sudo rm -rfv "$(BUILD)/live/usr/src/linux-headers-$(HOST_KERNEL)" + sudo rm -rfv "$(BUILD)/live/usr/src/linux-headers-$(HOST_KERNEL)" + # Rebuild filesystem image sudo mksquashfs "$(BUILD)/live" \ "$(BUILD)/iso/$(CASPER_PATH)/filesystem.squashfs" \ diff --git a/scripts/chroot.sh b/scripts/chroot.sh index 49aef721..d78588bf 100755 --- a/scripts/chroot.sh +++ b/scripts/chroot.sh @@ -52,14 +52,14 @@ sudo mkdir -p /usr/lib/firmware/ if echo "${INSTALL}" | grep nvidia-driver then echo "Workaround: Link chroot kernel to host kernel..." - ln -sfv /boot/config-6.5.5-pikaos /boot/config-$(uname -r) - ln -sfv /boot/initrd.img-6.5.5-pikaos /boot/initrd.img-$(uname -r) - ln -sfv /usr/src/linux-headers-6.5.5-pikaos /usr/src/linux-headers-$(uname -r) - ln -sfv /boot/System.map-6.5.5-pikaos /boot/System.map-$(uname -r) - ln -sfv /boot/vmlinuz-6.5.5-pikaos /boot/vmlinuz-$(uname -r) - sudo apt install nvidia-kernel-common-535 --yes --option Acquire::Retries=5 - sudo apt install linux-modules-nvidia-535-6.5.5-pikaos --yes --option Acquire::Retries=5 - sudo apt install nvidia-pika-kernel-module-535 --yes --option Acquire::Retries=5 + ln -sfv /boot/config-6.6.0-pikaos /boot/config-$(uname -r) + ln -sfv /boot/initrd.img-6.6.0-pikaos /boot/initrd.img-$(uname -r) + ln -sfv /usr/src/linux-headers-6.6.0-pikaos /usr/src/linux-headers-$(uname -r) + ln -sfv /boot/System.map-6.6.0-pikaos /boot/System.map-$(uname -r) + ln -sfv /boot/vmlinuz-6.6.0-pikaos /boot/vmlinuz-$(uname -r) + sudo apt install nvidia-kernel-common-545 --yes --option Acquire::Retries=5 + sudo apt install linux-modules-nvidia-545-6.6.0-pikaos --yes --option Acquire::Retries=5 + sudo apt install nvidia-pika-kernel-module-545 --yes --option Acquire::Retries=5 fi