diff options
author | Yurii Kolesnykov | 2017-08-25 01:09:30 +0300 |
---|---|---|
committer | Yurii Kolesnykov | 2017-08-25 01:09:30 +0300 |
commit | 8faeceb301ac8aa7bb175278dadacc46facf9bdc (patch) | |
tree | 362007a2df2772f3a58c59d29bb37f91a6d42652 | |
parent | 77c5e4a73d051ae46d906b187ea09675f03e9510 (diff) | |
download | aur-8faeceb301ac8aa7bb175278dadacc46facf9bdc.tar.gz |
port from linux-git
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 96 |
2 files changed, 53 insertions, 60 deletions
@@ -1,9 +1,8 @@ pkgbase = linux-amd-staging-drm-next-git pkgdesc = Linux kernel with AMDGPU DC patches pkgver = 4.13rc2.r1097.g58e5ccdc343d - pkgrel = 1 + pkgrel = 2 url = https://cgit.freedesktop.org/~agd5f/linux/ - arch = i686 arch = x86_64 license = GPL2 makedepends = xmlto @@ -11,33 +10,35 @@ pkgbase = linux-amd-staging-drm-next-git makedepends = kmod makedepends = inetutils makedepends = bc - makedepends = git makedepends = libelf + makedepends = git + optdepends = vega10-firmware options = !strip source = linux-amd-staging-drm-next-git::git://people.freedesktop.org/~agd5f/linux#branch=amd-staging-drm-next source = config.x86_64 - source = config.i686 source = 90-linux.hook source = linux.preset sha256sums = SKIP sha256sums = 6d7a52b0ae947fe0984e11f1d88c701ceaa535eb176b3e905a78aa3ead656197 - sha256sums = becc0c98cff692dee9500f19d38882636caf4c58d5086c7725690a245532f5dc sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0 sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65 pkgname = linux-amd-staging-drm-next-git - pkgdesc = The Linux-amd-staging-drm-next-git kernel and modules with AMDGPU DC patches + pkgdesc = The Linux kernel and modules with AMDGPU DC patches install = linux.install depends = coreutils depends = linux-firmware depends = kmod depends = mkinitcpio>=0.7 optdepends = crda: to set the correct wireless channels of your country + provides = linux backup = etc/mkinitcpio.d/linux-amd-staging-drm-next-git.preset pkgname = linux-amd-staging-drm-next-git-headers - pkgdesc = Header files and scripts for building modules for Linux-amd-staging-drm-next-git kernel with AMDGPU DC patches + pkgdesc = Header files and scripts for building modules for Linux kernel with AMDGPU DC patches + provides = linux-headers pkgname = linux-amd-staging-drm-next-git-docs - pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-amd-staging-drm-next-git kernel with AMDGPU DC patches + pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux kernel with AMDGPU DC patches + provides = linux-docs @@ -8,45 +8,38 @@ _srcname=$pkgbase _branch=amd-staging-drm-next _kernelname=${pkgbase#linux} pkgver=4.13rc2.r1097.g58e5ccdc343d -pkgrel=1 -arch=('i686' 'x86_64') +pkgrel=2 +arch=('x86_64') url='https://cgit.freedesktop.org/~agd5f/linux/' license=('GPL2') -makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'libelf') +makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf' 'git') +optdepends=('vega10-firmware') options=('!strip') source=("${pkgbase}::git://people.freedesktop.org/~agd5f/linux#branch=${_branch}" # the main kernel config files - 'config.x86_64' 'config.i686' + 'config.x86_64' # pacman hook for initramfs regeneration '90-linux.hook' # standard config files for mkinitcpio ramdisk 'linux.preset') sha256sums=('SKIP' '6d7a52b0ae947fe0984e11f1d88c701ceaa535eb176b3e905a78aa3ead656197' - 'becc0c98cff692dee9500f19d38882636caf4c58d5086c7725690a245532f5dc' '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0' 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65') pkgver() { - cd "${srcdir}/${_srcname}" + cd "${_srcname}" git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/' } prepare() { - cd "${srcdir}/${_srcname}" + cd "${_srcname}" - # add latest fixes from stable queue, if needed - # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git + cat "${srcdir}/config.x86_64" > ./.config - cat "${srcdir}/config.${CARCH}" > ./.config - - if [ "${_kernelname}" != "" ]; then - sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config - sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config - fi - - # set extraversion to pkgrel - sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile + # set localversion to git commit + sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"-${pkgver##*.}\"|g" ./.config + sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh @@ -60,27 +53,25 @@ prepare() { #make nconfig # new CLI menu for configuration #make xconfig # X-based configuration #make oldconfig # using old config from previous kernel version + make olddefconfig # old config from previous kernel, defaults for new options # ... or manually edit .config - - # rewrite configuration - yes "" | make config >/dev/null } build() { - cd "${srcdir}/${_srcname}" + cd "${_srcname}" make ${MAKEFLAGS} LOCALVERSION= bzImage modules } _package() { - pkgdesc="The ${pkgbase/linux/Linux} kernel and modules with AMDGPU DC patches" - [ "${pkgbase}" = "linux" ] && groups=('base') + pkgdesc="The Linux kernel and modules with AMDGPU DC patches" depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') + provides=('linux') backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install - cd "${srcdir}/${_srcname}" + cd "${_srcname}" KARCH=x86 @@ -94,17 +85,21 @@ _package() { cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # set correct depmod command for install - sed -e "s|%PKGBASE%|${pkgbase}|g;s|%KERNVER%|${_kernver}|g" \ - "${startdir}/${install}" > "${startdir}/${install}.pkg" + 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}/${install}" # install mkinitcpio preset file for kernel - sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/linux.preset" | - install -D -m644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - - # install pacman hook for initramfs regeneration - sed "s|%PKGBASE%|${pkgbase}|g" "${srcdir}/90-linux.hook" | - install -D -m644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" + install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + sed \ + -e "1s|'linux.*'|'${pkgbase}'|" \ + -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ + -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ + -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ + -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" # remove build and source links rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build} @@ -125,14 +120,18 @@ _package() { # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" + + # add System.map + install -D -m644 System.map "${pkgdir}/boot/System.map-${_kernver}" } _package-headers() { - pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel with AMDGPU DC patches" + pkgdesc="Header files and scripts for building modules for Linux kernel with AMDGPU DC patches" + provides=('linux-headers') install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" - cd "${srcdir}/${_srcname}" + cd "${_srcname}" install -D -m644 Makefile \ "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile" install -D -m644 kernel/Makefile \ @@ -143,7 +142,7 @@ _package-headers() { mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include" for i in acpi asm-generic config crypto drm generated keys linux math-emu \ - media net pcmcia scsi soc sound trace uapi video xen; do + media net pcmcia scsi sound trace uapi video xen; do cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/" done @@ -169,10 +168,6 @@ _package-headers() { cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/" - # add docbook makefile - install -D -m644 Documentation/DocBook/Makefile \ - "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile" - # add dm headers mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md" cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md" @@ -225,11 +220,12 @@ _package-headers() { cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}" done - # add objtool for external module building and enabled VALIDATION_STACK option - if [ -f tools/objtool/objtool ]; then - mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool" - cp -a tools/objtool/objtool ${pkgdir}/usr/lib/modules/${_kernver}/build/tools/objtool/ - fi + # Fix file conflict with -doc package + rm "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild"/Kconfig.*-* + + # Add objtool for CONFIG_STACK_VALIDATION + mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools" + cp -a tools/objtool "${pkgdir}/usr/lib/modules/${_kernver}/build/tools" chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build" find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \; @@ -248,17 +244,13 @@ _package-headers() { # remove unneeded architectures rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/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} - - # remove a files already in linux-docs package - rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-01" - rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.recursion-issue-02" - rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild/Kconfig.select-break" } _package-docs() { - pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel with AMDGPU DC patches" + pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel with AMDGPU DC patches" + provides=('linux-docs') - cd "${srcdir}/${_srcname}" + cd "${_srcname}" mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build" cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build" |