-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds the required things in order to include the nvidia-driver with the smallest footprint possible
- Loading branch information
Showing
6 changed files
with
156 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
binutils | ||
binutils-common | ||
binutils-x86-64-linux-gnu | ||
cpp | ||
cpp-12 | ||
dpkg-dev | ||
dkms | ||
gcc | ||
gcc-12 | ||
libasan8 | ||
libatomic1 | ||
libbinutils | ||
libcc1-0 | ||
libctf-nobfd0 | ||
libctf0 | ||
libdpkg-perl | ||
libgcc-12-dev | ||
libgprofng0 | ||
libisl23 | ||
libitm1 | ||
liblsan0 | ||
libmpc3 | ||
libmpfr6 | ||
libquadmath0 | ||
libtsan2 | ||
libubsan1 | ||
lsb-release | ||
make | ||
patch |
45 changes: 45 additions & 0 deletions
45
software-modules/base/02-firmware/nvidia/install-nvidia-drivers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
set -xe | ||
mapfile -t DKMS_DEPS < dkms-deps.txt | ||
mapfile -t NVIDIA_DEPS < nvidia-deps.txt | ||
DEB_NAME="nvidia-kernel-dkms_525.105.17-1_amd64" | ||
#@DEB_NAME="nvidia-kernel-dkms_470.182.03-1_amd64" | ||
OG_DEB="$DEB_NAME.deb" | ||
PATCHED_DEB="$DEB_NAME-patched.deb" | ||
LAB_FOLDER="/tmp/deb-lab-$$" | ||
EXTRACTED_DEB="$LAB_FOLDER/tmp-deb" | ||
mkdir -p "$LAB_FOLDER" | ||
cd "$LAB_FOLDER" | ||
######################## | ||
#### Prepare nvidia-DKMS | ||
#### INSTALLING AND REMOVING DEPENDENCY | ||
######################## | ||
apt download nvidia-kernel-dkms | ||
mkdir -p "$EXTRACTED_DEB" | ||
dpkg-deb -R "$OG_DEB" "$EXTRACTED_DEB" | ||
## Disable autoremove of dkms module on package removal | ||
echo '#!/bin/bash' > "$EXTRACTED_DEB/DEBIAN/prerm" | ||
# Remove dependency on dkms | ||
sed -i 's|, dkms (>= 3.0.3-4~)||' "$EXTRACTED_DEB/DEBIAN/control" | ||
## Repack patched deb | ||
dpkg-deb -b "$EXTRACTED_DEB" "$PATCHED_DEB" | ||
#rm -r "$LAB_FOLDER" | ||
#rm "$DEB_NAME.deb" | ||
|
||
###################### | ||
#### Install dkms deps | ||
###################### | ||
apt install --yes --no-install-recommends "${DKMS_DEPS[@]}" pahole | ||
######################## | ||
#### Install nvidia deps | ||
######################## | ||
apt install --yes --no-install-recommends "./$DEB_NAME-patched.deb" "${NVIDIA_DEPS[@]}" | ||
#rm "$DEB_NAME-patched.deb" | ||
|
||
###################### | ||
#### Remove dkms deps | ||
###################### | ||
apt remove --yes "${DKMS_DEPS[@]}" pahole nvidia-kernel-dkms | ||
apt autoremove --yes | ||
|
||
# savechanges /run/initramfs/memory/system/huronOS/base/02-firmware-nvidia.hsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
firmware-nvidia-gsp | ||
glx-alternative-mesa | ||
glx-alternative-nvidia | ||
glx-diversions | ||
libegl-nvidia0 | ||
libepoxy0 | ||
libfontenc1 | ||
libgl1-nvidia-glvnd-glx | ||
libglx-nvidia0 | ||
libnvidia-egl-wayland1 | ||
libnvidia-eglcore | ||
libnvidia-glcore | ||
libnvidia-ml1 | ||
libxaw7 | ||
libxcvt0 | ||
libxfont2 | ||
libxkbfile1 | ||
libxmu6 | ||
libxpm4 | ||
libxrandr2 | ||
libxt6 | ||
nvidia-alternative | ||
nvidia-driver-bin | ||
nvidia-driver-libs | ||
nvidia-egl-common | ||
nvidia-egl-icd | ||
nvidia-installer-cleanup | ||
nvidia-kernel-common | ||
nvidia-kernel-support | ||
nvidia-legacy-check | ||
nvidia-modprobe | ||
nvidia-support | ||
nvidia-vdpau-driver | ||
update-glx | ||
x11-xkb-utils | ||
xserver-common | ||
xserver-xorg-core |
26 changes: 26 additions & 0 deletions
26
software-modules/base/02-firmware/nvidia/prepare-kernel.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# nvidia-non-free.sh | ||
# Script to build the in-between firmware huronOS System Layer (.hsl) | ||
# for huronOS image. It packs the propietary nvidia drivers | ||
# for a more stable experience of the distribution. | ||
# | ||
# Copyright (C) 2022, huronOS Project: | ||
# <http://huronos.org> | ||
# | ||
# Licensed under the GNU GPL Version 2 | ||
# <http://www.gnu.org/licenses/gpl-2.0.html> | ||
# | ||
# Authors: | ||
# Enya Quetzalli <equetzal@huronos.org> | ||
|
||
set -xe | ||
|
||
KERNEL_HEADERS_BASE="/usr/lib/modules/$(uname -r)" | ||
|
||
LINUX_PATH="/mnt/ubuntu/home/dt3264/huronOS/kernel-stuff-6.1.31/linux" | ||
|
||
# Link the kernel source to where the headers should be | ||
mkdir -p "$KERNEL_HEADERS_BASE" | ||
ln -vnfs "$LINUX_PATH" "$KERNEL_HEADERS_BASE/build" | ||
ln -vnfs "$LINUX_PATH" "$KERNEL_HEADERS_BASE/source" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters