# Maintainer: David P. # Contributor: André Silva # Contributor: Márcio Silva # Contributor: fauno # Contributor: Sorin-Mihai Vârgolici # Contributor: Michał Masłowski # Contributor: Luke R. # Contributor: Andreas Grapentin # Based on linux-lts package _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-lts pkgver=5.4.23 pkgrel=1 pkgdesc='LTS Linux-libre' rcnver=5.4.23 rcnrel=armv7-x19 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-5.4 source=( "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} config.i686 config.x86_64 config.armv7h # the main kernel config files linux-armv7h.preset # armv7h preset file 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 ) source_armv7h=( # RCN patch (CM3 firmware deblobbed and bloatware removed) "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 0004-fix-mvsdio-eMMC-timing.patch 0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch 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-USB-Armory-MkII-support.patch ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' 'SKIP' '1913d3aae6b5eecf1a6240661eb2d201c4ced3ffb3b93758e642251a576e225be450e90deb7ce739fdeb63ec1e1276dd7bb4026dc75b7872ca743f19447b272a' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' '37f775d44c15aca1ed62cfff0c99bfb7e0c53b8bfcb6b848934a929278f8f0330298e434d05f2305c4625a96b06438c8e656c8806cd2b1e5c46b60a9d50ac078' '944ce7474a2a969d09764d3259986afed8522cf9301d99d0273184f9e21d4441aa7df475bf35a04aa7b1726e110f4c106a1f835f33a086b9f3b59a3506065560' '2b69e711072c1ec1d7a8e243aa2aea65ea30def29be737ccdf34f4b3354eb04a0c1dbca57977988b930e6be035caf8442025443ba206bae4464013aa57be6ca7' 'aca591b5a2e838754e3c5fd2c0e50098ad54c2d0f990de5bf9cff8608e881daf0e37132294ed1a0e0a7b9e1c194c0b89f95da001d94febdb25a01c409060e3ac' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168') sha512sums_armv7h=('944ac95a7f49c253effc4bd0ce560180b5fe0c06ef71573d82691fceda69985612145138b8ec28c629cc78715df9894e1aba8c572065c56c4a0c1e9af68bbc2e' 'SKIP' 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' 'f9ce0bb4f06be6f742d8a31384e90fdab1a4686f14d5a8845e0c341dcfa62ae59db933237174223de9b32f9d91f99125c20ede7dff664755f1d42ea0cecdefdb' 'b32623904f984118ebdd8ec31816885d73776ed80a68fa23925e67451f28a8f080dd8545307bb2f857435894adfa8b3db7c8a99aa02b8b3f2b5f8e3223d98a47' 'd114f1e69504413e81dd67684f5b1ce69aa09d5bc768c7eee96a7d6b7ec47b32cd8f02593c878b0e9091475467de36a3d7c478e34a39148fa849548f53637b84' 'bc0c6b1726679498393be8d4c417c62e1f356fe5c617c71ff23532652fdd5f314e5bfc6172eaca79cd4806b81031bf2f879d7d1a6050ad4c616c04e6bdf93c2a' 'b13bea6412580325dba0d02cf0dc712e860f659569ffcb968aa4836fdb2882448cfee4659a675a70affccae02c8d2589d80b7239eef5ae7b615162aeaa76f3bb' 'cff59f974651614587313674455a968ae5390a5ca825d204f0e2f8de2b422d577b007f5297a398e2afeb33ed0d324d34ad58ff4cd56e645bd4ca9a6bdc1354c5' '54adbec4b6b85cda901df7d2b3eb1f517f10d3528326e60c7afa4b49ccc7cfb43b0d1f574ceb5d7d03c94a0fbcc97c0ef785258292dd26ed46728355da27332c') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") _replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") case "$CARCH" in i686|x86_64) KARCH=x86;; armv7h) KARCH=arm;; esac export KBUILD_BUILD_HOST=parabola export KBUILD_BUILD_USER=$pkgbase export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" prepare() { cd $_srcname if [ "${_srcname##*-}" != "$pkgver" ]; then echo "Applying upstream patch..." patch -Np1 < "../patch-${_srcname##*-}-gnu-$pkgver-gnu" fi echo "Adding freedo as boot logo..." install -m644 -t drivers/video/logo \ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} echo "Setting version..." scripts/setlocalversion --save-scmversion echo "-$pkgrel" > localversion.10-pkgrel echo "${pkgbase#linux-libre}" > localversion.20-pkgname if [ "$CARCH" = "armv7h" ]; then local src_armv7h for src_armv7h in "${source_armv7h[@]}"; do src_armv7h="${src_armv7h%%::*}" src_armv7h="${src_armv7h##*/}" [[ $src_armv7h = *.patch ]] || continue echo "Applying patch $src_armv7h..." patch -Np1 < "../$src_armv7h" done fi local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done echo "Setting config..." cp ../config.$CARCH .config make olddefconfig make -s kernelrelease > version echo "Prepared $pkgbase version $(