summaryrefslogtreecommitdiff
path: root/libre/linux-libre/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre/PKGBUILD')
-rw-r--r--libre/linux-libre/PKGBUILD59
1 files changed, 33 insertions, 26 deletions
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index f77102426..45e458d5e 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -8,8 +8,8 @@ pkgbase=linux-libre
pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock -LIBRE kernel
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux-libre}
-_basekernel=3.0
-pkgver=${_basekernel}.7
+_basekernel=3.1
+pkgver=${_basekernel}.2
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://linux-libre.fsfla.org/"
@@ -26,8 +26,10 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-li
'Kbuild'
'Kbuild.platforms'
'boot-logo.patch'
- 'fix-i915.patch'
- 'change-default-console-loglevel.patch')
+ 'change-default-console-loglevel.patch'
+ 'i915-fix-ghost-tv-output.patch'
+ 'i915-fix-incorrect-error-message.patch'
+ 'usb-add-reset-resume-quirk-for-several-webcams.patch')
build() {
cd "${srcdir}/linux-${_basekernel}"
@@ -37,8 +39,23 @@ build() {
# Add freedo as boot logo
patch -Np1 -i "${srcdir}/boot-logo.patch"
- # fix #19234 i1915 display size
- patch -Np1 -i "${srcdir}/fix-i915.patch"
+ # Some chips detect a ghost TV output
+ # mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html
+ # Arch Linux bug report: FS#19234
+ #
+ # It is unclear why this patch wasn't merged upstream, it was accepted,
+ # then dropped because the reasoning was unclear. However, it is clearly
+ # needed.
+ patch -Np1 -i "${srcdir}/i915-fix-ghost-tv-output.patch"
+
+ # In 3.1.1, a DRM_DEBUG message is falsely declared as DRM_ERROR. This
+ # worries users, as this message is displayed even at loglevel 4. Fix
+ # this.
+ patch -Np1 -i "${srcdir}/i915-fix-incorrect-error-message.patch"
+
+ # Add the USB_QUIRK_RESET_RESUME for several webcams
+ # FS#26528
+ patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch"
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
@@ -48,7 +65,7 @@ build() {
if [ "$CARCH" == "mips64el" ]; then
sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile
msg2 "Adding loongson-community patches"
- patch -Np1 -i "${srcdir}/${_basekernel}-*-loongson-community.patch"
+ patch -Np1 -i ${srcdir}/${_basekernel}-*-loongson-community.patch
patch -Np0 -i "${srcdir}/lxo-config.patch"
# ensure N32
@@ -62,15 +79,8 @@ build() {
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
- # remove the "-libre" extraversion from Makefile
- sed -i 's|^EXTRAVERSION =.*$|EXTRAVERSION =|g' Makefile
- sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|# CONFIG_LOCALVERSION_AUTO is not set|g" ./.config
-
- # remove the sublevel from Makefile
- # this ensures our kernel version is always 3.X-LIBRE
- # this way, minor kernel updates will not break external modules
- # we need to change this soon, see FS#16702
- sed -ri 's|^(SUBLEVEL =).*|\1|' Makefile
+ # set extraversion to pkgrel
+ sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
# get kernel version
make prepare
@@ -156,8 +166,13 @@ package_linux-libre() {
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
- # gzip -9 all modules to safe 100MB of space
+ # 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:--LIBRE}" "${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:--LIBRE}"
+ echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--LIBRE}/version"
}
package_linux-libre-headers() {
@@ -320,18 +335,10 @@ package_linux-libre-docs() {
cd "${srcdir}/linux-${_basekernel}"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}"
- cp -r Documentation "${pkgdir}/usr/src/linux-${_kernver}"
+ cp -al Documentation "${pkgdir}/usr/src/linux-${_kernver}"
find "${pkgdir}" -type f -exec chmod 444 {} \;
find "${pkgdir}" -type d -exec chmod 755 {} \;
# remove a file already in linux package
rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
}
-md5sums=('44e7bc20c235a193f9b6123a8d5e9509'
- '8840c46301f6eb425b9ab456d1ca7b7f'
- '8089b63fdecf93735f178eb2907ce61e'
- '4cc90e12cab492c1d61183c47683bd52'
- 'a8a3843046926eb7ab81312cd438c5c5'
- '04b21c79df0a952c22d681dd4f4562df'
- '263725f20c0b9eb9c353040792d644e5'
- '9d3c56a4b999c8bfbd4018089a62f662')