diff options
author | David P <megver83@parabola.nu> | 2019-10-23 00:15:16 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2019-10-23 00:15:50 -0300 |
commit | 2db48b4f7f00051c17f61f7c7b01844190ed6882 (patch) | |
tree | 8d1f554d40c41d0b8352edda314504689a98e24a /kernels/linux-libre-xtreme/PKGBUILD | |
parent | b118a33c69507a8313051439dc0424c6653ad777 (diff) | |
download | abslibre-2db48b4f7f00051c17f61f7c7b01844190ed6882.tar.gz abslibre-2db48b4f7f00051c17f61f7c7b01844190ed6882.tar.bz2 abslibre-2db48b4f7f00051c17f61f7c7b01844190ed6882.zip |
updpkg: kernels/linux-libre-xtreme 5.3.7_gnu-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'kernels/linux-libre-xtreme/PKGBUILD')
-rw-r--r-- | kernels/linux-libre-xtreme/PKGBUILD | 140 |
1 files changed, 73 insertions, 67 deletions
diff --git a/kernels/linux-libre-xtreme/PKGBUILD b/kernels/linux-libre-xtreme/PKGBUILD index 8c13b9c26..e180d4a4c 100644 --- a/kernels/linux-libre-xtreme/PKGBUILD +++ b/kernels/linux-libre-xtreme/PKGBUILD @@ -5,8 +5,8 @@ # Based on linux package pkgbase=linux-libre-xtreme -_srcbasever=5.0-gnu -_srcver=5.0.6-gnu +_srcbasever=5.3-gnu +_srcver=5.3.7-gnu _hardenedver=a _replacesarchkernel=('linux%') # '%' gets replaced with _kernelname @@ -17,12 +17,21 @@ _srcname=linux-${_srcbasever%-*} _archpkgver=${_srcver%-*} pkgver=${_srcver//-/_} pkgrel=1 -rcnrel=armv7-x8 +rcnver=5.3.6 +rcnrel=armv7-x12 arch=(i686 x86_64 armv7h) url='https://wiki.parabola.nu/Xtreme' license=(GPL2) -makedepends=(xmlto kmod inetutils bc libelf python-sphinx graphviz) +makedepends=( + xmlto kmod inetutils bc libelf python-sphinx python-sphinx_rtd_theme + graphviz imagemagick +) options=('!strip') +_archpatches=( + # Arch's custom linux patches, here for loop patching + 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch +) source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcbasever/linux-libre-$_srcbasever.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/$_srcver/patch-$_srcbasever-$_srcver.xz"{,.sign} @@ -32,13 +41,26 @@ source=( 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk + + # maintain the TTY over USB disconnects + # http://www.coreboot.org/EHCI_Gadget_Debug 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 0002-fix-Atmel-maXTouch-touchscreen-support.patch - 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch + ${_archpatches[@]} ) source_armv7h=( - # for rcn-libre patch, see https://gitlab.com/libreforks/rcn-libre/wikis/debblobing-a-patch - "https://repo.parabola.nu/other/rcn-libre/patches/${_srcver%-*}/rcn-libre-${_srcver%-*}-$rcnrel.patch"{,.sig} + # armv7h patches, put in the source_armv7h variable just for a more comfortable loop patching + + # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed) + # Note: For stability reasons, AUFS has been removed in the RCN patch. + # We are supporting AUFS in linux-libre-pck through PCK patch. + # See https://wiki.parabola.nu/PCK for further details. + "https://repo.parabola.nu/other/rcn-libre/patches/${rcnver}/rcn-libre-${rcnver}-$rcnrel.patch"{,.sig} + + # Arch Linux ARM patches 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch 0003-SMILE-Plug-device-tree-file.patch @@ -47,7 +69,7 @@ source_armv7h=( 0006-set-default-cubietruck-led-triggers.patch 0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch 0008-ARM-dove-enable-ethernet-on-D3Plug.patch - 0009-media-s5p-mfc-fix-incorrect-bus-assignment-in-virtua.patch + 0009-USB-Armory-MkII-support.patch ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva @@ -55,11 +77,11 @@ validpgpkeys=( '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak ) -sha512sums=('56b8e77eb445c92c3e0ec0dc45fa5fb09641cad18003b79991652b83cf1d96cc1651750dfa9eec15652108a1b8aff1781c4f8ec5f92784b8542e59e0605922d9' +sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f' 'SKIP' - 'c015da00812cfc9cb16e408807338d2e09270e3b33deb85c5cab36e9c2e6155dbc2a3653d744de272032d524bbb59b428984debf1369e42b788b51caf4591526' + '22064d7cf6da426eff98b3fd72a52e6dc1349f1c5f53755041b487335fa8ff61fc1083440af38ef631056301d30d827c5c203566d1f720b9a65505e9c2cd3ee8' 'SKIP' - 'e6f82b082418f5f408713ba85de74a9ec44f5daaab6060a6690b00ab9ee2730e4b4049becc8287efea2c468b213369bdc75ae6e3c167cc3c892529ba13233f62' + '821d851394863022ee5ed84c4737d319284bf95eb04dc7e05020a3f528daebac65712bb263f55e7933c89b3ffe43a467397c62bbdab566b874778f239a81b72d' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -67,26 +89,27 @@ sha512sums=('56b8e77eb445c92c3e0ec0dc45fa5fb09641cad18003b79991652b83cf1d96cc165 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' - '8812e418ad9a9a4c8794d8c0f3a61a2628fd7577061c8daa70d3cd89e5eec9a0ec648e61a6949880de3e238a579e05b95fdd113b1fa2b87a18d448a57990fbd6' - '9f22876c3727581cdb3c4976244f5654c50864ca0236405c63e367d47f420bb42efc653bc61af1b1df0be0b8a81ab762c3e3b538497a47148e548217b73985b0' - 'b2f09a48df3f6911cbffdd0e376e4583240b085e585a23ffe942e7a3af804d38fbf6b2325613ce99839d9340ae6342c6d9719707f3df22c32bb989ca6002d1f4' - '7ad5be75ee422dda3b80edd2eb614d8a9181e2c8228cd68b3881e2fb95953bf2dea6cbe7900ce1013c9de89b2802574b7b24869fc5d7a95d3cc3112c4d27063a' + 'e8faa7fd50830a6ea7f3a6e193b7c51beb92fc5ffd4fc4813b48cb09e12c11a2d9f13aeb8533eb44de04fb65ae25e89b18aa2883191bd0a8f518797416765cac' + '924523b003144ada1cd783242d637b765acc0c591bebd42762522a36c2900e923659e8f360801c9d559bd96495e9987e190fa0a1d020198a621dce15d4a03797' + 'e95afb5fad75b8d2fe31dc042c07b3b784f36e678cdb91ad7a5df79660c94cd74ad42ffd7ba5747db829eb5647fb56afa89bfda6022025e6c26b0dc0ebd5c4a0' + '6b57a66b870b2f525e2dedd8f224b89474fd4ec6ea18484b0a67a1a2b9a4fc95d025cac181504406ea42a35d6c1b184c0d4e38c92815022935fc55746c69c7c1' '2718b58dbbb15063bacb2bde6489e5b3c59afac4c0e0435b97fe720d42c711b6bcba926f67a8687878bd51373c9cf3adb1915a11666d79ccb220bf36e0788ab7' '2dc6b0ba8f7dbf19d2446c5c5f1823587de89f4e28e9595937dd51a87755099656f2acec50e3e2546ea633ad1bfd1c722e0c2b91eef1d609103d8abdc0a7cbaf' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '7748427819372a27b5aa9b3ce8cc8c75397bc3a76ac4fddd06f497ce5a1b34c2e15b6301e764e6e007ad66a49bb3f9c49e906c179875e115d213d2682ddb2576') -sha512sums_armv7h=('4f185601aa569db7ee2033d6360f284aede970ea02093fdbfe25e2a3bc7463b55180678192974ce38e425ea3ecb8193a58cb7442c9390429c1dabd13afc9be8e' + '5c48b0092ab6a31453e27e6345347fd2d066e1c306c4c8a9144260bf37d0d13879b5cfe688906a06627d39a40a37e229e5300a479b2c9159e93e05ea7adc6b0a' + 'b07d84cac1c784f5652a4681efd54ef89ce9cb0778bd2a633709b7150f9fb59db978dc290b92bcb69b8d211471c22a0be2a81a129318cd7efff601a3c591483c') +sha512sums_armv7h=('078f8dfaabccb2a51c3440ed67a438bad1a83d35ccbcf06cb2d6f7d3c7e140b96c116926a0c503ffc31f849834bc22350467c1f0a48f60815c0d2882e9e01b93' 'SKIP' - '6e2eed5e047d95a825241bf30bd09e3edad7787f1f742ca5cf3cf53f4f1383ca7ede306f12cf522fa1175930b3dde550994ef085bf6d93761babfe976dc94ca2' - '32a185f7d8b93e8cb70bee0d32eb6876ac0a976abe550ec83de1fc57963b0879872831c671f4aa5281b4def9bf81660c92809047eda9a9ada939bdf5b7d32dbc' - 'b523cc0978f6426162d8ef82dc44763fca7ca57c8bf3b2b27549d7ed7d873389ba3acf00dfe5576ceef991d31ba39613c3203195cb5a91900330c997c9b0efff' - 'd85f97025f21c26b438afb599af13939bae3ff769c1d1055bdcf9130a1449703a26ecf04ce715390570c14d6b91b693e7b220e7cff0576f9775990ee2fe75113' - 'a3b846c5a79afdfc5233ba5020cb8fc91bad0864bd811204f29191f8b2e7dd76cb19d8fa38cac55ad3adbbd4126f3b2102b03016fe9423bd7d0d252ed1b4c460' - 'd547f6ef7f876690092622c7b7de6995b972e46f25b34fac92b301d90ad7b04f993341346bbc54284e5338e5bbf76ccdfa42485842ed0a0b4a8414cf8a16412a' - 'b3cc320e6414c6a9a287df405cc6768cbc204bd859189c4c3f6902e55fd425ad7f05743ea6db3996c99a49f6b3a175d83c8fb05fd4314c2b1a3df52e8b1b16f3' - 'bed58fede674b139e470a2593c3d07f61f7f771d86ce137a5cf7e1b5cc53a8c2127439f7ef2bee9daaf554555f6cb9bb80cf35bbe6a6adf10a04cb5a93d0cc8f' - '17b09c80b0c235a5395c350c2b1acfda1c549c5bb6017f6a7056a84686fe23d7983a40f416cfc1da075523ad87d39ff4ff7b4057a275705679830db15b621991') + '9724026836feefa67acb9644acf3ee89d465734af50b6637b8232b705c6259035d485cd1a1f0f08d189921eb75ad095b3e1f7f7e5e0e52302352c453f03ac820' + '41f9f7d58bb29311e09dd58105d173fb2e2a955c0e7d632bc8788c2f0a803a45281dfd2be1712d6ec93b58b9f440f3f8398f234bd7ded1c49b1c33b328478203' + '9d29a3d22aae6533d048280f3a1bf1cc325e1c1304268b6d129a29e1d74c105c55077306e6350105a9445e2a1de621cb6759b71177badbaa0e384e9800427acf' + 'c7b99f64d148b7ef140d3621b3d3fa922739f2a393ce99038d0dd539d0bb8e2e3ffe92ccbc3fe9d8dea5f3f4ddc433eb6ddd9d46939f04f38cd82ee32f5d53ec' + '618d84d26338dfeb15c88fc6d9d7c68d0151f50e000032b2d21d30d05ec62f2d36ef5a50d3671e4e9777a2db6c40d71878a9fcc89420fbe9f59e7e30406c9064' + '464d1622fd79d7f6811799bd27e16204979db3c372e03aae8285fbff584d39928d7ddb5da8139f4ce535c70406fcf73cc20dd44ffe83fd7cda36ca915fb0b931' + '114067bfafa63bbb3aef73d05909b520355a757d15aa2ce07c6bfeae200192282782980b3d8963c0d984cf0c410d2613639444dffe21007ae6a7359be6a5ff76' + 'c1191d35ef8ce8ffaa817e952916dfe5fff45758c13394bb3fc7eba7376fd2cdc94ef32a2a54d431d8258da10fa7ce2284b092b6871e9b357b71ac0144a655b8' + 'e8e73026ac02645b5914ac97bfada4c94f48e490331a28960ee5939feb18dc5630831748cdd210b27d91590322cf564d3265feee9a8246a373cc117cd520c10d') _kernelname=${pkgbase#linux-libre} _replacesarchkernel=("${_replacesarchkernel[@]/\%/${_kernelname}}") @@ -116,10 +139,6 @@ prepare() { echo "$_kernelname" > localversion.20-pkgname if [ "$CARCH" = "armv7h" ]; then - # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed) - # Note: For stability reasons, AUFS has been removed in the RCN patch. - # We are supporting AUFS in linux-libre-pck through PCK patch. - # See https://wiki.parabola.nu/PCK for further details. local src_armv7h for src_armv7h in "${source_armv7h[@]}"; do src_armv7h="${src_armv7h%%::*}" @@ -131,32 +150,30 @@ prepare() { fi if [ "$CARCH" = "x86_64" ]; then - patch -p1 -i ../linux-hardened-${_srcver%-*}.${_hardenedver}.patch + patch -Np1 < ../linux-hardened-${_srcver%-*}.${_hardenedver}.patch else - patch -p1 -i ../0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch + local src + for src in "${_archpatches[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + msg2 "Applying patch $src..." + patch -Np1 < "../$src" + done fi - # maintain the TTY over USB disconnects - # http://www.coreboot.org/EHCI_Gadget_Debug - 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 ../0002-fix-Atmel-maXTouch-touchscreen-support.patch - msg2 "Setting config..." cp ../config.$CARCH .config make olddefconfig - make -s kernelrelease > ../version - msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)" + make -s kernelrelease > version + msg2 "Prepared %s version %s" "$pkgbase" "$(<version)" } build() { cd $_srcname if [ "$CARCH" = "armv7h" ]; then - make zImage modules dtbs htmldocs + make zImage modules htmldocs dtbs elif [ "$CARCH" = "x86_64" ] || [ "$CARCH" = "i686" ]; then make bzImage modules htmldocs fi @@ -164,10 +181,10 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with a handful of security features [AppArmor, SMACK, TOMOYO, SELinux, YAMA, Linux-hardened]" - ! [ "$CARCH" = x86_64 ] && pkgdesc=${pkgdesc/, Linux-hardened} - [[ $pkgbase = linux-libre ]] && groups=(base base-openrc) - depends=(coreutils linux-libre-firmware kmod mkinitcpio) + ! [ "$CARCH" = x86_64 ] && pkgdesc="${pkgdesc/, Linux-hardened}" + depends=(coreutils kmod initramfs) optdepends=('crda: to set the correct wireless channels of your country' + 'linux-libre-firmware: firmware images needed for some devices' 'apparmor: to configure and enable mandatory access control for programs' 'tomoyo-tools: to manage tomoyo userspace tools') optdepends_x86_64=('usbctl: deny_new_usb control') @@ -177,11 +194,10 @@ _package() { backup=("etc/mkinitcpio.d/$pkgbase.preset") install=linux.install + cd $_srcname local kernver="$(<version)" local modulesdir="$pkgdir/usr/lib/modules/$kernver" - cd $_srcname - msg2 "Installing boot image..." if [ "$CARCH" = "armv7h" ]; then make INSTALL_DTBS_PATH="$pkgdir/boot/dtbs/$pkgbase" dtbs_install @@ -191,16 +207,12 @@ _package() { install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz" install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase" + # Used by mkinitcpio to name the kernel + echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase" + msg2 "Installing modules..." make INSTALL_MOD_PATH="$pkgdir/usr" modules_install - # a place for external modules, - # with version file for building modules and running depmod from hook - local extramodules="extramodules$_kernelname" - local extradir="$pkgdir/usr/lib/modules/$extramodules" - install -Dt "$extradir" -m644 ../version - ln -sr "$extradir" "$modulesdir/extramodules" - # remove build and source links rm "$modulesdir"/{source,build} @@ -211,13 +223,11 @@ _package() { s|/boot/vmlinuz-%PKGBASE%|$kernver|g s|%PKGBASE%|$pkgbase|g s|%KERNVER%|$kernver|g - s|%EXTRAMODULES%|$extramodules|g " else local subst=" s|%PKGBASE%|$pkgbase|g s|%KERNVER%|$kernver|g - s|%EXTRAMODULES%|$extramodules|g " fi @@ -243,12 +253,12 @@ _package-headers() { conflicts=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") replaces=("${_replacesarchkernel[@]/%/-headers}" "${_replacesoldkernels[@]/%/-headers}") - local builddir="$pkgdir/usr/lib/modules/$(<version)/build" - cd $_srcname + local builddir="$pkgdir/usr/lib/modules/$(<version)/build" msg2 "Installing build files..." - install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux + install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \ + localversion.* version vmlinux install -Dt "$builddir/kernel" -m644 kernel/Makefile install -Dt "$builddir/arch/$KARCH" -m644 arch/$KARCH/Makefile if [[ $CARCH = i686 ]]; then @@ -264,9 +274,6 @@ _package-headers() { # add xfs and shmem for aufs building mkdir -p "$builddir"/{fs/xfs,mm} - # ??? - mkdir "$builddir/.tmp_versions" - msg2 "Installing headers..." cp -t "$builddir" -a include cp -t "$builddir/arch/$KARCH" -a arch/$KARCH/include @@ -336,7 +343,7 @@ _package-headers() { msg2 "Adding symlink..." mkdir -p "$pkgdir/usr/src" - ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver" + ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" msg2 "Fixing permissions..." chmod -Rc u=rwX,go=rX "$pkgdir" @@ -348,9 +355,8 @@ _package-docs() { conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") - local builddir="$pkgdir/usr/lib/modules/$(<version)/build" - cd $_srcname + local builddir="$pkgdir/usr/lib/modules/$(<version)/build" msg2 "Installing documentation..." mkdir -p "$builddir" |