Compare commits
89 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
da51e63eba | ||
|
1e8b1f0634 | ||
b6aeba58d3 | |||
ae9805dc3a | |||
4d33e0a5a3 | |||
3ed0f018ee | |||
a8b395f209 | |||
085ee306e2 | |||
9cdba6eea6 | |||
e5596148a1 | |||
91c5813b05 | |||
|
baf333fbcc | ||
|
10b6cbb323 | ||
|
0dba378b8d | ||
|
81aaf4d57b | ||
|
b48ad39dc1 | ||
|
efd82d3e8b | ||
2f4c62ce3f | |||
5b78e675c3 | |||
fb24947d6d | |||
f7a0210d3d | |||
fa8eb36f2d | |||
004ace6d80 | |||
ae01d68472 | |||
42c358bc11 | |||
aab5126469 | |||
6003e2e8ba | |||
f5ad15f767 | |||
608fe08795 | |||
428b87cbc4 | |||
|
30b56e34c8 | ||
|
90724be5fd | ||
91892e6301 | |||
cc1d3b1495 | |||
04a109a277 | |||
da0c958f84 | |||
967e34ea5d | |||
|
4fc3599ba7 | ||
|
a2a1f17992 | ||
|
1e5e1c2398 | ||
|
ff7385b155 | ||
|
f791e8b089 | ||
|
fcc1d461ff | ||
|
ad22a80308 | ||
|
0130135b55 | ||
|
bb050e8ff4 | ||
|
4d4fe41287 | ||
|
1704f7c521 | ||
|
fd531d0360 | ||
|
b33de10c16 | ||
|
b4dd4a8786 | ||
|
b801de35f8 | ||
|
6473371271 | ||
|
d67ad43a16 | ||
|
082162d515 | ||
|
0c789dd9c2 | ||
|
f645dc62da | ||
|
62aea703af | ||
|
651545df4d | ||
|
ad35216c11 | ||
|
0e7a7e8939 | ||
|
4cdc868f53 | ||
|
89809d144e | ||
|
f068ad049c | ||
|
e2d5c6cdf7 | ||
|
2f88111a4e | ||
|
ad3ea28bac | ||
|
25a32cbf69 | ||
|
67118df27e | ||
|
8a810d8b98 | ||
|
804c38469a | ||
|
ddb696b47b | ||
|
21c0764c09 | ||
|
0e2d900f95 | ||
|
ccc5b78a0e | ||
|
ebc645cda0 | ||
|
16a485f48a | ||
|
9ca7922f9b | ||
|
c63e423e43 | ||
|
d9dbb97e97 | ||
|
1a26efff9b | ||
|
5fd53971f7 | ||
d6a5d401a0 | |||
d19b6dacf0 | |||
963846a512 | |||
9bd2c8bd3e | |||
7a5eef429a | |||
|
9a11f30200 | ||
|
38cd3799ca |
@ -1,7 +1,9 @@
|
|||||||
name: PikaOS Package Release
|
name: PikaOS Package Release (Build 535 module for latest kernel)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch
|
workflow_dispatch:
|
||||||
|
# schedule:
|
||||||
|
# - cron: '25 2 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -34,13 +36,13 @@ jobs:
|
|||||||
run: apt-get update -y
|
run: apt-get update -y
|
||||||
|
|
||||||
- name: Build Package
|
- name: Build Package
|
||||||
run: ./main.sh
|
run: chmod +x ./535.sh && ./535.sh
|
||||||
|
|
||||||
- name: Release Package
|
- name: Release Package
|
||||||
run: ./release.sh
|
run: ./release.sh
|
||||||
|
|
||||||
- name: Purge cache
|
- name: Purge cache
|
||||||
uses: jakejarvis/cloudflare-purge-action@master
|
uses: strrife/cloudflare-chunked-purge-action@master
|
||||||
env:
|
env:
|
||||||
# Zone is required by both authentication methods
|
# Zone is required by both authentication methods
|
||||||
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
@ -1,11 +1,13 @@
|
|||||||
name: PikaOS Package Release (On Slow github servers)
|
name: PikaOS Package Release (Build 545 module for latest kernel)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch
|
workflow_dispatch:
|
||||||
|
# schedule:
|
||||||
|
# - cron: '25 2 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu:latest
|
runs-on: self-hosted
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/pikaos-linux/pika-package-container:latest
|
image: ghcr.io/pikaos-linux/pika-package-container:latest
|
||||||
volumes:
|
volumes:
|
||||||
@ -34,13 +36,13 @@ jobs:
|
|||||||
run: apt-get update -y
|
run: apt-get update -y
|
||||||
|
|
||||||
- name: Build Package
|
- name: Build Package
|
||||||
run: ./main.sh
|
run: chmod +x ./545.sh && ./545.sh
|
||||||
|
|
||||||
- name: Release Package
|
- name: Release Package
|
||||||
run: ./release.sh
|
run: ./release.sh
|
||||||
|
|
||||||
- name: Purge cache
|
- name: Purge cache
|
||||||
uses: jakejarvis/cloudflare-purge-action@master
|
uses: strrife/cloudflare-chunked-purge-action@master
|
||||||
env:
|
env:
|
||||||
# Zone is required by both authentication methods
|
# Zone is required by both authentication methods
|
||||||
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
52
.github/workflows/550.yml
vendored
Normal file
52
.github/workflows/550.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: PikaOS Package Release (Build 550 module for latest kernel)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# schedule:
|
||||||
|
# - cron: '25 2 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: self-hosted
|
||||||
|
container:
|
||||||
|
image: ghcr.io/pikaos-linux/pika-package-container:latest
|
||||||
|
volumes:
|
||||||
|
- /proc:/proc
|
||||||
|
options: --privileged -it
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
id: import_gpg
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v5
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
name: id_rsa
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
|
||||||
|
- name: Update apt cache
|
||||||
|
run: apt-get update -y
|
||||||
|
|
||||||
|
- name: Build Package
|
||||||
|
run: chmod +x ./550.sh && ./550.sh
|
||||||
|
|
||||||
|
- name: Release Package
|
||||||
|
run: ./release.sh
|
||||||
|
|
||||||
|
- name: Purge cache
|
||||||
|
uses: strrife/cloudflare-chunked-purge-action@master
|
||||||
|
env:
|
||||||
|
# Zone is required by both authentication methods
|
||||||
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
||||||
|
|
||||||
|
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
||||||
|
PURGE_URLS: ${{ vars.PURGE_URLS }}
|
||||||
|
|
52
.github/workflows/555.yml
vendored
Normal file
52
.github/workflows/555.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: PikaOS Package Release (Build 555 module for latest kernel)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# schedule:
|
||||||
|
# - cron: '25 2 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: self-hosted
|
||||||
|
container:
|
||||||
|
image: ghcr.io/pikaos-linux/pika-package-container:latest
|
||||||
|
volumes:
|
||||||
|
- /proc:/proc
|
||||||
|
options: --privileged -it
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Import GPG key
|
||||||
|
id: import_gpg
|
||||||
|
uses: crazy-max/ghaction-import-gpg@v5
|
||||||
|
with:
|
||||||
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
name: id_rsa
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
|
||||||
|
- name: Update apt cache
|
||||||
|
run: apt-get update -y
|
||||||
|
|
||||||
|
- name: Build Package
|
||||||
|
run: chmod +x ./555.sh && ./555.sh
|
||||||
|
|
||||||
|
- name: Release Package
|
||||||
|
run: ./release.sh
|
||||||
|
|
||||||
|
- name: Purge cache
|
||||||
|
uses: strrife/cloudflare-chunked-purge-action@master
|
||||||
|
env:
|
||||||
|
# Zone is required by both authentication methods
|
||||||
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
||||||
|
|
||||||
|
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
||||||
|
PURGE_URLS: ${{ vars.PURGE_URLS }}
|
||||||
|
|
106
535.sh
Executable file
106
535.sh
Executable file
@ -0,0 +1,106 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
DRIVER=535
|
||||||
|
|
||||||
|
DRIVER_BUILT=true
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
apt show linux-modules-nvidia-$DRIVER-$(cat ./linux-nvidia-modules/KERNEL) || export DRIVER_BUILT=false && echo "This driver has never been built for this kernel version before."
|
||||||
|
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 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
|
||||||
|
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 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 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
|
||||||
|
|
||||||
|
cd ./linux-nvidia-modules
|
||||||
|
|
||||||
|
VERSION="$(cat ./DRIVER_VERSION)-$(cat ./KERNEL)-100pika7"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if [[ $DRIVER_BUILT == true ]]
|
||||||
|
then
|
||||||
|
if echo $VERSION | grep "$(cat ./pika_nvidia.txt)"
|
||||||
|
then
|
||||||
|
echo "driver already built"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
cat ./Makefiletmp >> ./Makefile
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postinst
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postrm
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Get build deps
|
||||||
|
apt-get build-dep ./ -y
|
||||||
|
apt download nvidia-kernel-source-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-kernel-source-$DRIVER*.deb /
|
||||||
|
apt download nvidia-dkms-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-dkms-$DRIVER*.deb /
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
dpkg-buildpackage --no-sign
|
||||||
|
echo 'DKMS MAKEFILE LOG:'
|
||||||
|
cat ./nvidia/$(cat ./DRIVER)/$(cat ./KERNEL)/x86_64/log/make.log || cat ./nvidia/$(cat ./DRIVER)/build/make.log
|
||||||
|
# Move the debs to output
|
||||||
|
cd ../
|
||||||
|
mkdir -p ./output
|
||||||
|
mv ./*.deb ./output/
|
106
545.sh
Executable file
106
545.sh
Executable file
@ -0,0 +1,106 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
DRIVER=545
|
||||||
|
|
||||||
|
DRIVER_BUILT=true
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
apt show linux-modules-nvidia-$DRIVER-$(cat ./linux-nvidia-modules/KERNEL) || export DRIVER_BUILT=false && echo "This driver has never been built for this kernel version before."
|
||||||
|
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 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
|
||||||
|
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 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 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
|
||||||
|
|
||||||
|
cd ./linux-nvidia-modules
|
||||||
|
|
||||||
|
VERSION="$(cat ./DRIVER_VERSION)-$(cat ./KERNEL)-100pika7"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if [[ $DRIVER_BUILT == true ]]
|
||||||
|
then
|
||||||
|
if echo $VERSION | grep "$(cat ./pika_nvidia.txt)"
|
||||||
|
then
|
||||||
|
echo "driver already built"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
cat ./Makefiletmp >> ./Makefile
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postinst
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postrm
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Get build deps
|
||||||
|
apt-get build-dep ./ -y
|
||||||
|
apt download nvidia-kernel-source-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-kernel-source-$DRIVER*.deb /
|
||||||
|
apt download nvidia-dkms-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-dkms-$DRIVER*.deb /
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
dpkg-buildpackage --no-sign
|
||||||
|
echo 'DKMS MAKEFILE LOG:'
|
||||||
|
cat ./nvidia/$(cat ./DRIVER)/$(cat ./KERNEL)/x86_64/log/make.log || cat ./nvidia/$(cat ./DRIVER)/build/make.log
|
||||||
|
# Move the debs to output
|
||||||
|
cd ../
|
||||||
|
mkdir -p ./output
|
||||||
|
mv ./*.deb ./output/
|
107
550.sh
Executable file
107
550.sh
Executable file
@ -0,0 +1,107 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
DRIVER=550
|
||||||
|
|
||||||
|
DRIVER_BUILT=true
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
apt show linux-modules-nvidia-$DRIVER-$(cat ./linux-nvidia-modules/KERNEL) || export DRIVER_BUILT=false && echo "This driver has never been built for this kernel version before."
|
||||||
|
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 'Package: *' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin: release c=ubuntu' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 950' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Package: *' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin: release c=external' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/0-a
|
||||||
|
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
|
||||||
|
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 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 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
|
||||||
|
|
||||||
|
cd ./linux-nvidia-modules
|
||||||
|
|
||||||
|
VERSION="$(cat ./DRIVER_VERSION)-$(cat ./KERNEL)-100pika7"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if [[ $DRIVER_BUILT == true ]]
|
||||||
|
then
|
||||||
|
if echo $VERSION | grep "$(cat ./pika_nvidia.txt)"
|
||||||
|
then
|
||||||
|
echo "driver already built"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
cat ./Makefiletmp >> ./Makefile
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postinst
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postrm
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Get build deps
|
||||||
|
apt-get build-dep ./ -y
|
||||||
|
apt download nvidia-kernel-source-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-kernel-source-$DRIVER*.deb /
|
||||||
|
apt download nvidia-dkms-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-dkms-$DRIVER*.deb /
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
dpkg-buildpackage --no-sign
|
||||||
|
echo 'DKMS MAKEFILE LOG:'
|
||||||
|
cat ./nvidia/$(cat ./DRIVER)/$(cat ./KERNEL)/x86_64/log/make.log || cat ./nvidia/$(cat ./DRIVER)/build/make.log
|
||||||
|
# Move the debs to output
|
||||||
|
cd ../
|
||||||
|
mkdir -p ./output
|
||||||
|
mv ./*.deb ./output/
|
107
555.sh
Normal file
107
555.sh
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
DRIVER=555
|
||||||
|
|
||||||
|
DRIVER_BUILT=true
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
apt show linux-modules-nvidia-$DRIVER-$(cat ./linux-nvidia-modules/KERNEL) || export DRIVER_BUILT=false && echo "This driver has never been built for this kernel version before."
|
||||||
|
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 'Package: *' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin: release c=ubuntu' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 950' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Package: *' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin: release c=external' >> /etc/apt/preferences.d/0-a
|
||||||
|
echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/0-a
|
||||||
|
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
|
||||||
|
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 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 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
|
||||||
|
|
||||||
|
cd ./linux-nvidia-modules
|
||||||
|
|
||||||
|
VERSION="$(cat ./DRIVER_VERSION)-$(cat ./KERNEL)-100pika7"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
if [[ $DRIVER_BUILT == true ]]
|
||||||
|
then
|
||||||
|
if echo $VERSION | grep "$(cat ./pika_nvidia.txt)"
|
||||||
|
then
|
||||||
|
echo "driver already built"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
cat ./Makefiletmp >> ./Makefile
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postinst
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF > ./debian/postrm
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Reset kernel modules
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.devname || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.alias.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.builtin.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.dep.bin || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.softdep || true
|
||||||
|
rm -rfv /usr/lib/modules/"$(cat ./KERNEL)"/modules.symbols.bin || true
|
||||||
|
# Regenerate kernel module configs
|
||||||
|
depmod -a "$(cat ./KERNEL)"
|
||||||
|
# Update initramfs with new module config
|
||||||
|
update-initramfs -c -k all
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Get build deps
|
||||||
|
apt-get build-dep ./ -y
|
||||||
|
apt download nvidia-kernel-source-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-kernel-source-$DRIVER*.deb /
|
||||||
|
apt download nvidia-dkms-$DRIVER -y
|
||||||
|
dpkg-deb -x ./nvidia-dkms-$DRIVER*.deb /
|
||||||
|
|
||||||
|
# Build package
|
||||||
|
dpkg-buildpackage --no-sign
|
||||||
|
echo 'DKMS MAKEFILE LOG:'
|
||||||
|
cat ./nvidia/$(cat ./DRIVER)/$(cat ./KERNEL)/x86_64/log/make.log || cat ./nvidia/$(cat ./DRIVER)/build/make.log
|
||||||
|
# Move the debs to output
|
||||||
|
cd ../
|
||||||
|
mkdir -p ./output
|
||||||
|
mv ./*.deb ./output/
|
@ -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
|
|
0
linux-nvidia-modules/debian/postinst
Normal file
0
linux-nvidia-modules/debian/postinst
Normal file
0
linux-nvidia-modules/debian/postrm
Normal file
0
linux-nvidia-modules/debian/postrm
Normal file
37
main.sh
37
main.sh
@ -1,37 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
DRIVER=525
|
|
||||||
|
|
||||||
chmod +x ./nvidia-pikaos-kernel-module/get_pwd.sh
|
|
||||||
|
|
||||||
echo "$(apt-cache show nvidia-driver-$DRIVER | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ')" > ./nvidia-pikaos-kernel-module/DRIVER
|
|
||||||
echo "$(apt-cache show kernel-pika | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3,4 -d"-" | tr -d ' ')" > ./nvidia-pikaos-kernel-module/KERNEL
|
|
||||||
echo "$(apt-cache show nvidia-kernel-source-$DRIVER | grep Version: | head -n1 | cut -f2 -d":" | tr -d ' ')" > ./nvidia-pikaos-kernel-module/DRIVER_VERSION
|
|
||||||
|
|
||||||
cd ./nvidia-pikaos-kernel-module
|
|
||||||
|
|
||||||
echo -e "nvidia-pikaos-kernel-module ($(cat ./DRIVER)-$(cat ./KERNEL)-99pika5.lunar) lunar; 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 "Source: nvidia-pikaos-kernel-module\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: nvidia-$(cat ./KERNEL)-module-$DRIVER\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-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
|
|
||||||
Depends: nvidia-$(cat ./KERNEL)-module-$DRIVER $(echo '(= ${binary:Version})')\nDescription: DKMS NVIDIA PLACEHOLDER" > ./debian/control
|
|
||||||
echo -e "usr\netc" > ./debian/nvidia-$(cat ./KERNEL)-module-$DRIVER.install
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
# Get build deps
|
|
||||||
apt-get build-dep ./ -y
|
|
||||||
apt download nvidia-kernel-source-$DRIVER -y
|
|
||||||
dpkg-deb -x ./nvidia-kernel-source-$DRIVER*.deb /
|
|
||||||
apt download nvidia-dkms-$DRIVER -y
|
|
||||||
dpkg-deb -x ./nvidia-dkms-$DRIVER*.deb /
|
|
||||||
|
|
||||||
# Build package
|
|
||||||
dpkg-buildpackage --no-sign
|
|
||||||
echo 'DKMS MAKEFILE LOG:'
|
|
||||||
cat ./nvidia/$(cat ./DRIVER)/$(cat ./KERNEL)/x86_64/log/make.log || cat ./nvidia/$(cat ./DRIVER)/build/make.log
|
|
||||||
# Move the debs to output
|
|
||||||
cd ../
|
|
||||||
mkdir -p ./output
|
|
||||||
mv ./*.deb ./output/
|
|
@ -1,3 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
depmod
|
|
||||||
update-initramfs -c -k all
|
|
@ -1,3 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
depmod
|
|
||||||
update-initramfs -c -k all
|
|
15
release.sh
15
release.sh
@ -1,11 +1,8 @@
|
|||||||
# Sign the packages
|
# send debs to server
|
||||||
dpkg-sig --sign builder ./output/*.deb
|
rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/incoming/
|
||||||
|
|
||||||
# Pull down existing ppa repo db files etc
|
# add debs to repo
|
||||||
rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo
|
ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pikauwu-main /srv/www/incoming/'
|
||||||
|
|
||||||
# Add the new package to the repo
|
# publish the repo
|
||||||
reprepro -C main -V --basedir ./output/repo/ includedeb lunar ./output/*.deb
|
ssh ferreo@direct.pika-os.com 'aptly publish update -batch -skip-contents -force-overwrite pikauwu filesystem:pikarepo:'
|
||||||
|
|
||||||
# Push the updated ppa repo to the server
|
|
||||||
rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user