Merge branch 'kernel_4.17' into 'testing'

Kernel 4.18 and lts 4.4.150

See merge request packages/core!5
This commit is contained in:
Luca Giambonini 2018-08-19 23:07:55 +02:00
commit cc0ee4d1dc
76 changed files with 3053 additions and 10697 deletions

View File

@ -1,42 +1,38 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=acpi_call-lts
_pkgname=acpi_call
pkgver=1.1.0
pkgrel=8
pkgrel=11
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url='http://github.com/mkottman/acpi_call'
license=('GPL')
depends=("linux-lts>=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150")
makedepends=("linux-lts-headers=4.4.150")
provides=("${pkgname%-*}")
install="${pkgname%-*}.install"
source=("acpi_call-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0')
_extramodules=extramodules-CHAKRA-LTS
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1')
prepare() {
cd ${pkgname%-*}-${pkgver}
# Fix build with Linux >= 3.17
sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
}
build() {
cd ${pkgname%-*}-${pkgver}
make KVERSION="${_kver}"
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
cd ${pkgname%-*}-${pkgver}
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
find "$pkgdir" -name '*.ko' -exec xz {} +
install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d}
install -m 644 ${pkgname%-*}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/
gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${pkgname%-*}.ko
echo ${pkgname%-*} > "${pkgdir}"/usr/lib/modules-load.d/${pkgname}.conf
echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
install -dm 755 "${pkgdir}"/usr/share/${pkgname}
cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${pkgname}/
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}

3
acpi_call-lts/acpi_call.install Executable file → Normal file
View File

@ -1,5 +1,4 @@
post_install() {
depmod -a
echo ""
echo "[+] modprobe acpi_call"
echo ">>> run /usr/bin/turn_off_gpu.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
@ -7,7 +6,6 @@ post_install() {
}
post_upgrade() {
depmod -a
echo ""
echo "[+] modprobe acpi_call"
echo ">>> run /usr/bin/turn_off_gpu.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
@ -15,7 +13,6 @@ post_upgrade() {
}
post_remove() {
depmod -a
}
op=$1

View File

@ -1,21 +1,19 @@
# Source global configuration
source ../linux.conf
pkgname=acpi_call
pkgver=1.1.0
pkgrel=46
pkgrel=49
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url="http://github.com/mkottman/acpi_call"
license=('GPL')
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
install=acpi_call.install
depends=("linux=4.18.3")
makedepends=("linux-headers=4.18.3")
_extramodules=extramodules-CHAKRA
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1')
prepare() {
cd ${pkgname}-${pkgver}
cd $pkgbase-$pkgver
# Fix build with Linux >= 3.17
sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
@ -25,26 +23,17 @@ prepare() {
}
build() {
cd ${pkgname}-${pkgver}
make KVERSION=${_kver}
cd $pkgbase-$pkgver
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
cd ${pkgname}-${pkgver}
cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
find "$pkgdir" -name '*.ko' -exec xz {} +
install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d} "${pkgdir}"/usr/bin
install -m 644 ${pkgname}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}
gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${pkgname}.ko
echo ${pkgname} > "${pkgdir}"/usr/lib/modules-load.d/${pkgname}.conf
echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
install -dm 755 "${pkgdir}"/usr/share/${pkgname}
cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${pkgname}/
ln -s /usr/share/$pkgname/examples/turn_off_gpu.sh \
${pkgdir}/usr/bin/turn_off_gpu.sh
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/${pkgname}.install"
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}
# vim: ts=2 sw=2 et:

View File

@ -1,21 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo ""
echo "[+] modprobe acpi_call"
echo ">>> run /usr/bin/turn_off_gpu.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
echo ">>> There are a few scripts to use in /usr/share/acpi_call/examples - some for specific laptops => asus1215n.sh, dellL702X.sh, m11xr2.sh"
}
post_upgrade() {
post_install
}
post_remove() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
op=$1
shift
$op $*

View File

@ -1,37 +1,30 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=bbswitch-lts
_pkgname=bbswitch
pkgver=0.8
pkgrel=11
pkgrel=14
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url='http://github.com/Bumblebee-Project/bbswitch'
license=('GPL')
provides=('bbswitch')
install=bbswitch.install
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
_extramodules=extramodules-CHAKRA-LTS
depends=("linux-lts=4.4.150")
makedepends=("linux-lts-headers=4.4.150")
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
build() {
cd ${srcdir}/${_pkgname}-${pkgver}
make KDIR=/usr/lib/modules/${_kver}/build KVERSION=${_kver}
cd ${_pkgname}-${pkgver}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
cd ${srcdir}/${_pkgname}-${pkgver}
msg2 "Building module for $_kver..."
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
mkdir -p $pkgdir/usr/lib/modules/${_extramodules}
install -D -m644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
#automatically update bbswitch.install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/bbswitch.install"
cd ${_pkgname}-${pkgver}
# KDIR is necessary even when cleaning
install -Dm644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}/bbswitch.ko
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
}

View File

@ -1,15 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

View File

@ -1,35 +1,28 @@
# Source global configuration
source ../linux.conf
pkgname=bbswitch
pkgver=0.8
pkgrel=40
pkgrel=44
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url="http://github.com/Bumblebee-Project/bbswitch"
license=('GPL')
install=bbswitch.install
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
depends=("linux=4.18.3")
makedepends=("linux-headers=4.18.3")
_extramodules=extramodules-CHAKRA
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
prepare() {
#automatically update bbswitch.install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/bbswitch.install"
}
build() {
cd ${srcdir}/${pkgname}-${pkgver}
make KDIR=${_rootOfSourceTree}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
msg2 "Building module for $_kver..."
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
install -Dm644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}/bbswitch.ko
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
}

View File

@ -1,15 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

View File

@ -1,17 +1,14 @@
# Source global configuration
source ../linux-lts.conf
pkgname=broadcom-wl-lts
pkgver=6.30.223.271
pkgrel=7
pkgrel=9
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
arch=('x86_64')
url='http://www.broadcom.com/support/802.11/linux_sta.php'
license=('custom')
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150")
makedepends=("linux-lts-headers=4.4.150")
backup=('etc/modprobe.d/broadcom-wl-lts.conf')
install=install
_extramodules=extramodules-CHAKRA-LTS
source=("https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz"
#"http://ftp.de.debian.org/debian/pool/non-free/b/broadcom-sta/broadcom-sta_5.100.82.112.orig.tar.gz" "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz" we need the debian version, because upstream URL doesn't exist anymore
'modprobe.d'
@ -33,21 +30,25 @@ prepare() {
patch -p1 -i 002-rdtscl.patch
patch -p1 -i 005-debian-fix-kernel-warnings.patch
sed -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" \
-i src/wl/sys/wl_linux.c
}
build() {
cd "${srcdir}"
make -C $_rootOfSourceTree M=`pwd`
cd "${srcdir}"
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make -C /usr/lib/modules/"${KERNEL_VERSION}"/build M=`pwd`
}
package() {
cd "${srcdir}"
cd "${srcdir}"
install -D -m 755 wl.ko "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
install -Dm644 wl.ko "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
gzip "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m 644 ${srcdir}/modprobe.d "${pkgdir}"/etc/modprobe.d/broadcom-wl-lts.conf
install -Dm644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 modprobe.d "${pkgdir}/usr/lib/modprobe.d/broadcom-wl.conf"
}

View File

@ -1,9 +0,0 @@
post_upgrade() {
cd lib/modules
for i in extramodules-*; do depmod "$(cat "$i/version")"; done
cd ../..
}
post_install() {
post_upgrade
}

View File

@ -1,15 +1,14 @@
# Source global configuration
source ../linux.conf
pkgname=broadcom-wl
pkgver=6.30.223.271
pkgrel=22
pkgrel=26
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
url='http://www.broadcom.com/support/802.11/linux_sta.php'
arch=('x86_64')
license=('custom')
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
depends=("linux=4.18.3")
makedepends=("linux-headers=4.18.3")
_extramodules=extramodules-CHAKRA
source=("https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz"
#"http://ftp.de.debian.org/debian/pool/non-free/b/broadcom-sta/broadcom-sta_5.100.82.112.orig.tar.gz" "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz" we need the debian version, because upstream URL doesn't exist anymore
'modprobe.d'
@ -32,8 +31,6 @@ sha1sums=('1f568bb989d175813c5631c6629d9479eae6f3be'
'1d3fb939df5ba3b04e2949df6c5ed24f4a3d1f48'
'0b14384c82fe2a511d4f0210a682871b8906ae6a')
install=install
prepare() {
cd "${srcdir}"
@ -52,15 +49,17 @@ prepare() {
build() {
cd "${srcdir}"
make -C /usr/lib/modules/"${_kver}"/build M=`pwd`
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make -C /usr/lib/modules/"${KERNEL_VERSION}"/build M=`pwd`
}
package() {
cd "${srcdir}"
install -Dm644 wl.ko "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
install -Dm644 wl.ko "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
gzip "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
install -Dm644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 modprobe.d "${pkgdir}/usr/lib/modprobe.d/broadcom-wl.conf"

View File

@ -1,13 +0,0 @@
post_upgrade() {
for i in /usr/lib/modules/extramodules-*
do
if [ -f "$i/version" ]
then
depmod $(cat "$i/version")
fi
done
}
post_install() {
post_upgrade
}

View File

@ -2,8 +2,8 @@
# kernel.
pkgname=btrfs-progs
pkgver=4.16
pkgrel=4
pkgver=4.17
pkgrel=3
pkgdesc='Btrfs filesystem utilities'
arch=('x86_64')
depends=('glibc' 'util-linux' 'e2fsprogs' 'lzo2' 'zlib' 'zstd')
@ -15,7 +15,7 @@ source=("https://github.com/kdave/${pkgname}/archive/v${pkgver}.tar.gz"
'initcpio-hook-btrfs'
'btrfs-scrub@.service'
'btrfs-scrub@.timer')
md5sums=('8b071de61c6a33ba0e1fef78a6eed51c'
md5sums=('60c827c9946bc26697eede8b41742e77'
'7241ba3a4286d08da0d50b7176941112'
'b09688a915a0ec8f40e2f5aacbabc9ad'
'794b867e09451284c545bae112aa0cfd'

126
kernelupdate.sh Executable file
View File

@ -0,0 +1,126 @@
#!/bin/bash
# kdeupdate.sh
#
# Copyright © 2018 Luca Giambonini <almack@chakralinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
_script_name="kernel update"
# load functions
for subroutine in $_needed_functions ; do
source ~/bin/functions/$subroutine
done
# Get package information
function _package_info() {
local package="${1}"
local properties=("${@:2}")
for property in "${properties[@]}"; do
local -n nameref_property="${property}"
nameref_property=($(
#source "${package}/PKGBUILD"
source "PKGBUILD"
declare -n nameref_property="${property}"
echo "${nameref_property[@]}"))
done
}
build()
{
while read -r pkg; do
[[ $pkg =~ ^[:blank:]*$ ]] && continue
local comment_re="^[:blank:]*#"
[[ $pkg =~ $comment_re ]] && continue
local pkgrel_re="^[:blank:]*\+"
if [[ $pkg =~ $pkgrel_re ]]; then
echo "Pkgrel ++ '${pkg//+}'"
pushd "${pkg//+}" &>/dev/null
git reset HEAD PKGBUILD
git checkout PKGBUILD
_rel=$(cat PKGBUILD | grep pkgrel= | cut -d= -f2)
sed -i -e "s/pkgrel=$_rel/pkgrel=$(($_rel+1))/" PKGBUILD
sed -e "s/\(depends=([^>]*linux=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(depends=([^>]*linux-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-lts-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
git add PKGBUILD
popd &>/dev/null
continue
fi
echo "Processing: '$pkg'"
pushd "$pkg" &>/dev/null
# update version
sed -r "s|pkgver=.*|pkgver=$_kernelver|g" -i PKGBUILD
sed -r "s|pkgrel=.*|pkgrel=1|g" -i PKGBUILD
sed -e "s/\(depends=([^>]*linux=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(depends=([^>]*linux-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-lts-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
# update source link
#sed -r "s|https://download.kde.org/.*stable/|https://download.kde.org/${Branch}/|g" -i PKGBUILD
# update md5 sums
local pkgver pkgname source _pkgname _pkgbase
_package_info "$pkg" pkgver pkgname source _pkgname _pkgbase
if [ ! -z "$_pkgname" ]; then
pkgname=$_pkgname
fi
if [ ! -z "$_pkgbase" ]; then
pkgname=$_pkgbase
fi
#echo $pkgname
#_url="https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc"
#echo $_url
#_pkgfqn="${pkgname/5-/}-everywhere-src"
#echo $_pkgfqn
#_md5sums=$(curl "$_url" | grep "${_pkgfqn}" | grep .xz | cut -c-32)
#sed -r "s|md5sums=.*|md5sums=('$_md5sums'|g" -i PKGBUILD
#echo $_md5sums
updpkgsums
git add PKGBUILD
unset pkgver pkgname source _pkgname _pkgbase
popd &>/dev/null
done < "$1"
}
title "$_script_name"
if [ ! -f $1.conf ]; then
echo "$1.conf: File not found!"
exit 1
fi
# load the configurations
source $1.conf
time build "$1.order"

View File

@ -1,42 +1,32 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
source ../linux.conf
pkgname=linux-api-headers
pkgver=$_kernelver
pkgver=4.18.3
pkgrel=1
pkgdesc="Kernel headers sanitized for use in userspace"
arch=('x86_64')
url="http://www.gnu.org/software/libc"
license=('GPL2')
source=(https://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver%.*}.tar.{xz,sign}
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign})
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
'SKIP'
'634d3fd97e5d9d90262db0a9d62ed0a40043eb691d68bd4a545f907079610b56'
'SKIP')
source=(https://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver}.tar.{xz,sign})
md5sums=('b5aafaf94f7631fd48574e22a74eaa5a'
'SKIP')
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E') # Greg Kroah-Hartman
prepare() {
cd ${srcdir}/linux-${_basekernel}
[[ $pkgver != $_basekernel ]] && patch -p1 -i ${srcdir}/patch-${pkgver} || true
}
build() {
cd ${srcdir}/linux-${_basekernel}
cd linux-$pkgver
make mrproper
make headers_check
}
package() {
cd ${srcdir}/linux-${_basekernel}
make INSTALL_HDR_PATH=${pkgdir}/usr headers_install
cd linux-$pkgver
make INSTALL_HDR_PATH="$pkgdir/usr" headers_install
# use headers from libdrm
rm -r ${pkgdir}/usr/include/drm
rm -r "$pkgdir/usr/include/drm"
# clean-up unnecessary files generated during install
find ${pkgdir} \( -name .install -o -name ..install.cmd \) -delete
find "$pkgdir" \( -name .install -o -name ..install.cmd \) -delete
}

View File

@ -6,11 +6,5 @@
# These are the "basic variables" appliable for the LTS kernal group
_kernelname="-CHAKRA-LTS"
_kernelver=4.4.115
_kernelver=4.4.150
_basekernel=4.4
_extramodules=extramodules-${_basekernel}${_kernelname}
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
# Fetch from ndiswrapper-lts/PKGBUILD
_rootOfSourceTree=/usr/lib/modules/${_kver}/build/

View File

@ -10,15 +10,18 @@
# packages in the right order to solve
# the dependencies correctly
#
# adding '+' in front of the pkgname cause
# a pkgrel++ only (deps version updated too)
#core_packages
#linux-lts
vhba-module-lts
broadcom-wl-lts
acpi_call-lts
ndiswrapper-lts
linux-lts
+vhba-module-lts
+broadcom-wl-lts
+acpi_call-lts
+ndiswrapper-lts
bbswitch-lts
nvidia-lts
nvidia-304xx-lts
nvidia-340xx-lts
+bbswitch-lts
+nvidia-lts
+nvidia-304xx-lts
+nvidia-340xx-lts
+nvidia-390xx-lts

View File

@ -1,10 +1,8 @@
# Source global configuration
source ../linux-lts.conf
pkgbase="linux-lts"
pkgname=('linux-lts' 'linux-lts-headers' 'linux-lts-docs')
pkgver=${_kernelver}
_srcname=linux-${_basekernel}
pkgver=4.4.150
_srcname=linux-4.4
pkgrel=1
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
arch=('x86_64')
@ -12,7 +10,7 @@ license=('GPL2')
url="http://www.kernel.org"
options=('!strip')
source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz
# the main kernel config files
config.x86_64
# standard config files for mkinitcpio ramdisk
@ -20,9 +18,8 @@ source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
change-default-console-loglevel.patch)
md5sums=('9a78fa2eb6c68ca5a40ed5af08142599'
'SKIP'
'6f3e057f552161d8dbc534f58b50f107'
'SKIP'
'99d3696dce99d4eebf297fc542f6b22d'
'271ce334e88a808cda42184d69ebd95b'
'3c82e548b482a80cb344c083a9e4e259'
'232b52576a62c7a333e9fe7a1e1ca359'
'df7fceae6ee5d7e7be7b60ecd7f6bb35')
validpgpkeys=(
@ -30,8 +27,10 @@ validpgpkeys=(
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
_kernelname=-CHAKRA-LTS
prepare() {
cd ${srcdir}/linux-$_basekernel
cd ${srcdir}/$_srcname
# add upstream patch
msg "adding upstream patch"
@ -86,7 +85,7 @@ prepare() {
}
build() {
cd ${srcdir}/linux-$_basekernel
cd ${srcdir}/$_srcname
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
}
@ -106,7 +105,7 @@ package_linux-lts() {
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=${pkgname}.install
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
KARCH=x86
@ -141,10 +140,10 @@ package_linux-lts() {
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
# make room for external modules
ln -s "../extramodules-${_basekernel}${_kernelname:--CHAKRA-LTS}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
ln -s "../extramodules${_kernelname}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--CHAKRA-LTS}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--CHAKRA-LTS}/version"
mkdir -p "${pkgdir}/lib/modules/extramodules${_kernelname}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules${_kernelname}/version"
# Now we call depmod...
depmod -b "$pkgdir" -F System.map "$_kernver"
@ -162,7 +161,7 @@ package_linux-lts-headers() {
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
install -D -m644 Makefile \
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
install -D -m644 kernel/Makefile \
@ -284,7 +283,7 @@ package_linux-lts-headers() {
package_linux-lts-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux lts-kernel."
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"

View File

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.110-1 Kernel Configuration
# Linux/x86 4.4.147-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@ -37,7 +37,6 @@ CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_PGTABLE_LEVELS=4
@ -189,6 +188,7 @@ CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
CONFIG_RD_LZ4=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
@ -215,6 +215,7 @@ CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_ADVISE_SYSCALLS=y
@ -388,8 +389,10 @@ CONFIG_FREEZER=y
CONFIG_ZONE_DMA=y
CONFIG_SMP=y
CONFIG_X86_FEATURE_NAMES=y
CONFIG_X86_FAST_FEATURE_TESTS=y
CONFIG_X86_X2APIC=y
CONFIG_X86_MPPARSE=y
CONFIG_RETPOLINE=y
# CONFIG_X86_EXTENDED_PLATFORM is not set
CONFIG_X86_INTEL_LPSS=y
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
@ -1665,7 +1668,9 @@ CONFIG_NFC_ST_NCI_I2C=m
# CONFIG_NFC_NXP_NCI is not set
# CONFIG_NFC_S3FWRN5_I2C is not set
CONFIG_LWTUNNEL=y
CONFIG_DST_CACHE=y
CONFIG_HAVE_BPF_JIT=y
CONFIG_HAVE_EBPF_JIT=y
#
# Device Drivers
@ -1692,6 +1697,7 @@ CONFIG_DEV_COREDUMP=y
CONFIG_SYS_HYPERVISOR=y
# CONFIG_GENERIC_CPU_DEVICES is not set
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SPI=m
@ -2702,6 +2708,7 @@ CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET_ENABLE=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
@ -7314,7 +7321,6 @@ CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_OPTIMIZE_INLINING is not set
# CONFIG_DEBUG_ENTRY is not set
# CONFIG_DEBUG_NMI_SELFTEST is not set
# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
# CONFIG_X86_DEBUG_FPU is not set
# CONFIG_PUNIT_ATOM_DEBUG is not set

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,25 @@
# Contribution from Arch: https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/linux-tools
# Include global configuration
source ../linux.conf
pkgbase=linux-tools
pkgname=('cgroup_event_listener' 'cpupower' 'libtraceevent' 'perf'
'tmon' 'turbostat' 'usbip' 'x86_energy_perf_policy')
pkgver=${_kernelver}
pkgname=(
'cgroup_event_listener'
'cpupower'
'hyperv'
'libtraceevent'
'linux-tools-meta'
'perf'
'tmon'
'turbostat'
'usbip'
'x86_energy_perf_policy'
)
pkgver=4.18.3
pkgrel=1
license=('GPL2')
arch=('x86_64')
url='http://www.kernel.org'
options=('!strip')
makedepends=('git' "linux=${pkgver}")
makedepends=('git' "linux=4.18.3")
# split packages need all package dependencies set manually in makedepends
# kernel source deps
makedepends+=('asciidoc' 'xmlto')
@ -29,7 +37,7 @@ source=("http://www.kernel.org/pub/linux/kernel/v4.x/linux-${pkgver}.tar.xz"
'cpupower.systemd'
'cpupower.service'
'usbipd.service')
sha256sums=('fa919108d37f6b5dec85ce3fde3bc76eabdfc93b0b8c8386878ad8fb46168a4b'
sha256sums=('81ed3ccef8eb43cba3d2451a963d0bbaf5392af98435d42caee82d019a8443d4'
'4fa509949d6863d001075fa3e8671eff2599c046d20c98bb4a70778595cd1c3f'
'fbf6e0ce6eb0ef15703fe212958de6ca46e62188900b5e9f9272ed3cc9cfd54e'
'a89284d0ecb556ca53a66d1c2087b5fd6d0a901ab2769cd3aebb93f4478905dc'
@ -97,14 +105,21 @@ build() {
pushd linux-${pkgver}/tools/power/x86/turbostat
make
popd
msg2 'hv'
pushd linux-${pkgver}/tools/hv
CFLAGS+=' -DKVP_SCRIPTS_PATH=/usr/lib/hyperv/kvp_scripts/' make
popd
}
package_linux-tools-meta() {
pkgdesc='Linux kernel tools meta package'
groups=()
depends=(
'cgroup_event_listener'
'cpupower'
'hyperv'
'libtraceevent'
'perf'
'tmon'
@ -128,7 +143,7 @@ package_libtraceevent() {
package_perf() {
pkgdesc='Linux kernel performance auditing tool'
depends=('perl' 'python2' 'libnewt' 'elfutils' 'libunwind' 'binutils'
depends=('perl' 'python2' 'slang' 'elfutils' 'libunwind' 'binutils'
'numactl' 'audit')
optdepends=('gtk2: support GTK2 browser for perf report')
@ -144,9 +159,12 @@ package_perf() {
DESTDIR="$pkgdir" \
install install-man
cd "$pkgdir"
# add linker search path
mkdir "$pkgdir/etc/ld.so.conf.d"
echo '/usr/lib/perf' > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf"
# move completion in new directory
install -Dm644 etc/bash_completion.d/perf usr/share/bash-completion/completions/perf
rm -r etc
rm -r etc/bash_completion.d
# no exec on usr/share
find usr/share -type f -exec chmod a-x {} \;
}
@ -183,7 +201,7 @@ package_x86_energy_perf_policy() {
package_usbip() {
pkgdesc='An USB device sharing system over IP network'
depends=('glib2' 'sysfsutils' 'systemd')
depends=('glib2' 'sysfsutils' 'libsystemd')
pushd linux-${pkgver}/tools/usb/usbip
make install DESTDIR="$pkgdir"
@ -218,3 +236,14 @@ package_turbostat() {
cd linux-${pkgver}/tools/power/x86/turbostat
make install DESTDIR="$pkgdir"
}
package_hyperv() {
pkgdesc='Hyper-V tools'
depends=('glibc')
cd linux-${pkgver}/tools/hv
for _p in hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon; do
install -Dm755 "$_p" "$pkgdir/usr/bin/$_p"
done
install -dm755 "$pkgdir/usr/lib/hyperv/kvp_scripts"
}

View File

@ -6,11 +6,4 @@
# These are the "basic variables" appliable for the normal kernel group
_kernelname="-CHAKRA"
_kernelver=4.16.6
_basekernel=4.16
_extramodules=extramodules-${_basekernel}${_kernelname}
_kver="$(cat /lib/modules/${_extramodules}/version)"
# Fetch from ndiswrapper-lts/PKGBUILD
_rootOfSourceTree=/usr/lib/modules/${_kver}/build/
_kernelver=4.18.3

View File

@ -10,27 +10,26 @@
# packages in the right order to solve
# the dependencies correctly
#
# GitLab-CI:7
#core_packages
#linux
linux
linux-api-headers
linux-tools
vhba-module
broadcom-wl
acpi_call
ndiswrapper
btrfs-progs
r8168
+vhba-module
+broadcom-wl
+acpi_call
+ndiswrapper
+btrfs-progs
+r8168
bbswitch
nvidia-utils
nvidia
+bbswitch
+nvidia-utils
+nvidia
#../lib32/lib32-nvidia-utils
nvidia-304xx-utils
nvidia-304xx
nvidia-340xx-utils
nvidia-340xx
+nvidia-340xx-utils
+nvidia-340xx
+nvidia-390xx-utils
+nvidia-390xx

View File

@ -1,8 +1,8 @@
From f7a249814be46cbcb7bad48e4b1910baaf7f8961 Mon Sep 17 00:00:00 2001
Message-Id: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
From a2d2476ffec7d988b1a5396586869570e0d6f9d8 Mon Sep 17 00:00:00 2001
Message-Id: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
From: Serge Hallyn <serge.hallyn@canonical.com>
Date: Fri, 31 May 2013 19:12:12 +0100
Subject: [PATCH 1/5] add sysctl to disallow unprivileged CLONE_NEWUSER by
Subject: [PATCH 1/4] add sysctl to disallow unprivileged CLONE_NEWUSER by
default
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
@ -15,7 +15,7 @@ Signed-off-by: Daniel Micay <danielmicay@gmail.com>
3 files changed, 30 insertions(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index e5d9d405ae4e..c4be89c51f25 100644
index a5d21c42acfc..675eb3f3a1d1 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -103,6 +103,11 @@
@ -30,7 +30,7 @@ index e5d9d405ae4e..c4be89c51f25 100644
/*
* Minimum number of threads to boot the kernel
@@ -1591,6 +1596,10 @@ static __latent_entropy struct task_struct *copy_process(
@@ -1592,6 +1597,10 @@ static __latent_entropy struct task_struct *copy_process(
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
return ERR_PTR(-EINVAL);
@ -41,7 +41,7 @@ index e5d9d405ae4e..c4be89c51f25 100644
/*
* Thread groups must share signals as well, and detached threads
* can only be started up within the thread group.
@@ -2385,6 +2394,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
@@ -2386,6 +2395,12 @@ int ksys_unshare(unsigned long unshare_flags)
if (unshare_flags & CLONE_NEWNS)
unshare_flags |= CLONE_FS;
@ -55,7 +55,7 @@ index e5d9d405ae4e..c4be89c51f25 100644
if (err)
goto bad_unshare_out;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f98f28c12020..7256d339a32a 100644
index 6a78cf70761d..35a1d24282f4 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -105,6 +105,9 @@ extern int core_uses_pid;
@ -68,7 +68,7 @@ index f98f28c12020..7256d339a32a 100644
extern int pid_max;
extern int pid_max_min, pid_max_max;
extern int percpu_pagelist_fraction;
@@ -515,6 +518,15 @@ static struct ctl_table kern_table[] = {
@@ -519,6 +522,15 @@ static struct ctl_table kern_table[] = {
.proc_handler = proc_dointvec,
},
#endif
@ -99,5 +99,5 @@ index 246d4d4ce5c7..f64432b45cec 100644
static DEFINE_MUTEX(userns_state_mutex);
--
2.17.0
2.18.0

View File

@ -0,0 +1,242 @@
From bc49947e26285cf644492f9d58981e3c985d8c76 Mon Sep 17 00:00:00 2001
Message-Id: <bc49947e26285cf644492f9d58981e3c985d8c76.1531335939.git.jan.steffens@gmail.com>
In-Reply-To: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
References: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
From: Jani Nikula <jani.nikula@intel.com>
Date: Wed, 16 May 2018 11:01:10 +0300
Subject: [PATCH 2/4] Revert "drm/i915/edp: Allow alternate fixed mode for eDP
if available."
This reverts commit dc911f5bd8aacfcf8aabd5c26c88e04c837a938e.
Per the report, no matter what display mode you select with xrandr, the
i915 driver will always select the alternate fixed mode. For the
reporter this means that the display will always run at 40Hz which is
quite annoying. This may be due to the mode comparison.
But there are some other potential issues. The choice of alt_fixed_mode
seems dubious. It's the first non-preferred mode, but there are no
guarantees that the only difference would be refresh rate. Similarly,
there may be more than one preferred mode in the probed modes list, and
the commit changes the preferred mode selection to choose the last one
on the list instead of the first.
(Note that the probed modes list is the raw, unfiltered, unsorted list
of modes from drm_add_edid_modes(), not the pretty result after a
drm_helper_probe_single_connector_modes() call.)
Finally, we already have eerily similar code in place to find the
downclock mode for DRRS that seems like could be reused here.
Back to the drawing board.
Note: This is a hand-crafted revert due to conflicts. If it fails to
backport, please just try reverting the original commit directly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469
Reported-by: Rune Petersen <rune@megahurts.dk>
Reported-by: Mark Spencer <n7u4722r35@ynzlx.anonbox.net>
Fixes: dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
Cc: Clint Taylor <clinton.a.taylor@intel.com>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.14+
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180516080110.22770-1-jani.nikula@intel.com
---
drivers/gpu/drm/i915/intel_dp.c | 38 ++++--------------------------
drivers/gpu/drm/i915/intel_drv.h | 2 --
drivers/gpu/drm/i915/intel_dsi.c | 2 +-
drivers/gpu/drm/i915/intel_dvo.c | 2 +-
drivers/gpu/drm/i915/intel_lvds.c | 3 +--
drivers/gpu/drm/i915/intel_panel.c | 6 -----
6 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index cd6e87756509..492b0cb9bb2b 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1674,23 +1674,6 @@ static int intel_dp_compute_bpp(struct intel_dp *intel_dp,
return bpp;
}
-static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
- struct drm_display_mode *m2)
-{
- bool bres = false;
-
- if (m1 && m2)
- bres = (m1->hdisplay == m2->hdisplay &&
- m1->hsync_start == m2->hsync_start &&
- m1->hsync_end == m2->hsync_end &&
- m1->htotal == m2->htotal &&
- m1->vdisplay == m2->vdisplay &&
- m1->vsync_start == m2->vsync_start &&
- m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
- return bres;
-}
-
bool
intel_dp_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
@@ -1737,16 +1720,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
- struct drm_display_mode *panel_mode =
- intel_connector->panel.alt_fixed_mode;
- struct drm_display_mode *req_mode = &pipe_config->base.mode;
-
- if (!intel_edp_compare_alt_mode(req_mode, panel_mode))
- panel_mode = intel_connector->panel.fixed_mode;
-
- drm_mode_debug_printmodeline(panel_mode);
-
- intel_fixed_panel_mode(panel_mode, adjusted_mode);
+ intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
+ adjusted_mode);
if (INTEL_GEN(dev_priv) >= 9) {
int ret;
@@ -6123,7 +6098,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
struct drm_i915_private *dev_priv = to_i915(dev);
struct drm_connector *connector = &intel_connector->base;
struct drm_display_mode *fixed_mode = NULL;
- struct drm_display_mode *alt_fixed_mode = NULL;
struct drm_display_mode *downclock_mode = NULL;
bool has_dpcd;
struct drm_display_mode *scan;
@@ -6178,14 +6152,13 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
}
intel_connector->edid = edid;
- /* prefer fixed mode from EDID if available, save an alt mode also */
+ /* prefer fixed mode from EDID if available */
list_for_each_entry(scan, &connector->probed_modes, head) {
if ((scan->type & DRM_MODE_TYPE_PREFERRED)) {
fixed_mode = drm_mode_duplicate(dev, scan);
downclock_mode = intel_dp_drrs_init(
intel_connector, fixed_mode);
- } else if (!alt_fixed_mode) {
- alt_fixed_mode = drm_mode_duplicate(dev, scan);
+ break;
}
}
@@ -6222,8 +6195,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
pipe_name(pipe));
}
- intel_panel_init(&intel_connector->panel, fixed_mode, alt_fixed_mode,
- downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
intel_connector->panel.backlight.power = intel_edp_backlight_power;
intel_panel_setup_backlight(connector, pipe);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index a80fbad9be0f..7f3e83f17adb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -269,7 +269,6 @@ struct intel_encoder {
struct intel_panel {
struct drm_display_mode *fixed_mode;
- struct drm_display_mode *alt_fixed_mode;
struct drm_display_mode *downclock_mode;
/* backlight */
@@ -1820,7 +1819,6 @@ void intel_overlay_reset(struct drm_i915_private *dev_priv);
/* intel_panel.c */
int intel_panel_init(struct intel_panel *panel,
struct drm_display_mode *fixed_mode,
- struct drm_display_mode *alt_fixed_mode,
struct drm_display_mode *downclock_mode);
void intel_panel_fini(struct intel_panel *panel);
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 384b37e2da70..f349b3920199 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -1852,7 +1852,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
connector->display_info.width_mm = fixed_mode->width_mm;
connector->display_info.height_mm = fixed_mode->height_mm;
- intel_panel_init(&intel_connector->panel, fixed_mode, NULL, NULL);
+ intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
intel_panel_setup_backlight(connector, INVALID_PIPE);
intel_dsi_add_properties(intel_connector);
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 6604806f89d5..61d908e0df0e 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -542,7 +542,7 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
*/
intel_panel_init(&intel_connector->panel,
intel_dvo_get_current_mode(intel_encoder),
- NULL, NULL);
+ NULL);
intel_dvo->panel_wants_dither = true;
}
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 34dd1e5233ac..48f618dc9abb 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1180,8 +1180,7 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
out:
mutex_unlock(&dev->mode_config.mutex);
- intel_panel_init(&intel_connector->panel, fixed_mode, NULL,
- downclock_mode);
+ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode);
intel_panel_setup_backlight(connector, INVALID_PIPE);
lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder);
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 41d00b1603e3..b443278e569c 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1928,30 +1928,24 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
int intel_panel_init(struct intel_panel *panel,
struct drm_display_mode *fixed_mode,
- struct drm_display_mode *alt_fixed_mode,
struct drm_display_mode *downclock_mode)
{
intel_panel_init_backlight_funcs(panel);
panel->fixed_mode = fixed_mode;
- panel->alt_fixed_mode = alt_fixed_mode;
panel->downclock_mode = downclock_mode;
return 0;
}
void intel_panel_fini(struct intel_panel *panel)
{
struct intel_connector *intel_connector =
container_of(panel, struct intel_connector, panel);
if (panel->fixed_mode)
drm_mode_destroy(intel_connector->base.dev, panel->fixed_mode);
- if (panel->alt_fixed_mode)
- drm_mode_destroy(intel_connector->base.dev,
- panel->alt_fixed_mode);
-
if (panel->downclock_mode)
drm_mode_destroy(intel_connector->base.dev,
panel->downclock_mode);
--
2.18.0

View File

@ -1,42 +0,0 @@
From 7f9a95491f506700d46db581ef3734ced7c9618b Mon Sep 17 00:00:00 2001
Message-Id: <7f9a95491f506700d46db581ef3734ced7c9618b.1524575789.git.jan.steffens@gmail.com>
In-Reply-To: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
References: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
From: Jim Bride <jim.bride@linux.intel.com>
Date: Mon, 6 Nov 2017 13:38:57 -0800
Subject: [PATCH 2/5] drm/i915/edp: Only use the alternate fixed mode if it's
asked for
In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for
eDP if available."), the patch allows for the use of an alternate fixed
mode if it is available, but the patch was not ensuring that the only
time the alternate mode is used is when it is specifically requested.
This patch adds an additional comparison to intel_edp_compare_alt_mode
to ensure that we only use the alternate mode if it is directly
requested.
Fixes: dc911f5bd8aac ("Allow alternate fixed mode for eDP if available.")
Cc: David Weinehall <david.weinehall@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a29868cd30c7..b6d07b615b12 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1597,7 +1597,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
m1->vdisplay == m2->vdisplay &&
m1->vsync_start == m2->vsync_start &&
m1->vsync_end == m2->vsync_end &&
- m1->vtotal == m2->vtotal);
+ m1->vtotal == m2->vtotal &&
+ m1->vrefresh == m2->vrefresh);
return bres;
}
--
2.17.0

View File

@ -0,0 +1,132 @@
From 598ca9d1cc714cb530141c20a90dc25d34f861fd Mon Sep 17 00:00:00 2001
Message-Id: <598ca9d1cc714cb530141c20a90dc25d34f861fd.1531335939.git.jan.steffens@gmail.com>
In-Reply-To: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
References: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: Tue, 22 May 2018 14:16:50 +0300
Subject: [PATCH 3/4] ACPI / watchdog: Prefer iTCO_wdt always when WDAT table
uses RTC SRAM
After we added quirk for Lenovo Z50-70 it turns out there are at least
two more systems where WDAT table includes instructions accessing RTC
SRAM. Instead of quirking each system separately, look for such
instructions in the table and automatically prefer iTCO_wdt if found.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199033
Reported-by: Arnold Guy <aurnoldg@gmail.com>
Reported-by: Alois Nespor <nespor@fssp.cz>
Reported-by: Yury Pakin <zxwarior@gmail.com>
Reported-by: Ihor Chyhin <ihorchyhin@ukr.net>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/acpi/acpi_watchdog.c | 72 ++++++++++++++++++++++--------------
1 file changed, 45 insertions(+), 27 deletions(-)
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c
index 4bde16fb97d8..95600309ce42 100644
--- a/drivers/acpi/acpi_watchdog.c
+++ b/drivers/acpi/acpi_watchdog.c
@@ -12,54 +12,72 @@
#define pr_fmt(fmt) "ACPI: watchdog: " fmt
#include <linux/acpi.h>
-#include <linux/dmi.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include "internal.h"
-static const struct dmi_system_id acpi_watchdog_skip[] = {
- {
- /*
- * On Lenovo Z50-70 there are two issues with the WDAT
- * table. First some of the instructions use RTC SRAM
- * to store persistent information. This does not work well
- * with Linux RTC driver. Second, more important thing is
- * that the instructions do not actually reset the system.
- *
- * On this particular system iTCO_wdt seems to work just
- * fine so we prefer that over WDAT for now.
- *
- * See also https://bugzilla.kernel.org/show_bug.cgi?id=199033.
- */
- .ident = "Lenovo Z50-70",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "20354"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Z50-70"),
- },
- },
- {}
-};
+#ifdef CONFIG_RTC_MC146818_LIB
+#include <linux/mc146818rtc.h>
+
+/*
+ * There are several systems where the WDAT table is accessing RTC SRAM to
+ * store persistent information. This does not work well with the Linux RTC
+ * driver so on those systems we skip WDAT driver and prefer iTCO_wdt
+ * instead.
+ *
+ * See also https://bugzilla.kernel.org/show_bug.cgi?id=199033.
+ */
+static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
+{
+ const struct acpi_wdat_entry *entries;
+ int i;
+
+ entries = (struct acpi_wdat_entry *)(wdat + 1);
+ for (i = 0; i < wdat->entries; i++) {
+ const struct acpi_generic_address *gas;
+
+ gas = &entries[i].register_region;
+ if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
+ switch (gas->address) {
+ case RTC_PORT(0):
+ case RTC_PORT(1):
+ case RTC_PORT(2):
+ case RTC_PORT(3):
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+#else
+static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
+{
+ return false;
+}
+#endif
static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
{
const struct acpi_table_wdat *wdat = NULL;
acpi_status status;
if (acpi_disabled)
return NULL;
- if (dmi_check_system(acpi_watchdog_skip))
- return NULL;
-
status = acpi_get_table(ACPI_SIG_WDAT, 0,
(struct acpi_table_header **)&wdat);
if (ACPI_FAILURE(status)) {
/* It is fine if there is no WDAT */
return NULL;
}
+ if (acpi_watchdog_uses_rtc(wdat)) {
+ pr_info("Skipping WDAT on this system because it uses RTC SRAM\n");
+ return NULL;
+ }
+
return wdat;
}
--
2.18.0

View File

@ -1,29 +0,0 @@
From be536681bd2439bf8e95df124fa282cf4a2e7846 Mon Sep 17 00:00:00 2001
Message-Id: <be536681bd2439bf8e95df124fa282cf4a2e7846.1524575789.git.jan.steffens@gmail.com>
In-Reply-To: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
References: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 6 Apr 2018 16:19:38 +0200
Subject: [PATCH 3/5] Partially revert "swiotlb: remove various exports"
This partially reverts commit 4bd89ed39b2ab8dc4ac4b6c59b07d420b0213bec.
The proprietary NVIDIA driver needs one of the exports.
---
lib/swiotlb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 44f7eb408fdb..0bb1bb65ad6b 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -1016,6 +1016,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
}
return nelems;
}
+EXPORT_SYMBOL(swiotlb_map_sg_attrs);
/*
* Unmap a set of streaming mode DMA translations. Again, cpu read rules
--
2.17.0

View File

@ -1,552 +0,0 @@
From a117a2995f291e765c5de06f42f02a1687ecb55e Mon Sep 17 00:00:00 2001
Message-Id: <a117a2995f291e765c5de06f42f02a1687ecb55e.1524575789.git.jan.steffens@gmail.com>
In-Reply-To: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
References: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 11 Apr 2018 21:27:44 +0200
Subject: [PATCH 4/5] Fix vboxguest on guests with more than 4G RAM
Squashed commit of the following:
commit 042b191f6b98165d6bcca3ae09a0f9b289d6155e
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 29 17:28:57 2018 +0200
virt: vbox: Log an error when we fail to get the host version
This was the only error path during probe without a message being logged
about what went wrong, this fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
commit e4111a6c617687f7cb414ddfa8176206910db76e
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 29 17:28:56 2018 +0200
virt: vbox: Use __get_free_pages instead of kmalloc for DMA32 memory
It is not possible to get DMA32 zone memory through kmalloc, causing
the vboxguest driver to malfunction due to getting memory above
4G which the PCI device cannot handle.
This commit changes the kmalloc calls where the 4G limit matters to
using __get_free_pages() fixing vboxguest not working on x86_64 guests
with more then 4G RAM.
Cc: stable@vger.kernel.org
Reported-by: Eloy Coto Pereiro <eloy.coto@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
commit 2cb20368ce32e7275a351eadadd4c8f3da742a28
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 29 17:28:55 2018 +0200
virt: vbox: Add vbg_req_free() helper function
This is a preparation patch for fixing issues on x86_64 virtual-machines
with more then 4G of RAM, atm we pass __GFP_DMA32 to kmalloc, but kmalloc
does not honor that, so we need to switch to get_pages, which means we
will not be able to use kfree to free memory allocated with vbg_alloc_req.
While at it also remove a comment on a vbg_alloc_req call which talks
about Windows (inherited from the vbox upstream cross-platform code).
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
commit fa5c012bc9c3e1ada5cde0bfa3c6706be97b7cb0
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 29 17:28:54 2018 +0200
virt: vbox: Move declarations of vboxguest private functions to private header
Move the declarations of functions from vboxguest_utils.c which are only
meant for vboxguest internal use from include/linux/vbox_utils.h to
drivers/virt/vboxguest/vboxguest_core.h.
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/virt/vboxguest/vboxguest_core.c | 70 +++++++++++++-----------
drivers/virt/vboxguest/vboxguest_core.h | 9 +++
drivers/virt/vboxguest/vboxguest_linux.c | 19 ++++++-
drivers/virt/vboxguest/vboxguest_utils.c | 17 ++++--
include/linux/vbox_utils.h | 23 --------
5 files changed, 76 insertions(+), 62 deletions(-)
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
index 190dbf8cfcb5..2f3856a95856 100644
--- a/drivers/virt/vboxguest/vboxguest_core.c
+++ b/drivers/virt/vboxguest/vboxguest_core.c
@@ -114,7 +114,7 @@ static void vbg_guest_mappings_init(struct vbg_dev *gdev)
}
out:
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
kfree(pages);
}
@@ -144,7 +144,7 @@ static void vbg_guest_mappings_exit(struct vbg_dev *gdev)
rc = vbg_req_perform(gdev, req);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
if (rc < 0) {
vbg_err("%s error: %d\n", __func__, rc);
@@ -214,8 +214,8 @@ static int vbg_report_guest_info(struct vbg_dev *gdev)
ret = vbg_status_code_to_errno(rc);
out_free:
- kfree(req2);
- kfree(req1);
+ vbg_req_free(req2, sizeof(*req2));
+ vbg_req_free(req1, sizeof(*req1));
return ret;
}
@@ -245,7 +245,7 @@ static int vbg_report_driver_status(struct vbg_dev *gdev, bool active)
if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */
rc = VINF_SUCCESS;
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return vbg_status_code_to_errno(rc);
}
@@ -431,58 +431,52 @@ static int vbg_heartbeat_host_config(struct vbg_dev *gdev, bool enabled)
rc = vbg_req_perform(gdev, req);
do_div(req->interval_ns, 1000000); /* ns -> ms */
gdev->heartbeat_interval_ms = req->interval_ns;
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return vbg_status_code_to_errno(rc);
}
/**
* Initializes the heartbeat timer. This feature may be disabled by the host.
* Return: 0 or negative errno value.
* @gdev: The Guest extension device.
*/
static int vbg_heartbeat_init(struct vbg_dev *gdev)
{
int ret;
/* Make sure that heartbeat checking is disabled if we fail. */
ret = vbg_heartbeat_host_config(gdev, false);
if (ret < 0)
return ret;
ret = vbg_heartbeat_host_config(gdev, true);
if (ret < 0)
return ret;
- /*
- * Preallocate the request to use it from the timer callback because:
- * 1) on Windows vbg_req_alloc must be called at IRQL <= APC_LEVEL
- * and the timer callback runs at DISPATCH_LEVEL;
- * 2) avoid repeated allocations.
- */
gdev->guest_heartbeat_req = vbg_req_alloc(
sizeof(*gdev->guest_heartbeat_req),
VMMDEVREQ_GUEST_HEARTBEAT);
if (!gdev->guest_heartbeat_req)
return -ENOMEM;
vbg_info("%s: Setting up heartbeat to trigger every %d milliseconds\n",
__func__, gdev->heartbeat_interval_ms);
mod_timer(&gdev->heartbeat_timer, 0);
return 0;
}
/**
* Cleanup hearbeat code, stop HB timer and disable host heartbeat checking.
* @gdev: The Guest extension device.
*/
static void vbg_heartbeat_exit(struct vbg_dev *gdev)
{
del_timer_sync(&gdev->heartbeat_timer);
vbg_heartbeat_host_config(gdev, false);
- kfree(gdev->guest_heartbeat_req);
-
+ vbg_req_free(gdev->guest_heartbeat_req,
+ sizeof(*gdev->guest_heartbeat_req));
}
/**
@@ -543,7 +537,7 @@ static int vbg_reset_host_event_filter(struct vbg_dev *gdev,
if (rc < 0)
vbg_err("%s error, rc: %d\n", __func__, rc);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return vbg_status_code_to_errno(rc);
}
@@ -617,32 +611,32 @@ static int vbg_set_session_event_filter(struct vbg_dev *gdev,
out:
mutex_unlock(&gdev->session_mutex);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return ret;
}
/**
* Init and termination worker for set guest capabilities to zero on the host.
* Return: 0 or negative errno value.
* @gdev: The Guest extension device.
*/
static int vbg_reset_host_capabilities(struct vbg_dev *gdev)
{
struct vmmdev_mask *req;
int rc;
req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES);
if (!req)
return -ENOMEM;
req->not_mask = U32_MAX;
req->or_mask = 0;
rc = vbg_req_perform(gdev, req);
if (rc < 0)
vbg_err("%s error, rc: %d\n", __func__, rc);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return vbg_status_code_to_errno(rc);
}
@@ -712,44 +706,46 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
out:
mutex_unlock(&gdev->session_mutex);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return ret;
}
/**
* vbg_query_host_version get the host feature mask and version information.
* Return: 0 or negative errno value.
* @gdev: The Guest extension device.
*/
static int vbg_query_host_version(struct vbg_dev *gdev)
{
struct vmmdev_host_version *req;
int rc, ret;
req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HOST_VERSION);
if (!req)
return -ENOMEM;
rc = vbg_req_perform(gdev, req);
ret = vbg_status_code_to_errno(rc);
- if (ret)
+ if (ret) {
+ vbg_err("%s error: %d\n", __func__, rc);
goto out;
+ }
snprintf(gdev->host_version, sizeof(gdev->host_version), "%u.%u.%ur%u",
req->major, req->minor, req->build, req->revision);
gdev->host_features = req->features;
vbg_info("vboxguest: host-version: %s %#x\n", gdev->host_version,
gdev->host_features);
if (!(req->features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST)) {
vbg_err("vboxguest: Error host too old (does not support page-lists)\n");
ret = -ENODEV;
}
out:
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return ret;
}
@@ -847,36 +843,46 @@ int vbg_core_init(struct vbg_dev *gdev, u32 fixed_events)
return 0;
err_free_reqs:
- kfree(gdev->mouse_status_req);
- kfree(gdev->ack_events_req);
- kfree(gdev->cancel_req);
- kfree(gdev->mem_balloon.change_req);
- kfree(gdev->mem_balloon.get_req);
+ vbg_req_free(gdev->mouse_status_req,
+ sizeof(*gdev->mouse_status_req));
+ vbg_req_free(gdev->ack_events_req,
+ sizeof(*gdev->ack_events_req));
+ vbg_req_free(gdev->cancel_req,
+ sizeof(*gdev->cancel_req));
+ vbg_req_free(gdev->mem_balloon.change_req,
+ sizeof(*gdev->mem_balloon.change_req));
+ vbg_req_free(gdev->mem_balloon.get_req,
+ sizeof(*gdev->mem_balloon.get_req));
return ret;
}
/**
* Call this on exit to clean-up vboxguest-core managed resources.
*
* The native code should call this before the driver is loaded,
* but don't call this on shutdown.
* @gdev: The Guest extension device.
*/
void vbg_core_exit(struct vbg_dev *gdev)
{
vbg_heartbeat_exit(gdev);
vbg_guest_mappings_exit(gdev);
/* Clear the host flags (mouse status etc). */
vbg_reset_host_event_filter(gdev, 0);
vbg_reset_host_capabilities(gdev);
vbg_core_set_mouse_status(gdev, 0);
- kfree(gdev->mouse_status_req);
- kfree(gdev->ack_events_req);
- kfree(gdev->cancel_req);
- kfree(gdev->mem_balloon.change_req);
- kfree(gdev->mem_balloon.get_req);
+ vbg_req_free(gdev->mouse_status_req,
+ sizeof(*gdev->mouse_status_req));
+ vbg_req_free(gdev->ack_events_req,
+ sizeof(*gdev->ack_events_req));
+ vbg_req_free(gdev->cancel_req,
+ sizeof(*gdev->cancel_req));
+ vbg_req_free(gdev->mem_balloon.change_req,
+ sizeof(*gdev->mem_balloon.change_req));
+ vbg_req_free(gdev->mem_balloon.get_req,
+ sizeof(*gdev->mem_balloon.get_req));
}
/**
@@ -1415,7 +1421,7 @@ static int vbg_ioctl_write_core_dump(struct vbg_dev *gdev,
req->flags = dump->u.in.flags;
dump->hdr.rc = vbg_req_perform(gdev, req);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return 0;
}
@@ -1513,7 +1519,7 @@ int vbg_core_set_mouse_status(struct vbg_dev *gdev, u32 features)
if (rc < 0)
vbg_err("%s error, rc: %d\n", __func__, rc);
- kfree(req);
+ vbg_req_free(req, sizeof(*req));
return vbg_status_code_to_errno(rc);
}
diff --git a/drivers/virt/vboxguest/vboxguest_core.h b/drivers/virt/vboxguest/vboxguest_core.h
index 6c784bf4fa6d..7ad9ec45bfa9 100644
--- a/drivers/virt/vboxguest/vboxguest_core.h
+++ b/drivers/virt/vboxguest/vboxguest_core.h
@@ -171,4 +171,13 @@ irqreturn_t vbg_core_isr(int irq, void *dev_id);
void vbg_linux_mouse_event(struct vbg_dev *gdev);
+/* Private (non exported) functions form vboxguest_utils.c */
+void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
+void vbg_req_free(void *req, size_t len);
+int vbg_req_perform(struct vbg_dev *gdev, void *req);
+int vbg_hgcm_call32(
+ struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
+ struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
+ int *vbox_status);
+
#endif
diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
index 82e280d38cc2..398d22693234 100644
--- a/drivers/virt/vboxguest/vboxguest_linux.c
+++ b/drivers/virt/vboxguest/vboxguest_linux.c
@@ -87,52 +87,65 @@ static long vbg_misc_device_ioctl(struct file *filp, unsigned int req,
struct vbg_session *session = filp->private_data;
size_t returned_size, size;
struct vbg_ioctl_hdr hdr;
+ bool is_vmmdev_req;
int ret = 0;
void *buf;
if (copy_from_user(&hdr, (void *)arg, sizeof(hdr)))
return -EFAULT;
if (hdr.version != VBG_IOCTL_HDR_VERSION)
return -EINVAL;
if (hdr.size_in < sizeof(hdr) ||
(hdr.size_out && hdr.size_out < sizeof(hdr)))
return -EINVAL;
size = max(hdr.size_in, hdr.size_out);
if (_IOC_SIZE(req) && _IOC_SIZE(req) != size)
return -EINVAL;
if (size > SZ_16M)
return -E2BIG;
- /* __GFP_DMA32 because IOCTL_VMMDEV_REQUEST passes this to the host */
- buf = kmalloc(size, GFP_KERNEL | __GFP_DMA32);
+ /*
+ * IOCTL_VMMDEV_REQUEST needs the buffer to be below 4G to avoid
+ * the need for a bounce-buffer and another copy later on.
+ */
+ is_vmmdev_req = (req & ~IOCSIZE_MASK) == VBG_IOCTL_VMMDEV_REQUEST(0) ||
+ req == VBG_IOCTL_VMMDEV_REQUEST_BIG;
+
+ if (is_vmmdev_req)
+ buf = vbg_req_alloc(size, VBG_IOCTL_HDR_TYPE_DEFAULT);
+ else
+ buf = kmalloc(size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
if (copy_from_user(buf, (void *)arg, hdr.size_in)) {
ret = -EFAULT;
goto out;
}
if (hdr.size_in < size)
memset(buf + hdr.size_in, 0, size - hdr.size_in);
ret = vbg_core_ioctl(session, req, buf);
if (ret)
goto out;
returned_size = ((struct vbg_ioctl_hdr *)buf)->size_out;
if (returned_size > size) {
vbg_debug("%s: too much output data %zu > %zu\n",
__func__, returned_size, size);
returned_size = size;
}
if (copy_to_user((void *)arg, buf, returned_size) != 0)
ret = -EFAULT;
out:
- kfree(buf);
+ if (is_vmmdev_req)
+ vbg_req_free(buf, size);
+ else
+ kfree(buf);
return ret;
}
diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c
index 0f0dab8023cf..bf4474214b4d 100644
--- a/drivers/virt/vboxguest/vboxguest_utils.c
+++ b/drivers/virt/vboxguest/vboxguest_utils.c
@@ -65,23 +65,32 @@ VBG_LOG(vbg_debug, pr_debug);
void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type)
{
struct vmmdev_request_header *req;
+ int order = get_order(PAGE_ALIGN(len));
- req = kmalloc(len, GFP_KERNEL | __GFP_DMA32);
+ req = (void *)__get_free_pages(GFP_KERNEL | GFP_DMA32, order);
if (!req)
return NULL;
memset(req, 0xaa, len);
req->size = len;
req->version = VMMDEV_REQUEST_HEADER_VERSION;
req->request_type = req_type;
req->rc = VERR_GENERAL_FAILURE;
req->reserved1 = 0;
req->reserved2 = 0;
return req;
}
+void vbg_req_free(void *req, size_t len)
+{
+ if (!req)
+ return;
+
+ free_pages((unsigned long)req, get_order(PAGE_ALIGN(len)));
+}
+
/* Note this function returns a VBox status code, not a negative errno!! */
int vbg_req_perform(struct vbg_dev *gdev, void *req)
{
@@ -137,7 +146,7 @@ int vbg_hgcm_connect(struct vbg_dev *gdev,
rc = hgcm_connect->header.result;
}
- kfree(hgcm_connect);
+ vbg_req_free(hgcm_connect, sizeof(*hgcm_connect));
*vbox_status = rc;
return 0;
@@ -166,7 +175,7 @@ int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status)
if (rc >= 0)
rc = hgcm_disconnect->header.result;
- kfree(hgcm_disconnect);
+ vbg_req_free(hgcm_disconnect, sizeof(*hgcm_disconnect));
*vbox_status = rc;
return 0;
@@ -623,7 +632,7 @@ int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
}
if (!leak_it)
- kfree(call);
+ vbg_req_free(call, size);
free_bounce_bufs:
if (bounce_bufs) {
diff --git a/include/linux/vbox_utils.h b/include/linux/vbox_utils.h
index c71def6b310f..a240ed2a0372 100644
--- a/include/linux/vbox_utils.h
+++ b/include/linux/vbox_utils.h
@@ -24,39 +24,16 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...);
#define vbg_debug pr_debug
#endif
-/**
- * Allocate memory for generic request and initialize the request header.
- *
- * Return: the allocated memory
- * @len: Size of memory block required for the request.
- * @req_type: The generic request type.
- */
-void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
-
-/**
- * Perform a generic request.
- *
- * Return: VBox status code
- * @gdev: The Guest extension device.
- * @req: Pointer to the request structure.
- */
-int vbg_req_perform(struct vbg_dev *gdev, void *req);
-
int vbg_hgcm_connect(struct vbg_dev *gdev,
struct vmmdev_hgcm_service_location *loc,
u32 *client_id, int *vbox_status);
int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status);
int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms,
u32 parm_count, int *vbox_status);
-int vbg_hgcm_call32(
- struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
- struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
- int *vbox_status);
-
/**
* Convert a VirtualBox status code to a standard Linux kernel return value.
* Return: 0 or negative errno value.
--
2.17.0

View File

@ -0,0 +1,46 @@
From 32a72bee7a275f47c235fdb36249703c892ce8d8 Mon Sep 17 00:00:00 2001
Message-Id: <32a72bee7a275f47c235fdb36249703c892ce8d8.1531335939.git.jan.steffens@gmail.com>
In-Reply-To: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
References: <a2d2476ffec7d988b1a5396586869570e0d6f9d8.1531335939.git.jan.steffens@gmail.com>
From: Denis Kenzior <denkenz@gmail.com>
Date: Tue, 19 Jun 2018 10:39:50 -0500
Subject: [PATCH 4/4] mac80211: disable BHs/preemption in
ieee80211_tx_control_port()
On pre-emption enabled kernels the following print was being seen due to
missing local_bh_disable/local_bh_enable calls. mac80211 assumes that
pre-emption is disabled in the data path.
BUG: using smp_processor_id() in preemptible [00000000] code: iwd/517
caller is __ieee80211_subif_start_xmit+0x144/0x210 [mac80211]
[...]
Call Trace:
dump_stack+0x5c/0x80
check_preemption_disabled.cold.0+0x46/0x51
__ieee80211_subif_start_xmit+0x144/0x210 [mac80211]
Fixes: 911806491425 ("mac80211: Add support for tx_control_port")
Signed-off-by: Denis Kenzior <denkenz@gmail.com>
[commit message rewrite, fixes tag]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/tx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 05a265cd573d..7404a5114597 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -4800,7 +4800,9 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
skb_reset_network_header(skb);
skb_reset_mac_header(skb);
+ local_bh_disable();
__ieee80211_subif_start_xmit(skb, skb->dev, flags);
+ local_bh_enable();
return 0;
}
--
2.18.0

View File

@ -1,72 +0,0 @@
From 415d0ca52b88f7cf3300a54c337ca80ebeccce5c Mon Sep 17 00:00:00 2001
Message-Id: <415d0ca52b88f7cf3300a54c337ca80ebeccce5c.1524575789.git.jan.steffens@gmail.com>
In-Reply-To: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
References: <f7a249814be46cbcb7bad48e4b1910baaf7f8961.1524575789.git.jan.steffens@gmail.com>
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Wed, 11 Apr 2018 15:23:24 +0300
Subject: [PATCH 5/5] net: aquantia: Regression on reset with 1.x firmware
On ASUS XG-C100C with 1.5.44 firmware a special mode called "dirty wake"
is active. With this mode when motherboard gets powered (but no poweron
happens yet), NIC automatically enables powersave link and watches
for WOL packet.
This normally allows to powerup the PC after AC power failures.
Not all motherboards or bios settings gives power to PCI slots,
so this mode is not enabled on all the hardware.
4.16 linux driver introduced full hardware reset sequence
This is required since before that we had no NIC hardware
reset implemented and there were side effects of "not clean start".
But this full reset is incompatible with "dirty wake" WOL feature
it keeps the PHY link in a special mode forever. As a consequence,
driver sees no link and no traffic.
To fix this we forcibly change FW state to idle state before doing
the full reset. This makes FW to restore link state.
Fixes: c8c82eb net: aquantia: Introduce global AQC hardware reset sequence
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
.../aquantia/atlantic/hw_atl/hw_atl_utils.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
index d3b847ec7465..c58b2c227260 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
@@ -48,6 +48,8 @@
#define FORCE_FLASHLESS 0
static int hw_atl_utils_ver_match(u32 ver_expected, u32 ver_actual);
+static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
+ enum hal_atl_utils_fw_state_e state);
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
{
@@ -247,6 +249,20 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
self->rbl_enabled = (boot_exit_code != 0);
+ /* FW 1.x may bootup in an invalid POWER state (WOL feature).
+ * We should work around this by forcing its state back to DEINIT
+ */
+ if (!hw_atl_utils_ver_match(HW_ATL_FW_VER_1X,
+ aq_hw_read_reg(self,
+ HW_ATL_MPI_FW_VERSION))) {
+ int err = 0;
+
+ hw_atl_utils_mpi_set_state(self, MPI_DEINIT);
+ AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) &
+ HW_ATL_MPI_STATE_MSK) == MPI_DEINIT,
+ 10, 1000U);
+ }
+
if (self->rbl_enabled)
return hw_atl_utils_soft_reset_rbl(self);
else
--
2.17.0

View File

@ -9,4 +9,4 @@ Target = usr/lib/modules/%EXTRAMODULES%/*
[Action]
Description = Updating %PKGBASE% module dependencies...
When = PostTransaction
Exec = /usr/sbin/depmod %KERNVER%
Exec = /usr/bin/depmod %KERNVER%

View File

@ -1,10 +1,8 @@
# Source global configuration
source ../linux.conf
pkgbase=linux
pkgname=('linux' 'linux-headers' 'linux-docs')
_srcname=linux-${_basekernel}
pkgver=${_kernelver}
pkgver=4.18.3
_srcname=linux-$pkgver
pkgrel=2
arch=('x86_64')
url="https://www.kernel.org/"
@ -13,55 +11,31 @@ makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
options=('!strip')
source=(
https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
config.x86_64 # the main kernel config file
60-linux.hook # pacman hook for depmod
90-linux.hook # pacman hook for initramfs regeneration
linux.preset # standard config files for mkinitcpio ramdisk
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
0003-Partially-revert-swiotlb-remove-various-exports.patch
0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
)
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
'8218F88849AAC522E94CF470A5E9288C4FA415FA' # Jan Alexander Steffens (heftig)
)
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
sha256sums=('81ed3ccef8eb43cba3d2451a963d0bbaf5392af98435d42caee82d019a8443d4'
'SKIP'
'634d3fd97e5d9d90262db0a9d62ed0a40043eb691d68bd4a545f907079610b56'
'SKIP'
'f6f6c7eaf5f87ad77cc305266853c4eb8ceba21d32a76a9b7026891ecda65fac'
'287b43e83535d0aba2797b8fe4c1527788995cbfd858097be37214345e781a25'
'a7036446f02aab501936933d453f3a99c84904b9ad88ea662eb9618972abebf3'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
'113b1fe603f61b749c4cb3902a4f5d4fbec9d1e5081f008bac485cc345defa5f'
'9db235c5edfc9a81a0f5866f9942e74d896243c37d50298288fbbe2f79169fd3'
'd57665a468f93c94b92924fdbdc72ea50def74d9c8999104c9594e64fb196328'
'079180ceaae87a4851eb56e80f6e33b0199dad3343c73275ddb710e0824feb73')
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
_kernelname=-CHAKRA
prepare() {
cd ${_srcname}
# add upstream patch
msg "adding upstream patch"
patch -p1 -i ../patch-${pkgver}
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
# disable USER_NS for non-root users by default
patch -Np1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
# https://bugs.archlinux.org/task/56711
patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
# NVIDIA driver compat
patch -Np1 -i ../0003-Partially-revert-swiotlb-remove-various-exports.patch
# https://bugs.archlinux.org/task/58153
patch -Np1 -i ../0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
cat ../config.x86_64 - >.config <<END
CONFIG_LOCALVERSION="${_kernelname}"
CONFIG_LOCALVERSION_AUTO=n
@ -77,6 +51,7 @@ END
# get kernel version
make prepare
make -s kernelrelease > ../version
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
@ -107,136 +82,144 @@ package_linux() {
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux.install
local kernver="$(<version)"
cd ${_srcname}
# get kernel version
_kernver="$(make kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
msg2 "Installing boot image..."
install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-$pkgbase"
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
msg2 "Installing modules..."
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
mkdir -p "$modulesdir"
make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/doesnt/exist modules_install
# make room for external modules
local _extramodules="extramodules-${_basekernel}${_kernelname}"
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from hook
echo "${_kernver}" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
# a place for external modules,
# with version file for building modules and running depmod from hook
local extramodules="extramodules$_kernelname"
local extradir="$pkgdir/usr/lib/modules/$extramodules"
install -Dt "$extradir" -m644 ../version
ln -sr "$extradir" "$modulesdir/extramodules"
# remove build and source links
rm -f "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
rm "$modulesdir"/{source,build}
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
msg2 "Running depmod..."
depmod -b "$pkgdir/usr" -E Module.symvers -e "$kernver"
# now we call depmod...
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
# add vmlinux
install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
msg2 "Installing hooks..."
# sed expression for following substitutions
local _subst="
s|%PKGBASE%|${pkgbase}|g
s|%KERNVER%|${_kernver}|g
s|%EXTRAMODULES%|${_extramodules}|g
local subst="
s|%PKGBASE%|$pkgbase|g
s|%KERNVER%|$kernver|g
s|%EXTRAMODULES%|$extramodules|g
"
# hack to allow specifying an initially nonexisting install file
sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
true && install=${install}.pkg
sed "$subst" "$startdir/$install" > "$startdir/$install.pkg"
true && install=$install.pkg
# install mkinitcpio preset file
sed "${_subst}" ../linux.preset |
install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
# fill in mkinitcpio preset and pacman hooks
sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \
"$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
sed "$subst" ../60-linux.hook | install -Dm644 /dev/stdin \
"$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook"
sed "$subst" ../90-linux.hook | install -Dm644 /dev/stdin \
"$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook"
# install pacman hooks
sed "${_subst}" ../60-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
sed "${_subst}" ../90-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
package_linux-headers() {
pkgdesc="Header files and scripts for building modules for linux kernel"
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
cd ${_srcname}
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
cd $_srcname
mkdir "${_builddir}/.tmp_versions"
cp -t "${_builddir}" -a include scripts
install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
cp -t "${_builddir}/arch/x86" -a arch/x86/include
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/13146
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/lgdt330x.h
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# http://bugs.archlinux.org/task/20402
install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# add xfs and shmem for aufs building
mkdir -p "${_builddir}"/{fs/xfs,mm}
# copy in Kconfig files
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
msg2 "Installing build files..."
install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
# remove unneeded architectures
local _arch
for _arch in "${_builddir}"/arch/*/; do
[[ ${_arch} == */x86/ ]] && continue
rm -r "${_arch}"
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
# ???
mkdir "$builddir/.tmp_versions"
msg2 "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/13146
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# http://bugs.archlinux.org/task/20402
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
msg2 "Installing KConfig files..."
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
msg2 "Removing unneeded architectures..."
local arch
for arch in "$builddir"/arch/*/; do
[[ $arch = */x86/ ]] && continue
echo "Removing $(basename "$arch")"
rm -r "$arch"
done
# remove files already in linux-docs package
rm -r "${_builddir}/Documentation"
msg2 "Removing documentation..."
rm -r "$builddir/Documentation"
# remove now broken symlinks
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
msg2 "Removing broken symlinks..."
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
# Fix permissions
chmod -R u=rwX,go=rX "${_builddir}"
msg2 "Removing loose objects..."
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
# strip scripts directory
local _binary _strip
while read -rd '' _binary; do
case "$(file -bi "${_binary}")" in
*application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
*application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
*application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
*) continue ;;
msg2 "Stripping build tools..."
local file
while read -rd '' file; do
case "$(file -bi "$file")" in
application/x-sharedlib\;*) # Libraries (.so)
strip -v $STRIP_SHARED "$file" ;;
application/x-archive\;*) # Libraries (.a)
strip -v $STRIP_STATIC "$file" ;;
application/x-executable\;*) # Binaries
strip -v $STRIP_BINARIES "$file" ;;
application/x-pie-executable\;*) # Relocatable binaries
strip -v $STRIP_SHARED "$file" ;;
esac
/usr/bin/strip ${_strip} "${_binary}"
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}
package_linux-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel."
pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
cd ${_srcname}
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
mkdir -p "${_builddir}"
cp -t "${_builddir}" -a Documentation
cd $_srcname
# Fix permissions
chmod -R u=rwX,go=rX "${_builddir}"
msg2 "Installing documentation..."
mkdir -p "$builddir"
cp -t "$builddir" -a Documentation
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"
}

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,6 @@ post_upgrade() {
}
post_remove() {
rm -f boot/initramfs-linux.img
rm -f boot/initramfs-linux-fallback.img
rm -f boot/initramfs-%PKGBASE%.img
rm -f boot/initramfs-%PKGBASE%-fallback.img
}

View File

@ -1,14 +1,14 @@
# mkinitcpio preset file for the 'linux' package
# mkinitcpio preset file for the '%PKGBASE%' package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"
ALL_kver="/boot/vmlinuz-%PKGBASE%"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
default_image="/boot/initramfs-%PKGBASE%.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
fallback_options="-S autodetect"

View File

@ -1,40 +1,34 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=ndiswrapper-lts
_pkgname=ndiswrapper
pkgver=1.61
pkgrel=4
pkgrel=7
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-lts."
license=('GPL')
arch=('x86_64')
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150")
makedepends=("linux-lts-headers=4.4.150")
_extramodules=extramodules-CHAKRA-LTS
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz")
sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5')
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
#patch -p1 -i ../ndiswrapper-1.59.patch
sed -i "/modinfo/s/s/usr\//" driver/Makefile
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
make -C driver KVERS_UNAME=${_kver}
cd ndiswrapper-$pkgver
make -C driver KVERS_UNAME=${KERNEL_VERSION}
make -C utils
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
cd ndiswrapper-$pkgver
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD=${_rootOfSourceTree} INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$_kver DESTDIR="$pkgdir/" install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/ndiswrapper.install"
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD="/usr/lib/modules/$KERNEL_VERSION/build/" INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$KERNEL_VERSION DESTDIR="$pkgdir/" install
}

View File

@ -1,35 +0,0 @@
diff -aur ndiswrapper-1.59.old/driver/crt.c ndiswrapper-1.59.new/driver/crt.c
--- ndiswrapper-1.59.old/driver/crt.c 2013-11-28 20:42:35.000000000 +0100
+++ ndiswrapper-1.59.new/driver/crt.c 2014-04-11 20:39:22.384962602 +0200
@@ -467,7 +467,7 @@
noregparm void WIN_FUNC(_win_srand,1)
(UINT seed)
{
- net_srandom(seed);
+ prandom_seed((__force u32)(seed));
}
noregparm int WIN_FUNC(rand,0)
diff -aur ndiswrapper-1.59.old/driver/ntoskernel.h ndiswrapper-1.59.new/driver/ntoskernel.h
--- ndiswrapper-1.59.old/driver/ntoskernel.h 2013-11-28 20:42:36.000000000 +0100
+++ ndiswrapper-1.59.new/driver/ntoskernel.h 2014-04-11 20:44:03.491617236 +0200
@@ -347,7 +347,7 @@
#define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
#endif
-#ifdef INIT_COMPLETION
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
static inline void reinit_completion(struct completion *x)
{
INIT_COMPLETION(*x);
@@ -797,9 +797,8 @@
#define nt_spin_unlock_irqrestore(lock, flags) \
do { \
nt_spin_unlock(lock); \
- preempt_enable_no_resched(); \
+ preempt_enable(); \
local_irq_restore(flags); \
- preempt_check_resched(); \
} while (0)
static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)

View File

@ -1,15 +0,0 @@
post_install()
{
post_upgrade
}
post_upgrade()
{
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove()
{
post_upgrade
}

View File

@ -1,20 +1,18 @@
# Source global configuration
source ../linux.conf
pkgname=ndiswrapper
pkgver=1.61
pkgrel=12
pkgrel=15
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-testing."
license=('GPL')
arch=('x86_64')
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
depends=("linux=4.18.3")
makedepends=("linux-headers=4.18.3")
provides=("ndiswrapper-utils=$pkgver")
replaces=('ndiswrapper-utils')
conflicts=('ndiswrapper-utils')
makedepends=('linux-headers')
_extramodules=extramodules-CHAKRA
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz"
'linux-4.11.patch'
'linux-4.13.patch'
@ -24,10 +22,9 @@ sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5'
'09b308bbc948acc59d33882524b53ce210bb1848'
'4a47e255e27767dd87757f159eb1fdf1ddaf4993')
prepare() {
[ -z "$_kver" ] && error "Could not get kernel version from '/usr/lib/modules/${_extramodules}/version'..." && false
msg "Found kernel version: $_kver"
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
prepare() {
cd ndiswrapper-$pkgver
patch -p1 -i ../linux-4.11.patch
@ -40,16 +37,13 @@ prepare() {
build() {
cd ndiswrapper-$pkgver
make -C driver KVERS_UNAME=${_kver}
make -C driver KVERS_UNAME=${KERNEL_VERSION}
make -C utils
}
package() {
cd ndiswrapper-$pkgver
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD=${_rootOfSourceTree} INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$_kver DESTDIR="$pkgdir/" install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/ndiswrapper.install"
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD="/usr/lib/modules/$KERNEL_VERSION/build/" INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$KERNEL_VERSION DESTDIR="$pkgdir/" install
}

View File

@ -1,15 +0,0 @@
post_install()
{
post_upgrade
}
post_upgrade()
{
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove()
{
post_upgrade
}

View File

@ -1,5 +1,5 @@
pkgname=networkmanager-pptp
pkgver=1.2.4
pkgver=1.2.6 #change also prepare()!!
pkgrel=1
pkgdesc="NetworkManager VPN plugin for PPTP"
url="https://wiki.gnome.org/Projects/NetworkManager"
@ -8,8 +8,8 @@ license=('GPL')
_pppver=2.4.7
depends=('networkmanager' 'pptpclient' "ppp=$_pppver")
makedepends=('intltool')
_commit=7861022af7edcf4a26b01d30ad6b2f0bbc51e55e # tags/1.2.4^0
source=("git://git.gnome.org/network-manager-pptp#commit=$_commit")
_commit=66994efab0164862b35f66665c197517ea2c4a2b # tags/1.2.6^0
source=("git+https://git.gnome.org/browse/network-manager-pptp#commit=$_commit")
sha256sums=('SKIP')
pkgver() {
@ -19,7 +19,8 @@ pkgver() {
prepare() {
cd network-manager-pptp
# NOCONFIGURE=1 ./autogen.sh
git tag -d 1.2.7-dev # Fixup pkgver
NOCONFIGURE=1 ./autogen.sh
}
build() {

View File

@ -1,39 +1,38 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=nvidia-304xx-lts
pkgver=304.137
pkgrel=3
pkgrel=5
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-304xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150" "nvidia-304xx-utils=${pkgver}")
makedepends=("linux-lts-headers=4.4.150")
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
license=('custom')
install=nvidia.install
_extramodules=extramodules-CHAKRA-LTS
_pkg="NVIDIA-Linux-${arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${arch}/${pkgver}/${_pkg}.run")
md5sums=('485506ee6a7c54780488dacddf1d56b1')
prepare() {
cd "${srcdir}"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/etc/modprobe.d"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
}

View File

@ -1,18 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_upgrade() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
rm "/etc/modprobe.d/nouveau_blacklist.conf"
}

View File

@ -1,5 +0,0 @@
Section "Device"
Identifier "Default nvidia Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection

View File

@ -1,135 +0,0 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# contributor: abveritas@chakra-project.org
pkgbase=nvidia-304xx-utils
pkgname=('nvidia-304xx-utils' 'opencl-nvidia-304xx')
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
pkgver=304.137
pkgrel=7
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
options=('!strip')
_pkg="NVIDIA-Linux-${arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
'nvidia-drm-outputclass.conf')
md5sums=('485506ee6a7c54780488dacddf1d56b1'
'a433deeb5f9cc661e537f42bde2f1df7')
create_links() {
# create soname links
while read -d '' _lib; do
_soname="$(dirname "${_lib}")/$(readelf -d "${_lib}" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
[ -e "${_soname}" ] || ln -s "$(basename "${_lib}")" "${_soname}"
[ -e "${_soname/.[0-9]*/}" ] || ln -s "$(basename "${_soname}")" "${_soname/.[0-9]*/}"
done < <(find "${pkgdir}" -type f -name '*.so*' -print0)
}
build() {
sh "${_pkg}.run" --extract-only
}
package_opencl-nvidia-304xx() {
pkgdesc="OpenCL implemention for NVIDIA, 304xx legacy branch"
depends=('zlib')
optdepends=('opencl-headers: headers necessary for OpenCL development')
provides=('opencl-nvidia' 'opencl-driver')
conflicts=('opencl-nvidia')
cd ${_pkg}
# OpenCL
install -D -m644 nvidia.icd "${pkgdir}/etc/OpenCL/vendors/nvidia.icd"
install -D -m755 "libnvidia-compiler.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-compiler.so.${pkgver}"
install -D -m755 "libnvidia-opencl.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-opencl.so.${pkgver}"
create_links
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/opencl-nvidia-304xx/LICENSE"
}
package_nvidia-304xx-utils() {
pkgdesc="NVIDIA drivers utilities and libraries, 304xx legacy branch"
depends=('xorg-server' 'libxvmc' 'mesa')
optdepends=('gtk2: nvidia-settings'
'pkg-config: nvidia-xconfig'
'opencl-nvidia-304xx: OpenCL support')
conflicts=('nvidia-304xx-libgl' 'nvidia-340xx-utils' 'nvidia-utils')
provides=('libgl' 'libgles' 'libegl' 'nvidia-304xx-libgl' 'nvidia-utils')
replaces=('nvidia-304xx-libgl')
cd ${_pkg}
# X driver
install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so"
# GLX extension module for X
install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/xorg/libglx.so.${pkgver}"
ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/xorg/libglx.so.1" # X doesn't find glx otherwise
ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/xorg/libglx.so" # X doesn't find glx otherwise
# OpenGL libraries
install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libGL.so.${pkgver}"
# OpenGL core library
install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libnvidia-glcore.so.${pkgver}"
# XvMC
install -D -m755 "libXvMCNVIDIA.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libXvMCNVIDIA.so.${pkgver}"
# VDPAU
install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}"
# nvidia-tls library
install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libnvidia-tls.so.${pkgver}"
install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libnvidia-cfg.so.${pkgver}"
install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libnvidia-ml.so.${pkgver}"
# CUDA
install -D -m755 "libcuda.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libcuda.so.${pkgver}"
install -D -m755 "libnvcuvid.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libnvcuvid.so.${pkgver}"
# DEBUG
install -D -m755 nvidia-debugdump "${pkgdir}/usr/bin/nvidia-debugdump"
# nvidia-xconfig
install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig"
install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz"
# nvidia-bug-report
install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh"
# nvidia-smi
install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi"
install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia-304xx/LICENSE"
ln -s nvidia-304xx "${pkgdir}/usr/share/licenses/nvidia-304xx-utils"
install -D -m644 README.txt "${pkgdir}/usr/share/doc/nvidia-304xx/README"
install -D -m644 NVIDIA_Changelog "${pkgdir}/usr/share/doc/nvidia-304xx/NVIDIA_Changelog"
ln -s nvidia-304xx "${pkgdir}/usr/share/doc/nvidia-304xx-utils"
# We have to provide symlinks to mesa, as nvidia 304xx doesn't ship them
ln -s /usr/lib/libEGL.so.1.0.0 "${pkgdir}/usr/lib/nvidia/libEGL.so.1.0.0"
ln -s libEGL.so.1.0.0 "${pkgdir}/usr/lib/nvidia/libEGL.so.1"
ln -s libEGL.so.1.0.0 "${pkgdir}/usr/lib/nvidia/libEGL.so"
ln -s /usr/lib/libGLESv1_CM.so.1.1.0 "${pkgdir}/usr/lib/nvidia/libGLESv1_CM.so.1.1.0"
ln -s libGLESv1_CM.so.1.1.0 "${pkgdir}/usr/lib/nvidia/libGLESv1_CM.so.1"
ln -s libGLESv1_CM.so.1.1.0 "${pkgdir}/usr/lib/nvidia/libGLESv1_CM.so"
ln -s /usr/lib/libGLESv2.so.2.0.0 "${pkgdir}/usr/lib/nvidia/libGLESv2.so.2.0.0"
ln -s libGLESv2.so.2.0.0 "${pkgdir}/usr/lib/nvidia/libGLESv2.so.2"
ln -s libGLESv2.so.2.0.0 "${pkgdir}/usr/lib/nvidia/libGLESv2.so"
# distro specific files must be installed in /usr/share/X11/xorg.conf.d
install -m755 -d "${pkgdir}/usr/share/X11/xorg.conf.d"
install -m644 "${srcdir}/nvidia-drm-outputclass.conf" "${pkgdir}/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf"
install -dm 755 "${pkgdir}"/etc/ld.so.conf.d
echo -e '/usr/lib/nvidia/' > "${pkgdir}"/etc/ld.so.conf.d/00-nvidia.conf
create_links
}

View File

@ -1,14 +0,0 @@
Section "OutputClass"
Identifier "intel"
MatchDriver "i915"
Driver "modesetting"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "yes"
ModulePath "/usr/lib/nvidia/xorg"
EndSection

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Exec=nvidia-settings --load-config-only
TryExec=/usr/bin/nvidia-settings
Name=Restore the video card and monitor parameters previously set in NVIDIA Settings
Name[it]=Ripristina i parametri di scheda video e monitor precedentemente salvati in NVIDIA Settings
Type=Service
X-DBUS-StartupType=none
X-KDE-autostart-phase=1
X-KDE-StartupNotify=false

View File

@ -1,5 +0,0 @@
post_install() {
echo 'By using this package you accept the NVIDIA license,'
echo 'which has been installed in /usr/share/licenses/nvidia/LICENSE'
echo 'If you do not accept this license, you must remove the package immediately.'
}

View File

@ -1,76 +0,0 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
source ../linux.conf
pkgbase=nvidia-304xx
pkgname=('nvidia-304xx' 'chd-nvidia-304xx' 'nvidia-304xx-dkms')
pkgver=304.137
pkgrel=8
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=("linux-headers=${_kernelver}")
license=('custom')
_pkg="NVIDIA-Linux-${arch}-${pkgver}-no-compat32"
source=("https://code.chakralinux.org/tools/chakra-hardware-detection/raw/master/hwdb/nvidia_supported"
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
'kernel-4.14.patch'
'kernel-4.15.patch')
md5sums=('62d0cdb856cfae64753c0f3acf729d47'
'485506ee6a7c54780488dacddf1d56b1'
'cf9259b845e53903586c29a27de29ddb'
'3b824306e7d5193587c80b19b1b56ef2')
prepare() {
cd "${srcdir}"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# patches here
patch -Np1 --no-backup-if-mismatch < "${srcdir}/kernel-4.14.patch"
patch -Np1 --no-backup-if-mismatch < "${srcdir}/kernel-4.15.patch"
cp -a kernel kernel-dkms
}
build() {
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
}
package_nvidia-304xx() {
pkgdesc="NVIDIA drivers for linux."
depends=("linux=${_kernelver}" "nvidia-304xx-libgl" "nvidia-304xx-utils=${pkgver}")
conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia')
install=nvidia.install
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
}
package_nvidia-304xx-dkms() {
pkgdesc="NVIDIA driver sources for linux, 304xx legacy branch"
depends=('dkms' "nvidia-304xx-utils=$pkgver")
optdepends=('linux-headers: Build the module for Arch kernel'
'linux-lts-headers: Build the module for LTS Arch kernel')
conflicts+=('nvidia-304xx')
cd "${srcdir}/${_pkg}"
make -C kernel clean
install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,src}
cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}"/usr/src/nvidia-${pkgver}
echo 'blacklist nouveau' > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf
}
package_chd-nvidia-304xx() {
pkgdesc="CHD ids for nvidia $pkgver"
arch=('x86_64')
cd "${srcdir}/${_pkg}"
install -dm755 "${pkgdir}/opt/chakra/hwdb"
sh -e "${srcdir}/nvidia_supported" README.txt kernel/nv-kernel.o \
> "${pkgdir}/opt/chakra/hwdb/hw_nvidia304xx_hwdb"
}

View File

@ -1,29 +0,0 @@
diff -u -r NVIDIA-Linux-x86_64-340.104-no-compat32/kernel/nv-drm.c NVIDIA-Linux-x86_64-340.104-no-compat32-kernel4.14/kernel/nv-drm.c
--- NVIDIA-Linux-x86_64-340.104-no-compat32/kernel/nv-drm.c 2017-09-15 01:16:51.000000000 +0200
+++ NVIDIA-Linux-x86_64-340.104-no-compat32-kernel4.14/kernel/nv-drm.c 2017-11-19 00:51:45.006654148 +0100
@@ -173,8 +173,12 @@
{
int ret = 0;
#if defined(NV_DRM_AVAILABLE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+ ret = drm_legacy_pci_init(&nv_drm_driver, pci_driver);
+#else
ret = drm_pci_init(&nv_drm_driver, pci_driver);
#endif
+#endif
return ret;
}
@@ -183,8 +187,12 @@
)
{
#if defined(NV_DRM_AVAILABLE)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+ drm_legacy_pci_exit(&nv_drm_driver, pci_driver);
+#else
drm_pci_exit(&nv_drm_driver, pci_driver);
#endif
+#endif
}
RM_STATUS NV_API_CALL nv_alloc_os_descriptor_handle(

View File

@ -1,60 +0,0 @@
Author: Luca Boccassi <bluca@debian.org>
Description: Fix timer API calls for kernel >= 4.15
From kernel 4.15 and newer (commit 7eeb6b893bd28c) the init_timer APIs have
been retired and replaced by new timer_list APIs.
--- a/kernel/nv.c
+++ b/kernel/nv.c
@@ -17,6 +17,8 @@
#include "rmil.h"
#include "nv-pat.h"
+#include <linux/version.h>
+
#if defined(MODULE_LICENSE)
MODULE_LICENSE("NVIDIA");
#endif
@@ -301,7 +303,11 @@
#else
irqreturn_t nv_kern_isr(int, void *);
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
void nv_kern_rc_timer(unsigned long);
+#else
+void nv_kern_rc_timer(struct timer_list *);
+#endif
#if defined(NV_PM_SUPPORT_OLD_STYLE_APM)
static int nv_kern_apm_event(struct pm_dev *, pm_request_t, void *);
#endif
@@ -2075,10 +2081,18 @@
}
void nv_kern_rc_timer(
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
unsigned long data
+#else
+ struct timer_list *t_list
+#endif
)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
nv_linux_state_t *nvl = (nv_linux_state_t *) data;
+#else
+ nv_linux_state_t *nvl = from_timer(nvl, t_list, rc_timer);
+#endif
nv_state_t *nv = NV_STATE_PTR(nvl);
NV_CHECK_PCI_CONFIG_SPACE(nvl->timer_sp, nv, TRUE, TRUE, FALSE);
@@ -3029,9 +3043,13 @@
return -1;
nv_printf(NV_DBG_INFO, "NVRM: initializing rc timer\n");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
init_timer(&nvl->rc_timer);
nvl->rc_timer.function = nv_kern_rc_timer;
nvl->rc_timer.data = (unsigned long) nv;
+#else
+ timer_setup(&nvl->rc_timer, nv_kern_rc_timer, 0);
+#endif
nv->rc_timer_enabled = 1;
mod_timer(&nvl->rc_timer, jiffies + HZ); /* set our timeout for 1 second */
nv_printf(NV_DBG_INFO, "NVRM: rc timer initialized\n");

View File

@ -1,15 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

View File

@ -1,34 +1,34 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=nvidia-340xx-lts
pkgver=340.106
pkgver=340.107
pkgrel=1
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-340xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150" "nvidia-340xx-utils=${pkgver}")
makedepends=("linux-lts-headers=4.4.150")
conflicts=('nvidia-304xx-lts' 'nvidia-lts')
license=('custom')
install=nvidia.install
_extramodules=extramodules-CHAKRA-LTS
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
md5sums=('37c84428b64696be2b104edbc9855f57')
md5sums=('ffca1879d77dfc491dfb0276ceb56cc1')
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
}
build() {
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
cd uvm
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
@ -38,6 +38,6 @@ package() {
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
}

View File

@ -1,22 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_upgrade() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
echo -e '\e[31;46m WARNING'
echo -e '\e[31;46m If your card is from the 7xxx series or earlier, switch to nvidia-304xx-lts'
echo -e '\e[31;46m pacman -S nvidia-304xx-lts'
echo -e '\e[0m'
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
rm "/etc/modprobe.d/nouveau_blacklist.conf"
}

View File

@ -2,7 +2,7 @@ pkgbase=nvidia-340xx-utils
pkgname=('nvidia-340xx-utils' 'opencl-nvidia-340xx')
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
pkgver=340.107
pkgrel=1
pkgrel=3
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')

View File

@ -1,18 +1,17 @@
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
source ../linux.conf
pkgbase=nvidia-340xx
pkgname=('nvidia-340xx' 'chd-nvidia-340xx' 'nvidia-340xx-dkms')
pkgver=340.107
pkgrel=1
pkgrel=4
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=("linux-headers=${_kernelver}")
makedepends=("linux-headers=4.18.3")
license=('custom')
source=("https://code.chakralinux.org/tools/chakra-hardware-detection/raw/master/hwdb/nvidia_supported"
'kernel-4.11.patch')
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
_extramodules=extramodules-CHAKRA
source+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
md5sums=('62d0cdb856cfae64753c0f3acf729d47'
'e09208cdee41f89ae787f86c602c69d2'
@ -28,16 +27,19 @@ prepare() {
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/"${KERNEL_VERSION}/build" module
cd uvm
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/"${KERNEL_VERSION}/build" module
}
package_nvidia-340xx() {
pkgdesc="NVIDIA drivers for linux."
depends=("linux=${_kernelver}" "nvidia-340xx-libgl" "nvidia-340xx-utils=${pkgver}")
depends=("linux=4.18.3" "nvidia-340xx-libgl" "nvidia-340xx-utils=${pkgver}")
conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia-304xx' 'nvidia-bumblebee')
install=nvidia.install

View File

@ -1,11 +1,11 @@
post_install() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo -e '\e[31;46m WARNING'
echo -e '\e[31;46m If your card is from the 7xxx series or earlier, switch to nvidia-304xx'
@ -14,7 +14,7 @@ post_upgrade() {
}
post_remove() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
EXTRAMODULES='extramodules-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

View File

@ -1,24 +1,20 @@
# $Id: PKGBUILD 323392 2018-05-05 18:28:00Z andyrtr $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Source global configuration
source ../linux-lts.conf
pkgname=nvidia-390xx-lts
pkgver=390.59
pkgrel=1
pkgver=390.77
pkgrel=3
pkgdesc="NVIDIA drivers for linux-lts, 390xx legacy branch"
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-390xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
depends=("linux-lts=4.4.150" "nvidia-390xx-utils=${pkgver}")
makedepends=("linux-lts-headers=4.4.150")
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
license=('custom')
options=('!strip')
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha512sums=('65b92ec7f9488a98a8579efcf5b00aca42945b1d0fd0f58aacebf45c772b0b896af8bbac3abec126a931752ef9504a727fac89220c115ff474c0521f3c214d99')
_extramodules=extramodules-CHAKRA-LTS
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
sha512sums=('517947c63dceefd4c9ef27226e39abba727baa4e5493543edf2e0d3cd16341b35e90d02b5ec7319e76c75a0adbc4ae451ede5fc48a6fc38cc2823425dfaefd7d')
prepare() {
sh "${_pkg}.run" --extract-only
@ -26,8 +22,11 @@ prepare() {
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {

View File

@ -2,8 +2,8 @@ pkgbase=nvidia-390xx-utils
pkgname=('nvidia-390xx-utils' 'opencl-nvidia-390xx')
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
# Update nvidia-settings too
pkgver=390.59
pkgrel=1
pkgver=390.77
pkgrel=3
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
@ -13,7 +13,7 @@ source=('nvidia-drm-outputclass.conf'
"http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha512sums=('c49d246a519731bfab9d22afa5c2dd2d366db06d80182738b84881e93cd697c783f16ee04819275c05597bb063451a5d6102fbc562cd078d2a374533a23cea48'
'4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499'
'65b92ec7f9488a98a8579efcf5b00aca42945b1d0fd0f58aacebf45c772b0b896af8bbac3abec126a931752ef9504a727fac89220c115ff474c0521f3c214d99')
'517947c63dceefd4c9ef27226e39abba727baa4e5493543edf2e0d3cd16341b35e90d02b5ec7319e76c75a0adbc4ae451ede5fc48a6fc38cc2823425dfaefd7d')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

View File

@ -1,22 +1,21 @@
# Source global configuration
source ../linux.conf
pkgbase=nvidia-390xx
pkgname=(nvidia-390xx nvidia-390xx-dkms chd-nvidia-390xx)
pkgver=390.59
pkgrel=1
pkgver=390.77
pkgrel=3
pkgdesc="NVIDIA drivers for linux, 390xx legacy branch"
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=("linux-headers=${_kernelver}" "nvidia-390xx-utils=${pkgver}")
makedepends=("linux-headers=4.18.3" "nvidia-390xx-utils=${pkgver}")
license=('custom')
options=('!strip')
source=("https://code.chakralinux.org/tools/chakra-hardware-detection/raw/master/hwdb/nvidia_supported_new")
_pkg="NVIDIA-Linux-x86_64-${pkgver}"
_extramodules=extramodules-CHAKRA
source+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
kernel-4.16.patch)
sha256sums=('94db1b11de33b0299da021fee8c21e4442656fe76452ac582b556e3f96365d5d'
'270246eaca001b374e9ed8c1ac9b73c1d32b461ca5776761985f745ad769fe28'
'e51c5784520e73c179a57cf0dcd3a4c673d8142b28415a060066d83633637282'
'622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385')
prepare() {
@ -46,13 +45,16 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/"${KERNEL_VERSION}/build" module
}
package_nvidia-390xx() {
pkgdesc="NVIDIA drivers for linux, 390xx legacy branch"
depends=("linux=${_kernelver}" "nvidia-390xx-utils=${pkgver}" 'libgl')
depends=("linux=4.18.3" "nvidia-390xx-utils=${pkgver}" 'libgl')
conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia-304xx' 'nvidia-340xx')
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \

View File

@ -1,23 +1,16 @@
# Source global configuration
source ../linux-lts.conf
pkgname=('nvidia-lts')
pkgdesc=('NVIDIA drivers for linux-lts')
pkgver=390.25
pkgname=nvidia-lts
pkgdesc="NVIDIA drivers for linux-lts"
pkgver=396.51
pkgrel=1
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-utils=${pkgver}" 'libglvnd')
makedepends=("linux-lts-headers=${_kernelver}")
install=nvidia.install
depends=("linux-lts=4.4.150" "nvidia-utils=${pkgver}" 'libglvnd')
makedepends=("linux-lts-headers=4.4.150")
_extramodules=extramodules-CHAKRA-LTS
license=('custom')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
#_pkg="NVIDIA-Linux-x86_64-${pkgver}"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
#source=("NVIDIA-Linux-x86_64-${pkgver}.run::https://developer.nvidia.com/linux64bit")
md5sums=('e41e28d1f380c64ec2eacae344fb5017')
_pkg="NVIDIA-Linux-x86_64-${pkgver}"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
md5sums=('42b1a62681dff47f82d66bf9e9406915')
prepare() {
sh "${_pkg}.run" --extract-only
@ -26,19 +19,21 @@ prepare() {
}
build() {
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
for ko in nvidia nvidia-uvm nvidia-modeset nvidia-drm; do
install -Dm644 "${srcdir}/${_pkg}/kernel/${ko}.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/${ko}.ko"
done
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
"${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
}

View File

@ -2,8 +2,8 @@ pkgbase=nvidia-utils
pkgname=(nvidia-utils opencl-nvidia)
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
# Update nvidia-settings too
pkgver=396.24
pkgrel=1
pkgver=396.51
pkgrel=3
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
@ -14,7 +14,7 @@ source=('nvidia-drm-outputclass.conf'
"https://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
sha512sums=('c49d246a519731bfab9d22afa5c2dd2d366db06d80182738b84881e93cd697c783f16ee04819275c05597bb063451a5d6102fbc562cd078d2a374533a23cea48'
'4b3ad73f5076ba90fe0b3a2e712ac9cde76f469cd8070280f960c3ce7dc502d1927f525ae18d008075c8f08ea432f7be0a6c3a7a6b49c361126dcf42f97ec499'
'dfe837804d01e903cdf980353add0227362771cd252e4a7d8aff99fc489e5535edfda51ed1a20b9d60e23f1a9e7312f23309c59c67ff0a09a9b9214e52f09077')
'961c1a5b27a0f6cb54e387133a8d4038ddda0df39e70e84a637d8d64eaeb4ec937e37d6a737179d72750785614d20ade5e99f0668e3d53fef2cfa70241de4fe3')
create_links() {

View File

@ -1,21 +1,20 @@
# Source global configuration
source ../linux.conf
pkgbase=nvidia
pkgname=(nvidia nvidia-dkms chd-nvidia)
pkgver=396.24
pkgrel=1
pkgver=396.51
pkgrel=3
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=("linux-headers=${_kernelver}" "nvidia-utils=${pkgver}")
makedepends=("linux-headers=4.18.3" "nvidia-utils=${pkgver}")
license=('custom')
options=('!strip')
source=("https://code.chakralinux.org/tools/chakra-hardware-detection/raw/master/hwdb/nvidia_supported_new")
_pkg="NVIDIA-Linux-x86_64-${pkgver}"
_extramodules=extramodules-CHAKRA
source+=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
kernel-4.16.patch)
sha256sums=('94db1b11de33b0299da021fee8c21e4442656fe76452ac582b556e3f96365d5d'
'59bb112b17ca72cd15fed4e521d4b52b0e9f5b8b13a95b36521f8eda978b568e'
'6add8c3782bdf276b4a5a5bcea102ceff8e90cf3fc2439dde9d5e60d557ac0d6'
'622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385')
prepare() {
@ -46,12 +45,14 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
build() {
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package_nvidia() {
pkgdesc="NVIDIA drivers for linux"
depends=("linux=${_kernelver}" "nvidia-utils=${pkgver}")
depends=("linux=4.18.3" "nvidia-utils=${pkgver}")
conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia-304xx')
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \

View File

@ -1,15 +1,13 @@
source ../linux.conf
pkgname=r8168
pkgver=8.045.08
pkgrel=8
pkgrel=11
pkgdesc="A kernel module for Realtek 8168 network cards"
url="http://www.realtek.com.tw"
license=("GPL")
arch=('x86_64')
depends=('glibc' "linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
install=$pkgname.install
depends=('glibc' "linux=4.18.3")
makedepends=("linux-headers=4.18.3")
_extramodules=extramodules-CHAKRA
source=("https://github.com/mtorromeo/r8168/archive/$pkgver/$pkgname-$pkgver.tar.gz"
linux-4.15.patch)
sha256sums=('18161cb72fc872a9aed194514f7b8fb8b255b6fa6ed3d2dd459700eaad575f31'
@ -21,17 +19,23 @@ prepare() {
}
build() {
cd "$srcdir/$pkgname-$pkgver"
make -C /usr/lib/modules/$_kver/build \
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "$pkgname-$pkgver"
# avoid using the Makefile directly -- it doesn't understand
# any kernel but the current.
make -C /usr/lib/modules/$KERNEL_VERSION/build \
SUBDIRS="$srcdir/$pkgname-$pkgver/src" \
EXTRA_CFLAGS="-DCONFIG_R8168_NAPI -DCONFIG_R8168_VLAN" \
modules
}
package() {
cd "$srcdir/$pkgname-$pkgver/src"
install -D -m644 $pkgname.ko "$pkgdir/usr/lib/modules/$_extramodules/$pkgname.ko"
find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/$pkgname.install"
cd "$pkgname-$pkgver"
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 src/*.ko
find "$pkgdir" -name '*.ko' -exec xz {} +
echo "blacklist r8169" | \
install -Dm644 /dev/stdin "$pkgdir/usr/lib/modprobe.d/r8168.conf"
}

View File

@ -1,17 +0,0 @@
rebuild_module_dependencies() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_install() {
rebuild_module_dependencies
echo '>>> The module r8168 conflicts with r8169. You can blacklist it with:'
echo '>>> `echo "blacklist r8169" > /etc/modprobe.d/r8169_blacklist.conf`'
}
post_upgrade() {
rebuild_module_dependencies
}
post_remove() {
rebuild_module_dependencies
}

View File

@ -1,42 +0,0 @@
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
# Find the kernel name inside the chroot
_extramodules=extramodules-3.0-lts
_kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=tiacx-lts
pkgver=20080210
pkgrel=7
pkgdesc="OpenSource module for Texas Instruments ACX100/ACX111 wireless chips. For stock chakra kernel"
arch=('x86_64')
url="http://acx100.sourceforge.net/"
license=('MPL')
depends=('wireless_tools' 'linux-lts>=3.0' 'linux-lts<3.1' 'tiacx-firmware')
makedepends=('linux-lts-headers')
install=acx.install
source=(http://downloads.sourceforge.net/sourceforge/acx100/acx-$pkgver.tar.bz2
kernel-2.6.27.patch
kernel-2.6.30.patch
kernel-2.6.31.patch
kernel-2.6.33.patch)
md5sums=('7d5ce3215708e4e9f95cf567a9ee3a12'
'9895f72f8d0c84956b0f6c3b16df0fe8'
'e2900aee839ce711a7f7606b3e3de36e'
'dbcb276d77df7801cef58a85c18dfe94'
'9cd35ea33b8abdd2e4efec485b05477e')
build() {
cd ${srcdir}/acx-$pkgver
patch -p1 -i ../kernel-2.6.27.patch
patch -p0 -i ../kernel-2.6.30.patch
patch -p1 -i ../kernel-2.6.31.patch
patch -p0 -i ../kernel-2.6.33.patch
make -C /lib/modules/${_kver}/build M=`pwd`
install -D acx.ko $pkgdir/lib/modules/$_extramodules/acx.ko
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" ${startdir}/*.install
}

View File

@ -1,15 +0,0 @@
post_install()
{
post_upgrade
}
post_upgrade()
{
EXTRAMODULES='extramodules-3.0-lts'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove()
{
post_upgrade
}

View File

@ -1,82 +0,0 @@
diff -Nur acx-20080210.orig/ioctl.c acx-20080210/ioctl.c
--- acx-20080210.orig/ioctl.c 2008-02-10 21:06:42.000000000 +0100
+++ acx-20080210/ioctl.c 2008-10-10 17:07:32.000000000 +0200
@@ -489,6 +489,7 @@
static char*
acx_s_scan_add_station(
acx_device_t *adev,
+ struct iw_request_info *info,
char *ptr,
char *end_buf,
struct client *bss)
@@ -503,14 +504,14 @@
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
/* Add ESSID */
iwe.cmd = SIOCGIWESSID;
iwe.u.data.length = bss->essid_len;
iwe.u.data.flags = 1;
log(L_IOCTL, "scan, essid: %s\n", bss->essid);
- ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
+ ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
/* Add mode */
iwe.cmd = SIOCGIWMODE;
@@ -520,7 +521,7 @@
else
iwe.u.mode = IW_MODE_ADHOC;
log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_UINT_LEN);
}
/* Add frequency */
@@ -528,7 +529,7 @@
iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
iwe.u.freq.e = 1;
log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
/* Add link quality */
iwe.cmd = IWEVQUAL;
@@ -546,7 +547,7 @@
iwe.u.qual.updated = 7;
log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
- ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
+ ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
/* Add encryption */
iwe.cmd = SIOCGIWENCODE;
@@ -556,7 +557,7 @@
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
- ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
+ ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
/* add rates */
iwe.cmd = SIOCGIWRATE;
@@ -570,7 +571,7 @@
if (rate & 1) {
iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
- ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
+ ptr_rate = iwe_stream_add_value(info, ptr, ptr_rate, end_buf,
&iwe, IW_EV_PARAM_LEN);
}
rate >>= 1;
@@ -625,7 +626,7 @@
for (i = 0; i < ARRAY_SIZE(adev->sta_list); i++) {
struct client *bss = &adev->sta_list[i];
if (!bss->used) continue;
- ptr = acx_s_scan_add_station(adev, ptr,
+ ptr = acx_s_scan_add_station(adev, info, ptr,
extra + IW_SCAN_MAX_DATA, bss);
}
dwrq->length = ptr - extra;

View File

@ -1,16 +0,0 @@
--- wlan_compat.h~ 2009-06-12 09:17:30.000000000 +0200
+++ wlan_compat.h 2009-06-12 09:17:30.000000000 +0200
@@ -217,13 +217,6 @@
/*=============================================================*/
#define WLAN_PACKED __attribute__ ((packed))
-/* Interrupt handler backwards compatibility stuff */
-#ifndef IRQ_NONE
-#define IRQ_NONE
-#define IRQ_HANDLED
-typedef void irqreturn_t;
-#endif
-
#ifndef ARPHRD_IEEE80211_PRISM
#define ARPHRD_IEEE80211_PRISM 802
#endif

View File

@ -1,88 +0,0 @@
--- acx-20080210/pci.c 2008-02-10 21:06:42.000000000 +0100
+++ acx-20080210/pci.c 2009-09-11 22:27:28.000000000 +0200
@@ -1437,6 +1437,19 @@
static void dummy_netdev_init(struct net_device *ndev) {}
+static const struct net_device_ops acx_netdev_ops = {
+ .ndo_open = &acxpci_e_open,
+ .ndo_stop = &acxpci_e_close,
+ .ndo_start_xmit = &acx_i_start_xmit,
+ .ndo_get_stats = &acx_e_get_stats,
+#if IW_HANDLER_VERSION <= 5
+ .ndo_get_wireless_stats = &acx_e_get_wireless_stats,
+#endif
+ .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
+ .ndo_tx_timeout = &acxpci_i_tx_timeout,
+ .ndo_change_mtu = &acx_e_change_mtu,
+};
+
#ifdef CONFIG_PCI
static int __devinit acxpci_e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{
@@ -1547,17 +1560,8 @@
}
ether_setup(ndev);
- ndev->open = &acxpci_e_open;
- ndev->stop = &acxpci_e_close;
- ndev->hard_start_xmit = &acx_i_start_xmit;
- ndev->get_stats = &acx_e_get_stats;
-#if IW_HANDLER_VERSION <= 5
- ndev->get_wireless_stats = &acx_e_get_wireless_stats;
-#endif
- ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
- ndev->set_multicast_list = &acxpci_i_set_multicast_list;
- ndev->tx_timeout = &acxpci_i_tx_timeout;
- ndev->change_mtu = &acx_e_change_mtu;
+ ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
+ ndev->netdev_ops = &acx_netdev_ops;
ndev->watchdog_timeo = 4 * HZ;
ndev->irq = pdev->irq;
ndev->base_addr = pci_resource_start(pdev, 0);
--- acx-20080210/usb.c 2008-02-10 21:06:42.000000000 +0100
+++ acx-20080210/usb.c 2009-09-11 22:38:42.000000000 +0200
@@ -778,6 +778,21 @@
static void
dummy_netdev_init(struct net_device *ndev) {}
+static const struct net_device_ops acxusb_netdev_ops = {
+ .ndo_open = &acxusb_e_open,
+ .ndo_stop = &acxusb_e_close,
+ .ndo_start_xmit = (void *)&acx_i_start_xmit,
+ .ndo_get_stats = (void *)&acx_e_get_stats,
+#if IW_HANDLER_VERSION <= 5
+ .ndo_get_wireless_stats = (void *)&acx_e_get_wireless_stats,
+#endif
+ .ndo_set_multicast_list = (void *)&acxusb_i_set_rx_mode,
+#ifdef HAVE_TX_TIMEOUT
+ .ndo_tx_timeout = &acxusb_i_tx_timeout,
+#endif
+ .ndo_change_mtu = &acx_e_change_mtu,
+};
+
static int
acxusb_e_probe(struct usb_interface *intf, const struct usb_device_id *devID)
{
@@ -845,20 +860,11 @@
/* Register the callbacks for the network device functions */
ether_setup(ndev);
- ndev->open = &acxusb_e_open;
- ndev->stop = &acxusb_e_close;
- ndev->hard_start_xmit = (void *)&acx_i_start_xmit;
- ndev->get_stats = (void *)&acx_e_get_stats;
-#if IW_HANDLER_VERSION <= 5
- ndev->get_wireless_stats = (void *)&acx_e_get_wireless_stats;
-#endif
ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
- ndev->set_multicast_list = (void *)&acxusb_i_set_rx_mode;
+ ndev->netdev_ops = &acxusb_netdev_ops;
#ifdef HAVE_TX_TIMEOUT
- ndev->tx_timeout = &acxusb_i_tx_timeout;
ndev->watchdog_timeo = 4 * HZ;
#endif
- ndev->change_mtu = &acx_e_change_mtu;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) && defined(SET_MODULE_OWNER)
SET_MODULE_OWNER(ndev);
#endif

View File

@ -1,11 +0,0 @@
--- pci.c~ 2010-02-27 19:30:54.000000000 +0100
+++ pci.c 2010-02-27 19:30:54.000000000 +0100
@@ -35,7 +35,7 @@
/* Linux 2.6.18+ uses <linux/utsrelease.h> */
#ifndef UTS_RELEASE
-#include <linux/utsrelease.h>
+#include <generated/utsrelease.h>
#endif
#include <linux/compiler.h> /* required for Lx 2.6.8 ?? */

View File

@ -1,18 +1,15 @@
# Source global configuration
source ../linux-lts.conf
pkgname=vhba-module-lts
_pkgname=vhba-module
pkgver=20170610
pkgrel=3
pkgrel=6
pkgdesc="Kernel module that emulates SCSI devices"
arch=('x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL2')
depends=("linux-lts>=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
install=vhba-module.install
makedepends=("linux-lts-headers=4.4.150")
_extramodules=extramodules-CHAKRA-LTS
source=("http://sourceforge.net/projects/cdemu/files/vhba-module/vhba-module-$pkgver.tar.bz2"
'60-vhba.rules')
md5sums=('f9478a5f5528fc672c204b6b4bd02213'
@ -23,13 +20,12 @@ prepare() {
}
build() {
cd "$_pkgname-$pkgver"
make KDIR=$_rootOfSourceTree KERNELRELEASE=$_kver
cd $_pkgname-$pkgver
make KERNELRELEASE="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
cd $_pkgname-$pkgver
install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/${_extramodules}/vhba.ko"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/vhba-module.install"
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
}

View File

@ -1,16 +0,0 @@
post_install() {
echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot."
echo ">> This module needs to be recompiled for every kernel version upgrade."
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
post_install
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}

View File

@ -1,16 +1,14 @@
# Source global configuration
source ../linux.conf
pkgname=vhba-module
pkgver=20170610
pkgrel=10
pkgrel=13
pkgdesc="Kernel module that emulates SCSI devices"
arch=('x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL')
depends=("linux=${_kernelver}")
makedepends=("linux-headers=${_kernelver}")
install=vhba-module.install
depends=("linux=4.18.3")
makedepends=("linux-headers=4.18.3")
_extramodules=extramodules-CHAKRA
source=("http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2"
60-vhba.rules)
md5sums=('f9478a5f5528fc672c204b6b4bd02213'
@ -26,13 +24,7 @@ build() {
}
package() {
depends=("linux=${_kernelver}")
install=vhba-module.install
cd $pkgname-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/vhba-module.install"
}

View File

@ -1,14 +0,0 @@
post_install() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
post_install
}
post_remove() {
EXTRAMODULES='extramodules-4.16-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}