summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD264
1 files changed, 139 insertions, 125 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2619f62bc35a..571c53d554b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -65,7 +65,7 @@ _kyber_disable=
pkgbase=linux-bfq-mq
#pkgbase=linux-custom # Build kernel with a different name
-pkgver=4.13.15
+pkgver=4.14.1
_srcpatch="${pkgver##*\.*\.}"
_srcname="linux-${pkgver%%\.${_srcpatch}}"
pkgrel=1
@@ -78,12 +78,12 @@ _bfqpath="https://gitlab.com/tom81094/custom-patches/raw/master/bfq-mq"
_mergepath="${_bfqpath}/merges/${pkgver}"
#_mlpath_1="${_bfqpath}/mailing-list/blk-mq-sched-improve-SCSI-MQ-performance-V4"
_mlpath_2="${_bfqpath}/mailing-list/block-bfq-disable-wbt"
-_lucjanpath="https://gitlab.com/sirlucjan/kernel-patches/raw/master/4.13"
-#_lucjanpath="https://raw.githubusercontent.com/sirlucjan/kernel-patches/master/4.13"
+_lucjanpath="https://gitlab.com/sirlucjan/kernel-patches/raw/master/4.14"
+#_lucjanpath="https://raw.githubusercontent.com/sirlucjan/kernel-patches/master/4.14"
_bfqgroup="https://groups.google.com/group/bfq-iosched/attach"
_gcc_patch='enable_additional_cpu_optimizations_for_gcc_v4.9+_kernel_v4.13+.patch'
_bfq_mq_ver='20171114'
-_bfq_mq_patch="4.13-bfq-sq-mq-git-${_bfq_mq_ver}.patch"
+_bfq_mq_patch="4.14-bfq-sq-mq-git-${_bfq_mq_ver}.patch"
source=(# mainline kernel patches
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
@@ -111,7 +111,6 @@ source=(# mainline kernel patches
#"${_mlpath_1}/ML1-0012-block-introduce-.last_merge-and-.hash-to-blk_mq_ctx.patch"
#"${_mlpath_1}/ML1-0013-blk-mq-sched-refactor-blk_mq_sched_try_merge.patch"
#"${_mlpath_1}/ML1-0014-blk-mq-improve-bio-merge-from-blk-mq-sw-queue.patch"
- "${_lucjanpath}/0001-bfq-sq-mq-fix-patching-error-with-20171109.patch"
"${_lucjanpath}/blk-mq-v10/0050-blk-mq-sched-dispatch-from-scheduler-only-after-progress-is-made-on->dispatch.patch"
"${_lucjanpath}/blk-mq-v10/0051-blk-mq-sched-move-actual-dispatching-into-one-helper.patch"
"${_lucjanpath}/blk-mq-v10/0052-blk-mq-sbitmap-introduce__sbitmap_for_each_set().patch"
@@ -122,21 +121,26 @@ source=(# mainline kernel patches
"${_lucjanpath}/blk-mq-v10/0057-blk-mq-SCSI-implement-get-budget-and-put_budget-for-blk-mq.patch"
# mailing-list (ML2) patches
"${_mlpath_2}/ML2-0001-block-bfq-Disable-writeback-throttling.patch"
- # the main kernel config files
+ # the main kernel config files
'config'
- # pacman hook for initramfs regeneration
+ # pacman hook for depmod
+ '60-linux.hook'
+ # pacman hook for initramfs regeneration
'90-linux.hook'
- # standard config files for mkinitcpio ramdisk
- 'linux.preset')
-
-sha256sums=('2db3d6066c3ad93eb25b973a3d2951e022a7e975ee2fa7cbe5bddf84d9a49a2c'
+ # pacman hook for remove initramfs
+ '99-linux.hook'
+ # standard config files for mkinitcpio ramdisk
+ 'linux.preset'
+ '0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch'
+ '0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch')
+
+sha256sums=('f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7'
'SKIP'
- '110744f7ecf675153a1d6b6a622f6dd58a2e4615c36fae61dd846316bfd51c90'
+ '5af72b487fbcc8e7fd3f5392271490c8498ffb2048e77abaf406971a7382f8d7'
'SKIP'
'8b00041911e67654b0bd9602125853a1a94f6155c5cac4f886507554c8324ee8'
'0cfc2877c3772c946855c4dedb442843a7ec71d6cf47dfee69c40fd329405824'
'eb3cb1a9e487c54346b798b57f5b505f8a85fd1bc839d8f00b2925e6a7d74531'
- 'd68ab3571d922337d1ff862c8fa087a20b73cc651fde99c87bd397df778d0d76'
'388b210b15913d6e46d85d3c997d21f796957d2e3eb082ba8ffda1371eaa1f3b'
'ed4dec610bb99928c761dee5891b9f79770f0265678c232b0d4c1879beb73e94'
'40c2bbd7abd390e0674a797d08f7624051750d38a09d4c42ddba1f8341bb362a'
@@ -146,9 +150,13 @@ sha256sums=('2db3d6066c3ad93eb25b973a3d2951e022a7e975ee2fa7cbe5bddf84d9a49a2c'
'19dd49fd6c50ac74074b354898d6aaf0c1da30e85c4f5770fdb54195b49277b0'
'7c51d0053053a3a0f6ed8759a5464ed5a3275a9dd832513a5678c3bcead9e5d5'
'5e57c8d1d87a63e1c5947aba02346862992f39be2b2761ea142b3897995495aa'
- 'b1c82fa9693114dc0a4beffcb733dbe5c44f90fa226c6cc1f8f1ab2b1d455e27'
- '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
+ 'a81c8a378a4092b040a928940b4ca625b775e4a57d5b18d583de052f3c8aa076'
+ 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
+ '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
+ '907a422cf56189ad9453e9416b13fe8ccd5c1d38dec3bd1b7d60d53f1afe12fa'
+ 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
+ '6f1d9b6a119bfab150a0bc1f550609dd9290328df709b67c984f0a6b0abe8afd'
+ '92b8755030d405fa4a9cd31cbe2998fd71584164431e5edc28c2be04fab24d1e')
validpgpkeys=(
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
@@ -160,19 +168,26 @@ prepare() {
cd ${_srcname}
### Add upstream patch
- msg "Add upstream patch"
- patch -p1 -i ../patch-${pkgver}
+ msg "Add upstream patch"
+ patch -p1 -i ../patch-${pkgver}
- ### Patch source with BFQ-MQ
- msg "Fix naming schema in BFQ-MQ patch"
- sed -i -e "s|SUBLEVEL = 0|SUBLEVEL = ${_srcpatch}|g" \
- -i -e "s|PATCHLEVEL = 14|PATCHLEVEL = 13|g" \
- -i -e "s|EXTRAVERSION = -bfq|EXTRAVERSION =|g" \
- -i -e "s|EXTRAVERSION = -bfq-mq|EXTRAVERSION =|g" ../${_bfq_mq_patch}
+ ### Fix https://bugs.archlinux.org/task/56207
+ msg "Fix bug #56207"
+ patch -Np1 -i ../0001-platform-x86-hp-wmi-Fix-tablet-mode-detection-for-co.patch
+
+ ### Fix https://bugs.archlinux.org/task/56404
+ msg "Fix bug #56404"
+ patch -Np1 -i ../0001-bio-ensure-__bio_clone_fast-copies-bi_partno.patch
- msg "-> Apply BFQ-MQ patch"
- patch -Np1 -i ../0001-bfq-sq-mq-fix-patching-error-with-20171109.patch
- patch -Np1 -i ../${_bfq_mq_patch}
+
+ ### Patch source with BFQ-SQ-MQ
+ msg "Fix naming schema in BFQ-SQ-MQ patch"
+ sed -i -e "s|SUBLEVEL = 0|SUBLEVEL = 1|g" \
+ -i -e "s|EXTRAVERSION = -bfq|EXTRAVERSION =|g" \
+ -i -e "s|EXTRAVERSION =-mq|EXTRAVERSION =|g" \
+ -i -e "s|NAME = Fearless Coyote|NAME = Petit Gorille|g" ../${_bfq_mq_patch}
+ msg "Patching source with BFQ-SQ-MQ patches"
+ patch -Np1 -i ../${_bfq_mq_patch}
### Patches related to BUG_ON(entity->tree && entity->tree != &st->active) in __bfq_requeue_entity();
if [ -n "$_use_tentative_patches" ]; then
@@ -347,51 +362,54 @@ _package() {
cd ${_srcname}
- KARCH=x86
-
- # get kernel version
- _kernver="$(make LOCALVERSION= kernelrelease)"
- _basekernel=${_kernver%%-*}
- _basekernel=${_basekernel%.*}
-
- 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}"
-
- # 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:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
-
- # add real version for building modules and running depmod from post_install/upgrade
- echo "${_kernver}" |
- install -Dm644 /dev/stdin "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
-
- # Now we call depmod...
- depmod -b "${pkgdir}" -F System.map "${_kernver}"
-
- # move module tree /lib -> /usr/lib
- mv -t "${pkgdir}/usr" "${pkgdir}/lib"
-
- # add vmlinux
- install -Dm644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
+ # get kernel version
+ _kernver="$(make LOCALVERSION= kernelrelease)"
+ _basekernel=${_kernver%%-*}
+ _basekernel=${_basekernel%.*}
+
+ mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
+ make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
+ cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
+
+ # make room for external modules
+ local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
+ 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}/usr/lib/modules/${_extramodules}/version"
+
+ # remove build and source links
+ rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
+
+ # now we call depmod...
+ depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
+
+ # add 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"
+ sed "${_subst}" ../99-linux.hook |
+ install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/99-${pkgbase}.hook"
}
_package-headers() {
@@ -399,72 +417,68 @@ _package-headers() {
provides=("${pkgbase}-headers=${pkgver}" "linux-headers=${pkgver}")
depends=("${pkgbase}=${pkgver}")
- cd ${_srcname}
- local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
+ cd ${_srcname}
+ local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
- install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
- install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
+ install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
+ install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
- mkdir "${_builddir}/.tmp_versions"
+ mkdir "${_builddir}/.tmp_versions"
- cp -t "${_builddir}" -a include scripts
+ cp -t "${_builddir}" -a include scripts
- install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
- install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
-
- cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
+ install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
+ install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
- install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
- install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
+ cp -t "${_builddir}/arch/x86" -a arch/x86/include
- # http://bugs.archlinux.org/task/9912
- install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
+ install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
+ install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.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/9912
+ install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
- # http://bugs.archlinux.org/task/20402
- install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
- install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
- install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
+ # http://bugs.archlinux.org/task/13146
+ install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
- # add xfs and shmem for aufs building
- mkdir -p "${_builddir}"/{fs/xfs,mm}
+ # http://bugs.archlinux.org/task/20402
+ install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
+ install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
+ install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
- # copy in Kconfig files
- find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
+ # add xfs and shmem for aufs building
+ mkdir -p "${_builddir}"/{fs/xfs,mm}
- # add objtool for external module building and enabled VALIDATION_STACK option
- if [[ -e tools/objtool/objtool ]]; then
- install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
- fi
+ # copy in Kconfig files
+ find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
- # remove unneeded architectures
- local _arch
- for _arch in "${_builddir}"/arch/*/; do
- if [[ ${_arch} != */${KARCH}/ ]]; then
- rm -r "${_arch}"
- fi
- done
-
- # remove files already in linux-docs package
- rm -r "${_builddir}/Documentation"
-
- # Fix permissions
- chmod -R u=rwX,go=rX "${_builddir}"
+ # add objtool for external module building and enabled VALIDATION_STACK option
+ install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
- # strip scripts directory
- local _binary _strip
- while read -rd '' _binary; do
- case "$(file -bi "${_binary}")" in
- *application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
- *application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
- *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
- *) continue ;;
- esac
- /usr/bin/strip ${_strip} "${_binary}"
- done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
+ # remove unneeded architectures
+ local _arch
+ for _arch in "${_builddir}"/arch/*/; do
+ [[ ${_arch} == */x86/ ]] && continue
+ rm -r "${_arch}"
+ done
+
+ # remove files already in linux-bfq-mq-docs package
+ rm -r "${_builddir}/Documentation"
+
+ # Fix permissions
+ chmod -R u=rwX,go=rX "${_builddir}"
+
+ # strip scripts directory
+ local _binary _strip
+ while read -rd '' _binary; do
+ case "$(file -bi "${_binary}")" in
+ *application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
+ *application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
+ *application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
+ *) continue ;;
+ esac
+ /usr/bin/strip ${_strip} "${_binary}"
+ done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
}
_package-docs() {