Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
19b1023f34 | ||
|
e95d467bc9 | ||
|
25177827b8 | ||
|
62ecaf6d0a | ||
|
3b5bbadd10 | ||
|
d37183350c | ||
|
82953e99e1 | ||
|
668b6351de | ||
|
7e374b15bd | ||
|
e98e82418c | ||
|
ad1b0a92fc | ||
|
ef78270dd0 | ||
|
99370134de | ||
|
6a7a39fe12 | ||
|
ebf7fb6d0f | ||
|
41475bcf39 | ||
|
1b74798f26 | ||
|
f265fbd788 | ||
|
1fec952d9a | ||
|
d4587b7cb0 | ||
|
0988efda7d | ||
|
63cd7650f0 | ||
|
174e32f099 | ||
|
d42e08d723 | ||
|
1009603dd9 | ||
|
ebe3fe0345 | ||
|
8aef0df260 | ||
|
4eef5480dc | ||
|
2c1616e192 | ||
|
469dcd104b |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -1,7 +1,9 @@
|
|||||||
name: PikaOS Package Release
|
name: PikaOS Package Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '25 2 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -9,7 +9,6 @@ install:
|
|||||||
fakeroot dkms build --verbose --dkmstree "${MK_WORKDIR}" -m nvidia/"${DRIVER}" -k "${KERNEL}"
|
fakeroot dkms build --verbose --dkmstree "${MK_WORKDIR}" -m nvidia/"${DRIVER}" -k "${KERNEL}"
|
||||||
install -Dt "$(DESTDIR)/usr/lib/modules/"${KERNEL}"/extramodules" -m644 nvidia/"${DRIVER}"/"${KERNEL}"/"${CARCH}"/module/*
|
install -Dt "$(DESTDIR)/usr/lib/modules/"${KERNEL}"/extramodules" -m644 nvidia/"${DRIVER}"/"${KERNEL}"/"${CARCH}"/module/*
|
||||||
find "$(DESTDIR)" -name '*.ko' -exec xz -T1 {} +
|
find "$(DESTDIR)" -name '*.ko' -exec xz -T1 {} +
|
||||||
mkdir -p "$(DESTDIR)"/etc/modprobe.d/
|
mkdir -p "$(DESTDIR)"/usr/lib/pika/nvidia-"${DRIVER}"-"${KERNEL}"
|
||||||
install -D -m 644 blacklist-pika-nouveau.conf $(DESTDIR)/etc/modprobe.d/blacklist-pika-nouveau.conf
|
install -D -m 644 blacklist-pika-nouveau.conf "$(DESTDIR)"/usr/lib/pika/nvidia-"${DRIVER}"-"${KERNEL}"/blacklist-pika-nouveau.conf
|
||||||
mkdir -p "$(DESTDIR)"/etc/modules-load.d/
|
install -D -m 644 pika-nvidia.conf "$(DESTDIR)"/usr/lib/pika/nvidia-"${DRIVER}"-"${KERNEL}"/pika-nvidia.conf
|
||||||
install -D -m 644 pika-nvidia.conf $(DESTDIR)/etc/modules-load.d/pika-nvidia.conf
|
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
depmod
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a
|
||||||
|
# Update initramfs with new module config
|
||||||
update-initramfs -c -k all
|
update-initramfs -c -k all
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
depmod
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/*/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a || true
|
||||||
|
# Update initramfs with new module config
|
||||||
update-initramfs -c -k all
|
update-initramfs -c -k all
|
||||||
|
41
main.sh
41
main.sh
@ -1,23 +1,40 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
DRIVER=535
|
DRIVER=535
|
||||||
|
|
||||||
echo 'Package: *' > /etc/apt/preferences.d/0-a
|
echo "$(apt show kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3,4 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/KERNEL
|
||||||
echo 'Pin: release c=main' >> /etc/apt/preferences.d/0-a
|
|
||||||
echo 'Pin-Priority: 450' >> /etc/apt/preferences.d/0-a
|
apt show linux-modules-nvidia-$DRIVER-$(cat ./linux-nvidia-modules/KERNEL) 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ' > ./linux-nvidia-modules/pika_nvidia.txt
|
||||||
|
|
||||||
|
rm -rfv /etc/apt/preferences.d/*
|
||||||
|
echo 'Pin: release c=external' > /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Package: *' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin: release c=ubuntu' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/0-a
|
||||||
apt update -y
|
apt update -y
|
||||||
|
apt show nvidia-driver-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ' > ./linux-nvidia-modules/new_nvidia.txt
|
||||||
chmod +x ./linux-nvidia-modules/get_pwd.sh
|
echo "$(apt show nvidia-driver-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER
|
||||||
|
echo "$(apt show kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3,4 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/KERNEL
|
||||||
echo "$(apt-cache show nvidia-driver-$DRIVER | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER
|
echo "$(apt show nvidia-kernel-source-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER_VERSION
|
||||||
echo "$(apt-cache show kernel-pika | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3,4 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/KERNEL
|
echo "$(apt show nvidia-driver-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER_PIKA
|
||||||
echo "$(apt-cache show nvidia-kernel-source-$DRIVER | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER_VERSION
|
|
||||||
|
|
||||||
cd ./linux-nvidia-modules
|
cd ./linux-nvidia-modules
|
||||||
|
|
||||||
echo -e "linux-nvidia-modules ($(cat ./DRIVER)-$(cat ./KERNEL)-100pika1) mantic; urgency=medium\n\n * New Release\n\n -- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200" > debian/changelog
|
VERSION="$(cat ./DRIVER_VERSION)-$(cat ./KERNEL)-100pika6"
|
||||||
|
|
||||||
echo -e "Source: linux-nvidia-modules\nSection: graphics\nPriority: optional\nMaintainer: Ward Nakchbandi <hotrod.master@hotmail.com>\nStandards-Version: 4.6.1\nBuild-Depends: debhelper-compat (= 13), linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), dkms, fakeroot\nRules-Requires-Root: no\n\nPackage: linux-modules-nvidia-$DRIVER-$(cat ./KERNEL)\nArchitecture: linux-any\nDepends: linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), $(apt-cache show nvidia-dkms-$DRIVER | grep Depends: | head -n1 | cut -f2 -d":")\nConflicts: nvidia-6.5.0-pikaos-module-535, nvidia-$(cat ./KERNEL)-module-$DRIVER, "$(apt list 2>/dev/null | cut -d'/' -f1 | grep linux-modules-nvidia | grep $(cat ./KERNEL) | grep -v linux-modules-nvidia-$DRIVER-$(cat ./KERNEL) | sed ':a;N;$!ba;s/\n/, /g')", nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nProvides: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nReplaces: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nDescription: Prebuilt Nvidia module for PikaOS kernel\n\nPackage: nvidia-pika-kernel-module-$DRIVER\nArchitecture: linux-any\nDepends: linux-modules-nvidia-$DRIVER-$(cat ./KERNEL) $(echo '(= ${binary:Version})')\nDescription: DKMS NVIDIA PLACEHOLDER" > ./debian/control
|
echo -e "linux-nvidia-modules ("$VERSION") pikauwu; urgency=medium\n\n * New Release\n\n -- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200" > debian/changelog
|
||||||
echo -e "usr\netc" > ./debian/linux-modules-nvidia-$DRIVER-$(cat ./KERNEL).install
|
|
||||||
|
if echo $VERSION | grep "$(cat ./pika_nvidia.txt)"
|
||||||
|
then
|
||||||
|
echo "driver already built"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "Source: linux-nvidia-modules\nSection: graphics\nPriority: optional\nMaintainer: Ward Nakchbandi <hotrod.master@hotmail.com>\nStandards-Version: 4.6.1\nBuild-Depends: debhelper-compat (= 13), linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), dkms, fakeroot\nRules-Requires-Root: no\n\nPackage: linux-modules-nvidia-$DRIVER-$(cat ./KERNEL)\nArchitecture: linux-any\nDepends: linux-image-$(cat ./KERNEL), linux-headers-$(cat ./KERNEL), $(apt-cache show nvidia-dkms-$DRIVER | grep Depends: | head -n1 | cut -f2 -d":")\nConflicts: nvidia-6.5.0-pikaos-module-535, nvidia-$(cat ./KERNEL)-module-$DRIVER, "$(apt list 2>/dev/null | cut -d'/' -f1 | grep linux-modules-nvidia | grep $(cat ./KERNEL) | grep -v linux-modules-nvidia-$DRIVER-$(cat ./KERNEL) | sed ':a;N;$!ba;s/\n/, /g')", nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nProvides: linux-modules-nvidia-$(cat ./KERNEL), nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nReplaces: nvidia-dkms-$DRIVER (= $(cat DRIVER_VERSION))\nDescription: Prebuilt Nvidia module for PikaOS kernel\n\nPackage: nvidia-pika-kernel-module-$DRIVER\nArchitecture: linux-any\nDepends: linux-modules-nvidia-$DRIVER-$(cat ./KERNEL) $(echo '(= ${binary:Version})')\nDescription: DKMS NVIDIA PLACEHOLDER" > ./debian/control
|
||||||
|
echo -e "usr" > ./debian/linux-modules-nvidia-$DRIVER-$(cat ./KERNEL).install
|
||||||
|
|
||||||
|
echo "cp -vf /usr/lib/pika/nvidia-$(cat ./DRIVER)-$(cat ./KERNEL)/blacklist-pika-nouveau.conf /etc/modprobe.d/blacklist-pika-nouveau.conf" >> ./debian/postinst
|
||||||
|
echo "cp -vf /usr/lib/pika/nvidia-$(cat ./DRIVER)-$(cat ./KERNEL)/pika-nvidia.conf /etc/modules-load.d/pika-nvidia.conf" >> ./debian/postinst
|
||||||
|
|
||||||
echo -e "DRIVER=$(cat ./DRIVER)\nKERNEL=$(cat ./KERNEL)\nVERSION=$(cat ./DRIVER_VERSION)\nMK_WORKDIR=$(env | grep -w "PWD" | cut -c5-)\nCARCH=x86_64" > ./Makefile
|
echo -e "DRIVER=$(cat ./DRIVER)\nKERNEL=$(cat ./KERNEL)\nVERSION=$(cat ./DRIVER_VERSION)\nMK_WORKDIR=$(env | grep -w "PWD" | cut -c5-)\nCARCH=x86_64" > ./Makefile
|
||||||
cat ./Makefiletmp >> ./Makefile
|
cat ./Makefiletmp >> ./Makefile
|
||||||
|
Loading…
Reference in New Issue
Block a user