-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvidia_linux: Add version 440.44 for Linux 5.4.97-368
Create bee file with cp nvidia_linux-5.4.87-362-440.44-0.bee nvidia_linux-5.4.97-368-440.44-0.bee
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/env beesh | ||
|
||
NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}.run" | ||
|
||
SRCURL[0]="https://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" | ||
|
||
PATCHURL+=() | ||
|
||
LINUXPKG=${PKGEXTRANAME}.${ARCH} | ||
|
||
LINUXKLOCALVER=$(beeversion --format "%v.mx64.%r" "${LINUXPKG}") | ||
|
||
# '4.4.mx64.75' to '4.4.0.mx64.75' | ||
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then | ||
LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}" | ||
fi | ||
|
||
|
||
build_in_sourcedir | ||
sourcesubdir_append kernel | ||
|
||
: ${BEE_TMP_TMPDIR:=/tmp} | ||
|
||
mee_extract() { | ||
LINUXBUILDARCHIVE="${BEE_BUILDARCHIVEDIR}/${LINUXPKG}.beebuild.tar.bz2" | ||
|
||
print_info "extracting nvidia archive .." | ||
|
||
# If we are run in a user namespace (unsahre -U -r) we have uid 0. | ||
# tar, when started with uid 0, tries to restore file ownership from the | ||
# archive per default, which we are not allowed to do. | ||
# | ||
# Use a wrapper to add option --no-same-owner to tar. | ||
|
||
mkdir -p $F/tar-wrapper | ||
cat >$F/tar-wrapper/tar <<'EOF' | ||
#! /usr/bin/bash | ||
exec /usr/bin/tar "$@" --no-same-owner | ||
EOF | ||
chmod +x $F/tar-wrapper/tar | ||
|
||
start_cmd rmdir ${S} | ||
PATH=$F/tar-wrapper:$PATH start_cmd sh ${F}/${NVIDIA_ARCHIVE} -x --target ${S} | ||
|
||
if [ -d "/usr/src/linux/${LINUXPKG}/source" ] ; then | ||
LINUXSRCDIR="/usr/src/linux/${LINUXPKG}/source" | ||
elif [ -d "${BEE_TMP_TMPDIR}/${LINUXPKG}/source" ] ; then | ||
LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" | ||
else | ||
print_info "extracting linux build ${LINUXPKG} .." | ||
start_cmd gtar -xf "${LINUXBUILDARCHIVE}" -C ${BEE_TMP_TMPDIR} | ||
LINUXSRCDIR="${BEE_TMP_TMPDIR}/${LINUXPKG}/source" | ||
fi | ||
|
||
print_info "using kernel sources from ${LINUXSRCDIR} .." | ||
} | ||
|
||
mee_build_pre() { | ||
ln -s ${LINUXSRCDIR}/include ${S}/include | ||
} | ||
|
||
mee_build() { | ||
IGNORE_CC_MISMATCH=1 \ | ||
make SYSSRC=${LINUXSRCDIR} module | ||
} | ||
|
||
mee_install() { | ||
mkdir -pv ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION} | ||
|
||
cp -v *.ko ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/${PKGVERSION}/ | ||
|
||
ln -s ${PKGVERSION} ${D}${DATAROOTDIR}/nvidia/kernel/${LINUXKLOCALVER}/current | ||
} |