diff options
Diffstat (limited to 'abs/core/linux/PKGBUILD')
-rw-r--r-- | abs/core/linux/PKGBUILD | 125 |
1 files changed, 69 insertions, 56 deletions
diff --git a/abs/core/linux/PKGBUILD b/abs/core/linux/PKGBUILD index 0784623..478bc95 100644 --- a/abs/core/linux/PKGBUILD +++ b/abs/core/linux/PKGBUILD @@ -1,16 +1,16 @@ -# $Id: PKGBUILD 130991 2011-07-09 12:23:51Z thomas $ +# $Id: PKGBUILD 202755 2013-12-26 10:19:24Z thomas $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Maintainer: Thomas Baechler <thomas@archlinux.org> pkgbase=linux # Build stock -ARCH kernel #pkgbase=linux-custom # Build kernel with a different name -_srcname=linux-3.6 -pkgver=3.6.7 +_srcname=linux-3.12 +pkgver=3.12.6 pkgrel=1 arch=('i686' 'x86_64') url="http://www.kernel.org/" license=('GPL2') -makedepends=('xmlto' 'docbook-xsl') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz" "http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz" @@ -19,13 +19,24 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz" # standard config files for mkinitcpio ramdisk 'linux.preset' 'change-default-console-loglevel.patch' - 'module-symbol-waiting-3.6.patch' - 'module-init-wait-3.6.patch' - 'irq_cfg_pointer-3.6.6.patch') + 'criu-no-expert.patch') +md5sums=('cc6ee608854e0da4b64f6c1ff8b6398c' + '9e75be8b127e58f1a76c0015eabb12ae' + '5259c05d5791002e81cb6eca368caa60' + 'a884d449ea454a75e9d0b6165336734c' + 'eb14dcfd80c00852ef81ded6e826826a' + '98beb36f9b8cf16e58de2483ea9985e3' + 'd50c1ac47394e9aec637002ef3392bd1') _kernelname=${pkgbase#linux} -build() { +# module.symbols md5sums +# x86_64 +# 23ef8d9dae0c916c9e1a7a07b77f797d /lib/modules/3.12.6-1-ARCH/modules.symbols +# i686 +# eadbff034e17f92ccb4a7737302f3dbd /lib/modules/3.12.6-1-ARCH/modules.symbols + +prepare() { cd "${srcdir}/${_srcname}" # add upstream patch @@ -39,13 +50,9 @@ build() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" - # fix module initialisation - # https://bugs.archlinux.org/task/32122 - patch -Np1 -i "${srcdir}/module-symbol-waiting-3.6.patch" - patch -Np1 -i "${srcdir}/module-init-wait-3.6.patch" - - # fix FS#32615 - Check for valid irq_cfg pointer in smp_irq_move_cleanup_interrupt - patch -Np1 -i "${srcdir}/irq_cfg_pointer-3.6.6.patch" + # allow criu without expert option set + # patch from fedora + patch -Np1 -i "${srcdir}/criu-no-expert.patch" if [ "${CARCH}" = "x86_64" ]; then cat "${srcdir}/config.x86_64" > ./.config @@ -63,6 +70,10 @@ build() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh +} + +build() { + cd "${srcdir}/${_srcname}" # get kernel version make prepare @@ -96,7 +107,7 @@ build() { } _package() { - pkgdesc="The ${pkgbase} kernel and modules" + pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" [ "${pkgbase}" = "linux" ] && groups=('base') depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') @@ -115,6 +126,7 @@ _package() { _basekernel=${_kernver%%-*} _basekernel=${_basekernel%.*} + echo mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" @@ -122,14 +134,16 @@ _package() { # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux" - # install fallback mkinitcpio.conf file and preset file for kernel - install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - # set correct depmod command for install + cp -f "${startdir}/${install}" "${startdir}/${install}.pkg" + true && install=${install}.pkg sed \ -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \ -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \ - -i "${startdir}/linux.install" + -i "${startdir}/${install}" + + # install mkinitcpio preset file for kernel + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" sed \ -e "1s|'linux.*'|'${pkgbase}'|" \ -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ @@ -149,16 +163,15 @@ _package() { mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}" echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version" - # Now we call depmod... - - echo depmod -b "$pkgdir" -F System.map "$_kernver" # move module tree /lib -> /usr/lib mv "$pkgdir/lib" "$pkgdir/usr" -read a + # Now we call depmod... + depmod -b "$pkgdir" -F System.map "$_kernver" + } _package-headers() { - pkgdesc="Header files and scripts for building modules for ${pkgbase} kernel" + pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" provides=("kernel26${_kernelname}-headers=${pkgver}") conflicts=("kernel26${_kernelname}-headers") replaces=("kernel26${_kernelname}-headers") @@ -178,8 +191,8 @@ _package-headers() { mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include" - for i in acpi asm-generic config crypto drm generated linux math-emu \ - media mtd net pcmcia scsi sound trace video xen; do + for i in acpi asm-generic config crypto drm generated keys linux math-emu \ + media net pcmcia scsi sound trace uapi video xen; do cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/" done @@ -206,13 +219,22 @@ _package-headers() { cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/" # add headers for lirc package - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video" - - cp drivers/media/video/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/" - - for i in bt8xx cpia2 cx25840 cx88 em28xx pwc saa7134 sn9c102; do - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}" - cp -a drivers/media/video/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/${i}" + # pci + for i in bt8xx cx88 saa7134; do + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}" + cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}" + done + # usb + for i in cpia2 em28xx pwc sn9c102; do + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}" + cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}" + done + # i2c + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c" + cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/" + for i in cx25840; do + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}" + cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}" done # add docbook makefile @@ -234,8 +256,8 @@ _package-headers() { # add dvb headers for external modules # in reference to: # http://bugs.archlinux.org/task/9912 - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core" - cp drivers/media/dvb/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-core/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core" + cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/" # and... # http://bugs.archlinux.org/task/11194 mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/" @@ -244,19 +266,19 @@ _package-headers() { # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new # in reference to: # http://bugs.archlinux.org/task/13146 - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/" - cp drivers/media/dvb/frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/" - cp drivers/media/video/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/" + cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/" + cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/" # add dvb headers # in reference to: # http://bugs.archlinux.org/task/20402 - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb" - cp drivers/media/dvb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/dvb-usb/" - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends" - cp drivers/media/dvb/frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb/frontends/" - mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners" - cp drivers/media/common/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/common/tuners/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb" + cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends" + cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/" + mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners" + cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/" # add xfs and shmem for aufs building mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs" @@ -285,11 +307,11 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} + rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} } _package-docs() { - pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase} kernel" + pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel" provides=("kernel26${_kernelname}-docs=${pkgver}") conflicts=("kernel26${_kernelname}-docs") replaces=("kernel26${_kernelname}-docs") @@ -313,12 +335,3 @@ for _p in ${pkgname[@]}; do done # vim:set ts=8 sts=2 sw=2 et: -md5sums=('1a1760420eac802c541a20ab51a093d1' - '134936c362d8812b5cafcf3c67afdce0' - '65f7ff39775f20f65014383564d3cb65' - '3adbfa45451c4bcf9dd7879bed033d77' - 'eb14dcfd80c00852ef81ded6e826826a' - '9d3c56a4b999c8bfbd4018089a62f662' - '670931649c60fcb3ef2e0119ed532bd4' - '8a71abc4224f575008f974a099b5cf6f' - '4909a0271af4e5f373136b382826717f') |