-
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 340.102 for Linux 4.9.48
nvidia_linux-4.9.48-175-340.102-0.bee was wrongly removed by 03018ea linux/nvidia: Purge obsolete packages The script deinemuddah:/root/purge-kernel.pl, which generated the patch, detected that 4.9.48-175-340.102 was not used by any system. Still it is not a good idea to remove the legacy driver from the default kernel, because the systems may upgrade to that kernel. purge-kernel.pl will be fixed, too.
- Loading branch information
Showing
1 changed file
with
90 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,90 @@ | ||
#!/bin/env beesh | ||
|
||
# calculate package extra versions and legacy level | ||
# - use extraversions to define nvidia extraversion and/or legacy level | ||
# - legacy level should be the last part of extraversion | ||
# - legacy level 2 to 5 will be calculated from version number.. | ||
|
||
mxnvversion=${PKGEXTRAVERSION##*_} | ||
: ${mxnvversion=current} | ||
|
||
nvextraversion="${PKGEXTRAVERSION_DASH}" | ||
|
||
if [ "${mxnvversion:0:6}" = "legacy" -o "${mxnvversion}" = "current" ] ; then | ||
nvextraversion="${nvextraversion%_*}" | ||
nvextraversion="${nvextraversion#-${mxnvversion}}" | ||
else | ||
if [ "${PKGVERSION:0:4}" = "340." ] ; then | ||
mxnvversion="legacy5" | ||
elif [ "${PKGVERSION:0:4}" = "304." ] ; then | ||
mxnvversion="legacy4" | ||
elif [ "${PKGVERSION:0:7}" = "173.14." ] ; then | ||
mxnvversion="legacy3" | ||
elif [ "${PKGVERSION:0:6}" = "96.43." ] ; then | ||
mxnvversion="legacy2" | ||
else | ||
mxnvversion="current" | ||
fi | ||
fi | ||
|
||
print_info "calculated mxnvversion = '${mxnvversion}'" | ||
print_info "calculated nvextraversion = '${nvextraversion}'" | ||
|
||
NVIDIA_ARCHIVE="NVIDIA-Linux-x86_64-${PKGVERSION}${nvextraversion}.run" | ||
|
||
SRCURL[0]="https://download.nvidia.com/XFree86/Linux-x86_64/${PKGVERSION}/${NVIDIA_ARCHIVE}" | ||
PATCHURL+=('/src/mariux/patches/nvidia_340_runtimefix_for_kernel_4.9.patch') | ||
|
||
LINUXPKG=${PKGEXTRANAME}.${ARCH} | ||
|
||
LINUXKLOCALVER=$(beeversion --format "%v%-e.mx64.%r" "${LINUXPKG}") | ||
|
||
# '4.4.mx64.75' to '4.4.0.mx64.75' | ||
# '4.8.6.mx64.115' to '4.8.6.mx64.115' | ||
# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95' | ||
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-rc[0-9]{1,2})?(\.mx64.*) ]]; then | ||
LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}" | ||
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 .." | ||
|
||
start_cmd rmdir ${S} | ||
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() { | ||
start_cmd 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}/${mxnvversion} | ||
} |