diff options
author | David P <megver83@parabola.nu> | 2018-03-30 16:23:10 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2018-03-30 16:23:10 -0300 |
commit | dd608a35a0078d54d437b0b15892601b27b89050 (patch) | |
tree | ab977f3e300fb31288ef039f7d9eddec149d17f3 /kernels/linux-libre-pae/PKGBUILD | |
parent | 7a1b0320d7cc8f1f0677f83b88ca4b49ec4c55f2 (diff) | |
download | abslibre-dd608a35a0078d54d437b0b15892601b27b89050.tar.gz abslibre-dd608a35a0078d54d437b0b15892601b27b89050.tar.bz2 abslibre-dd608a35a0078d54d437b0b15892601b27b89050.zip |
upgpkg: kernels/linux-libre-pae 4.15.14_gnu-1
Diffstat (limited to 'kernels/linux-libre-pae/PKGBUILD')
-rw-r--r-- | kernels/linux-libre-pae/PKGBUILD | 179 |
1 files changed, 100 insertions, 79 deletions
diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index 65672e928..42095c400 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -10,8 +10,8 @@ # Based on linux-pae package pkgbase=linux-libre-pae -_pkgbasever=4.13-gnu -_pkgver=4.13.13-gnu +_pkgbasever=4.15-gnu +_pkgver=4.15.14-gnu _replacesarchkernel=('linux%') # '%' gets replaced with _kernelname _replacesoldkernels=() # '%' gets replaced with _kernelname @@ -25,23 +25,33 @@ arch=('i686') url="https://linux-libre.fsfla.org/" license=('GPL2') makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf') +makedepends_armv7h=('git') options=('!strip') -source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign} - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"{,.sign} - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm"{,.sig} - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm"{,.sig} - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"{,.sig} - # the main kernel config files - 'config' - # pacman hook for initramfs regeneration - '90-linux.hook' - # standard config files for mkinitcpio ramdisk - 'linux.preset' - '0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch' - '0002-fix-Atmel-maXTouch-touchscreen-support.patch') -sha512sums=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c2777d7f4191831008b532cb2ab6f686d8c4f457a4d005226c73f90937963518' +source=( + "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz"{,.sign} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz"{,.sign} + "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_clut224.ppm"{,.sig} + "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_mono.pbm"{,.sig} + "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_vga16.ppm"{,.sig} + # the main kernel config file + 'config' + # pacman hooks for depmod and initramfs regeneration + '60-linux.hook' '90-linux.hook' + # standard config files for mkinitcpio ramdisk + 'linux.preset' + # other patches + '0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch' + '0002-fix-Atmel-maXTouch-touchscreen-support.patch' + '0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch' + '0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch' +) +validpgpkeys=( + '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva + '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. +) +sha512sums=('a55cc663c6fb1e1cfa7905282b368b5d5888bc2398f0acf37e5bb9a232ded04fd566b1980e654da26aaec005332e458581495184d6bd4cec669181085d4d78a5' 'SKIP' - '9c4e753de1865778a5bdece95ed4487cedf55d23d383640ec3616db4b631e971bf1ac21d7019677dde2dbd9d7469ea20f58a7b11496f7e56d6c0162bcf2d657a' + 'cdbdacb10b290fe43ed7581e9cf2308a094865a860f75780b3afbd8a3d4259972e5c9b612fce2beafc7417d6260a134a7a59e213ab2f8aedce651707c8c4c150' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -49,31 +59,30 @@ sha512sums=('9ad6866c68f29f7e4f8b53d0b857f9b3c7f6abd0054460675c76f3100db34a77c27 'SKIP' '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' 'SKIP' - '886c082fccde8c22ec283f886a3394996253d03c6b291e58ffe1e9891d109948b9bb14da2df0567d56cbad7006564184010de8710618880ef37f35cf911d4af2' - 'd6faa67f3ef40052152254ae43fee031365d0b1524aa0718b659eb75afc21a3f79ea8d62d66ea311a800109bed545bc8f79e8752319cd378eef2cbd3a09aba22' + 'f1e617d6479d8f6e3f85d6f61f4aee31123057a9dcfbc074dc902a0c2f6ff494b3a37044b41a8529e6e9af53930cf87eaa6a898cb96ed46b6f5416a22c108eaf' + '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a' + '4a8b324aee4cccf3a512ad04ce1a272d14e5b05c8de90feb82075f55ea3845948d817e1b0c6f298f5816834ddd3e5ce0a0e2619866289f3c1ab8fd2f35f04f44' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168') -validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. -) + 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' + '0f5531df585efa48e72b335ab88973bbce6c3807db55dcfac2fcda20f69618ee5bd5881ab278bd8cdde1f96bc34d5becca11469516c56a157248e0ae793d8679' + '04dfdfca8b59c2c3c18eb4b59f6466ef6d2fe6799a8b77f403fbce0554bfc739e43ff20897d9a6ed97ca101ab1bc1b067ff4a2491e3607b42de43f45005dc323') _kernelname=${pkgbase#linux-libre} _replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${_kernelname}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${_kernelname}}") - KARCH=x86 +KARCH=x86 prepare() { cd ${_srcname} # add upstream patch if [ "${_pkgbasever}" != "${_pkgver}" ]; then - patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}" + patch -p1 -i ../patch-${_pkgbasever}-${_pkgver} fi - + # add freedo as boot logo install -m644 -t drivers/video/logo \ "${srcdir}/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm} @@ -81,19 +90,30 @@ prepare() { # 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 + # maintain the TTY over USB disconnects # http://www.coreboot.org/EHCI_Gadget_Debug - patch -p1 -i "${srcdir}/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch" + patch -p1 -i ../0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch # fix Atmel maXTouch touchscreen support # https://labs.parabola.nu/issues/877 # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html - patch -p1 -i "${srcdir}/0002-fix-Atmel-maXTouch-touchscreen-support.patch" + patch -p1 -i ../0002-fix-Atmel-maXTouch-touchscreen-support.patch - cp -Tf ../config .config + cat ../config - >.config <<END +CONFIG_LOCALVERSION="${_kernelname}" +CONFIG_LOCALVERSION_AUTO=n +END - # append pkgrel to extraversion - sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile + # append pkgrel to extraversion and empty localversion + sed -e "/^EXTRAVERSION = -gnu/s/-gnu.*/-gnu-${pkgrel}/" \ + -e "/^EXTRAVERSION =/aLOCALVERSION =" \ + -i Makefile # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh @@ -120,61 +140,64 @@ build() { } _package() { - pkgdesc="The ${pkgbase^} kernel and modules with PAE support (HIGHMEM64G)" + pkgdesc="The ${pkgbase^} kernel and modules" [ "${pkgbase}" = "linux-libre" ] && groups=('base' 'base-openrc') depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') - provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}" "LINUX-ABI_VERSION=${_archpkgver}") + provides=("${_replacesarchkernel[@]/%/=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") replaces=("${_replacesarchkernel[@]}" "${_replacesoldkernels[@]}" "${_replacesoldmodules[@]}") backup=("etc/mkinitcpio.d/${pkgbase}.preset") install=linux.install - cd "${srcdir}/${_srcname}" + cd ${_srcname} # get kernel version - _kernver="$(make LOCALVERSION= kernelrelease)" + _kernver="$(make kernelrelease)" _basekernel=${_kernver%%-*} _basekernel=${_basekernel%.*} - mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} - make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install + mkdir -p "${pkgdir}"/{boot,usr/lib/modules} + make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install 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" - true && install=${install}.pkg - - # install mkinitcpio preset file for kernel - sed "s|%PKGBASE%|${pkgbase}|g" ../linux.preset | - install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" - - # install pacman hook for initramfs regeneration - sed "s|%PKGBASE%|${pkgbase}|g" ../90-linux.hook | - install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" - - # remove build and source links - rm "${pkgdir}"/lib/modules/${_kernver}/{source,build} - - # remove the firmware - rm -r "${pkgdir}/lib/firmware" - # make room for external modules - ln -s "../extramodules-${_basekernel}${_kernelname}" "${pkgdir}/lib/modules/${_kernver}/extramodules" - - # add real version for building modules and running depmod from post_install/upgrade + 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}/lib/modules/extramodules-${_basekernel}${_kernelname}/version" + install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version" - # Now we call depmod... - depmod -b "${pkgdir}" -F System.map "${_kernver}" + # remove build and source links + rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build} - # move module tree /lib -> /usr/lib - mv -t "${pkgdir}/usr" "${pkgdir}/lib" + # now we call depmod... + depmod -b "${pkgdir}/usr" -F System.map "${_kernver}" # add vmlinux - install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" + install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux + + # sed expression for following substitutions + 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 + + # install mkinitcpio preset file + sed "${_subst}" ../linux.preset | + install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + + # 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" } _package-headers() { @@ -182,7 +205,7 @@ _package-headers() { provides=("${_replacesarchkernel[@]/%/-headers=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - + cd ${_srcname} local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build" @@ -196,9 +219,7 @@ _package-headers() { install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s - if [[ ${CARCH} = i686 ]]; then - install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu - fi + install -t "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile_32.cpu cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include @@ -207,9 +228,8 @@ _package-headers() { # http://bugs.archlinux.org/task/9912 install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.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 @@ -224,20 +244,22 @@ _package-headers() { find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \; # add objtool for external module building and enabled VALIDATION_STACK option - if [[ -e tools/objtools/objtool ]]; then + if [[ -e tools/objtool/objtool ]]; then install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool fi # remove unneeded architectures local _arch for _arch in "${_builddir}"/arch/*/; do - if [[ ${_arch} != */${KARCH}/ ]]; then - rm -r "${_arch}" - fi + [[ ${_arch} == */${KARCH}/ ]] && continue + rm -r "${_arch}" done # remove files already in linux-docs package rm -r "${_builddir}/Documentation" + + # remove now broken symlinks + find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete # Fix permissions chmod -R u=rwX,go=rX "${_builddir}" @@ -260,11 +282,10 @@ _package-docs() { provides=("${_replacesarchkernel[@]/%/-docs=${_archpkgver}}") conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") - + cd ${_srcname} - local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build" - + mkdir -p "${_builddir}" cp -t "${_builddir}" -a Documentation |