# 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=4.19.86_gnu pkgrel=1 pkgdesc='LTS Linux-libre' rcnver=4.19.72 rcnrel=armv7-x40 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( xmlto kmod inetutils bc libelf python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) options=('!strip') _srcname=linux-4.19 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//_/-}/patch-${_srcname##*-}-gnu-${pkgver//_/-}.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 # Arch's custom linux patches 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch ) source_armv7h=( # 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 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-dwc2-disable-power_down-on-rockchip-devices.patch ) validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) sha512sums=('5bc800b3beff43a8c15bd5515f4e0babe2beb5fa600491b7b37110e22d9b739d293f1e38753ed681be289c51390e0e64b3e60ce0db0a3bfe1f94ee5c014579a3' 'SKIP' '794f00793a790b596adffa1e1423d62d62cc13d61551b99b544c3da2d2871ac91acb8b3d19f4e1078c4f486df07286a4d0485942cc2901a5e2d6c5a93b2e674d' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' 'dc0be585b35a3c061d4fb67409760a499fe025d96fe318166c3d75e3936e5cce5ddd7be3deabb48b69b5d0fff77d5516ee2c614cf28e67f258c90d8f2fd43961' '6b808ee4665f0926df4f4c5e674db4f63fb92aaff405e3bc17290253294538b41816d4906168341f00ad1c16c4c7354514601dad4746a06902383c97a19d2fca' '861a83cb9746b6d981e07d18b0293298c0e7a5d10ad592bb8defbd235a0efac30ce6c2328f34a162943aa33fa05f2b4367adf394aa815875eda0103bdf4e172c' 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' '5f196378d50dd737d727e424d8f31b7fa8a6b92ba88f0a1467ef79bc37a097160da1fc1fd5cfb4b8983f36f2afdf27eb229ec61b35a15ac2343d660eb416a230') sha512sums_armv7h=('326ba9a9275bb76deb5d8a4fc129d048e8a0f62bb526da58a084d3413ce79f17ba107f64b84664d73919dd67c4e1cbf01388ab71dae9cee5a36728f17fe77323' 'SKIP' '60aa432465eb3ac10f565799d3dfecea21aaf08e83909c1161d9359e932626edbd1353e712d616c3d785c65a0f699e9c45df35bd9e86365c25399c6b2d45b9e4' '86809feb5ae2759b449ec0cb7a6b3fb457874ed82a72dfda00607e8819c804a0714b5d6a17cbbba44996a36872224af42d1b85f1b3932f43bccb419041d25dc7' '746acff348d62b3ed4e62cd9976ddf0af47f87bd3cffda90cbb00a6b57d589ccb681fcd9541ee5bdd179d95dad71d57c77cb1a60faee1c6cef518e4055c3456f' 'c945e871fa456b521ced77cae9081bcdc47d836ecdabe6766e373681fe11fda3e5a7a3c16f70c586be64a1eb5c9136c43b0a44df897298940fd8703b50b0a543' '054e98a2d1ea83cece1fe55ae087b282f25593022f252c74612d4aeb2a547f84ea626e3d982098ca798271af55f3b733ac2aea2fc0d9cad031802d2901dfe4ca' '4433f9e780a72347313916c8a9cbcbce3a8c40e1b299e887dc748d257879fb5fab8f1683936339f73a4d4b4ef668b1ed6cc0d9a19ed4bd99039a1613ac08610e' 'd1361d23ae79599e3fa94cba206bd40764f9eee0c584e639af13828dabb7f0dfa361792c098b5afae0bb350407b2dc47a1d67580daeade7a4f3e3e55e42c8470' 'c1653f91067d31801a23450175e47968add147477caf20aec6092831739641312f4ad995af43c7e55545007279016b5f62a0720d31e4591b4421a65b8bd5b398' 'a123747792417d3760ca40d7f913c2cdd194da2ea5778352eedebc80097b7b8dce4428a8fe8bd75cab92972f599c25bcf18a740856fc2990351234b0d7ebf9f5') _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##*-}-gnu" != "${pkgver//_/-}" ]; then msg2 "Applying upstream patch..." patch -p1 -i ../patch-${_srcname##*-}-gnu-${pkgver//_/-} fi msg2 "Adding freedo as boot logo..." install -m644 -t drivers/video/logo \ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} msg2 "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 msg2 "Applying patch $src_armv7h..." patch -Np1 < "../$src_armv7h" done fi local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue msg2 "Applying patch $src..." patch -Np1 < "../$src" done msg2 "Setting config..." cp ../config.$CARCH .config make olddefconfig make -s kernelrelease > version msg2 "Prepared %s version %s" "$pkgbase" "$(