From a43211ffe2915a7072f34250db6201cf9f2b4551 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 25 Feb 2012 05:40:01 -0200 Subject: kernels/linux-libre-rt --- kernels/linux-libre-rt/PKGBUILD | 103 ++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 41 deletions(-) (limited to 'kernels/linux-libre-rt/PKGBUILD') diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index 4e3775f57..336d58cb0 100644 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -1,73 +1,86 @@ -# $Id: PKGBUILD 130991 2011-07-09 12:23:51Z thomas $ -# Maintainer (Parabola): Nicolás Reynolds -# Based on linux-libre +# Maintainer: Joakim Hernberg +# Contributor: Ray Rashif +# Contributor: timbosa +# Contributor: Tobias Powalowski +# Contributor: Thomas Baechler +# Contributor (Parabola): Nicolás Reynolds +# Contributor (Parabola): Jorge Lopez +# Contributor (Parabola): André Silva pkgbase=linux-libre-rt pkgname=('linux-libre-rt' 'linux-libre-rt-headers' 'linux-libre-rt-docs') # Build stock -LIBRE kernel # pkgname=linux-custom # Build kernel with a different name _kernelname=${pkgname#linux-libre} -_basekernel=3.0 -_rtpatch=rt11 -pkgver=${_basekernel}.1 +_basekernel=3.2 +_releasever=6 +_rtpatchver=rt13 +_pkgver=${_basekernel}.${_releasever} +pkgver=${_basekernel}.${_releasever}_${_rtpatchver} pkgrel=1 arch=('i686' 'x86_64') -url="http://linux-libre.fsfla.org" +url="http://linux-libre.fsfla.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz" - "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz" - "ftp://ftp.kernel.org/pub/linux/kernel/projects/rt/patch-${pkgver}-${_rtpatch}.patch.bz2" + "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}-libre/patch-${_basekernel}-libre-${_pkgver}-libre.xz" + "http://www.kernel.org/pub/linux/kernel/projects/rt/3.2/patch-${_pkgver}-${_rtpatchver}.patch.xz" # the main kernel config files 'config.i686' 'config.x86_64' # standard config files for mkinitcpio ramdisk "${pkgname}.preset" 'boot-logo.patch' - 'fix-i915.patch' - 'change-default-console-loglevel.patch') -md5sums=('44e7bc20c235a193f9b6123a8d5e9509' - 'af8d721036d89ed5500675c3289e3b48' - 'cae25ea86cfa577ca180e547be82c249' - '7a3bdd9e9a785a23a996cd78b79c3848' - '4c2f492b4c91f3cac409804a33da3c29' + 'change-default-console-loglevel.patch' + 'i915-fix-ghost-tv-output.patch' + 'i915-gpu-finish.patch') +md5sums=('27c641c4f6785fc647cdd3e44963a55c' + 'c4b411e90294fcb768d5242a6c21c0d7' + '28f2792000aa309437d8aefdcba65634' + 'b82b72aed2edc07797f7c29adf0b8793' + '92071f14b33bf6d18be512e61989d0c4' '0d001b0277f318bc40a263aaa980d44e' '04b21c79df0a952c22d681dd4f4562df' + '9d3c56a4b999c8bfbd4018089a62f662' '263725f20c0b9eb9c353040792d644e5' - '9d3c56a4b999c8bfbd4018089a62f662') + '4cd79aa147825837dc8bc9f6b736c0a0') build() { cd "${srcdir}/linux-${_basekernel}" - patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre" + patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${_pkgver}-libre" + + # add realtime patch + patch -Np1 -i "${srcdir}/patch-${_pkgver}-${_rtpatchver}.patch" # Add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" - # fix #19234 i1915 display size - patch -Np1 -i "${srcdir}/fix-i915.patch" + # fix FS#27883 + # drm/i915: Only clear the GPU domains upon a successful finish + patch -Np1 -i "${srcdir}/i915-gpu-finish.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" # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - # Apply RT patches - patch -Np1 -i "${srcdir}/patch-${pkgver}-${_rtpatch}.patch" - - cat "$srcdir/config.$CARCH" > ./.config # simpler + cat "${srcdir}/config.${CARCH}" > ./.config # simpler if [ "${_kernelname}" != "" ]; then sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config fi - # remove the "-libre" extraversion from Makefile - sed -i 's|^EXTRAVERSION =.*$|EXTRAVERSION =|g' Makefile - - # 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 rm localversion-rt @@ -88,7 +101,7 @@ build() { #return 1 #################### - yes "" | make config + yes "" | make # build! make ${MAKEFLAGS} bzImage modules @@ -99,11 +112,11 @@ package_linux-libre-rt() { groups=('base') depends=('coreutils' 'module-init-tools>=3.16' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') + provides=('kernel26' "linux=$_pkgver") + conflicts=('kernel26' 'kernel26-libre' 'linux') + replaces=('kernel26' 'kernel26-libre' 'linux') backup=("etc/mkinitcpio.d/${pkgname}.preset") install=${pkgname}.install - provides=("linux-rt=${pkgver}") - replaces=('linux-rt') - conflicts=('linux-rt') cd "${srcdir}/linux-${_basekernel}" @@ -137,12 +150,20 @@ package_linux-libre-rt() { 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-rt-headers() { pkgdesc="Header files and scripts for building modules for linux-libre kernel" + provides=('kernel26-headers' "linux-headers=${_pkgver}") + conflicts=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers') + replaces=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers') mkdir -p "${pkgdir}/lib/modules/${_kernver}" @@ -271,17 +292,17 @@ package_linux-libre-rt-headers() { package_linux-libre-rt-docs() { pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux-libre kernel." - provides=('kernel26-docs' "linux-docs=$pkgver") + provides=('kernel26-docs' "linux-docs=$_pkgver") + conflicts=('kernel26-docs' 'kernel26-libre-docs' 'linux-docs') + replaces=('kernel26-docs' 'kernel26-libre-docs' 'linux-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" } - -# vim:set ts=2 sw=2 et: -- cgit v1.2.3-54-g00ecf