# Maintainer: Jan Jasper de Kroon # Co-Maintainer: Arnav Singh _flavor=postmarketos-allwinner _config="config-$_flavor.$CARCH" pkgname=linux-$_flavor pkgver=6.7.0_git20240110 pkgrel=0 _tag="orange-pi-6.7-20240108-1629" pkgdesc="Kernel fork with Pine64 patches (megi's tree, slightly patched)" arch="aarch64 armv7" url="https://megous.com/git/linux/" license="GPL-2.0-only" makedepends=" bison devicepkg-dev findutils flex gmp-dev installkernel mpc1-dev mpfr-dev openssl-dev perl rsync xz bash " options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-community " source="$pkgname-$_tag.tar.gz::https://codeberg.org/megi/linux/archive/$_tag.tar.gz config-$_flavor.aarch64 config-$_flavor.armv7 0001-dts-add-dontbeevil-pinephone-devkit.patch 0002-dts-add-pinetab-dev-old-display-panel.patch 0003-dts-pinetab-add-missing-bma223-ohci1.patch 0004-arm64-dts-allwinner-Add-bluetooth-node-to-the-PineTa.patch 0005-dts-pinetab-make-audio-routing-consistent-with-pinep.patch 0006-dts-pinephone-drop-modem-power-node.patch 0007-drm-panel-simple-Add-Hannstar-TQTM070CB501.patch 0008-ARM-dts-sun6i-Add-GoClever-Orion-70L-tablet.patch 0009-drm-panel-simple-Add-Hannstar-HSD070IDW1-A.patch 0010-ARM-dts-sun6i-Add-Lark-FreeMe-70.2S-tablet.patch 0011-sunxi-mmc-h6-fix.patch 0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch 0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch 0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch 0015-usb-gadget-u_ether-Re-attach-netif-device-to-mirror.patch " builddir="$srcdir/linux" case "$CARCH" in aarch64*) _carch="arm64" ;; arm*) _carch="arm" ;; esac prepare() { default_prepare REPLACE_GCCH=0 \ . downstreamkernel_prepare } build() { unset LDFLAGS # V=1: workaround for pma#1990 make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" \ CFLAGS_MODULE=-fno-pic \ DTC_FLAGS="-@" \ V=1 } package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" make -j1 modules_install dtbs_install \ ARCH="$_carch" \ INSTALL_MOD_STRIP=1 \ INSTALL_MOD_PATH="$pkgdir" \ INSTALL_DTBS_PATH="$pkgdir/boot/dtbs" } sha512sums=" 9134abafeda71679e8fe567e4f1e17d51c3074f4c44c336183a3c5cf946abafcd07d166b22fc64f0a40b675342ae2534d8e250d4736e5b7361ffbfac3d574e18 linux-postmarketos-allwinner-orange-pi-6.7-20240108-1629.tar.gz e51e5a309db0451c897e1e07b78431f45214cf616ed82d047446b8fdde6889fb1b0bd865727a46e315d5ce88a16c88fbe5e94f3a68a5eb52976a2ea0f289dd6c config-postmarketos-allwinner.aarch64 9048599c676af89e0ec3a6735c517b3ccc67b7c2cf9fd33a799166b95087e7739a60c7e506e6c78e55635b31fa2416db82e7aec40b05b91dbe780a9951624ff6 config-postmarketos-allwinner.armv7 126e0a65e04f22f14eac1281a69000d9d5b107ed8fd1b52f37e812751f55e6c45b0240ceac61c9d95ae7f0543aaf9d96b85a8532baf59283c077b9945e615367 0001-dts-add-dontbeevil-pinephone-devkit.patch 99edeccdee7beae5dc7337d78ba92de2f3d724b7648ede30ab040a66bdac0e38a6595e212e26011d608ccb8a92ffa9e393965f936dfead65ffe9b7eb31dfa345 0002-dts-add-pinetab-dev-old-display-panel.patch 82c0203b02c671934d62e52311827ac1cc5b358e0843715ea2235117e4b47d6de63b29fdfc7c1adfc550cc7eb363c384de8276be1ca17da6e48916020124022d 0003-dts-pinetab-add-missing-bma223-ohci1.patch 1fcfcc448424af475efd7f848eec04763c5930070f54fdb487e6f28717df7e20b73c0f444e9322d362deeedfd87b4e91c6e61e274d23206fafef36ca97ff95d6 0004-arm64-dts-allwinner-Add-bluetooth-node-to-the-PineTa.patch 16373f069c8a3b110f68cce6d60a7b75af32635467454f4203ceeae2f7f3a74dce73f9c41b00bc340fae580cff335f0fa8d4b033cb31907b69e7a05030461b0f 0005-dts-pinetab-make-audio-routing-consistent-with-pinep.patch 681c945abdb8dd595d505a36ef84100b968754a1c861e7525c00185f19aa431304ff3c3258750d2d67a8aa2fd8e078a9bbc4b5cabb1802c24637ce26ecd3ee2d 0006-dts-pinephone-drop-modem-power-node.patch c4ab9d65b4cd6ebe443cef51693ddaddfd55d3f73b5955b2c0211ecbc69054b17e875905f56c503873bb61f6fdb39e097d85d264d6e1bd6b7ab6526076ccd535 0007-drm-panel-simple-Add-Hannstar-TQTM070CB501.patch 943f8a9791461621c20b1dd0db9946a31734c4fe316626d045de2e2207e6f099d469e1a5b9ab9bd93cd5fca85b6422a211d435c6124aea1a2ecee818c7b35ac2 0008-ARM-dts-sun6i-Add-GoClever-Orion-70L-tablet.patch 952e2332cbc85e69259b037302411520d46c18bb90371492b6cfcc9eeeaf96d030875bf0a17edea756c9744faee38fd42288345681e5e903f6e64d0849f76db2 0009-drm-panel-simple-Add-Hannstar-HSD070IDW1-A.patch b7c084bb32cfc18defcec77966f1944fd3b33bb48769a4c0e257709d0f3898c5e0ca2a50c39a5d4513463580eef58b5301e75345bd36d6cc5f84347f7d241a8c 0010-ARM-dts-sun6i-Add-Lark-FreeMe-70.2S-tablet.patch 8ee720bc6195b1b454a274e7ad9a245107aa6d127018b98909c5f105d608568bcf1651343bf9633f4804d5649f4df7e3390d6eb72a708666e89337e39427943a 0011-sunxi-mmc-h6-fix.patch 370e963805a4c984dc501a6a6f686cac059485a275370c5f55de0841e227c5f6652abb38ad935c8dd046014e632e70129d3f8fbeae9650fe7de6f0d10e9cdc3a 0012-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch c766911f76d36b997582533707d7d7a089ed1272e49a79dbe75f7c1eafef0ba3f1417d6c66f25e12e56124e0cd4bb9f443d400236e252ef1c43d53def9392a87 0013-Revert-usb-quirks-Add-USB_QUIRK_RESET-for-Quectel-EG25G-Modem.patch 382e6e8785235788101459ae47c940ec85831007c61e3f14c4e3a43abfa21b95cdaa6bdd1b7fdd6fd26944f4c629d41b9ab776e89d9a18778fbc9f6a7785444b 0014-usb-serial-option-add-reset-resume-callback-for-WWAN.patch 3ce3bc02e4cb401f5834b9607d50fe26e0cbd7d6f5e32f1ab092660185ff01b253a759be5e6dfb46aa629dc0871f935d93746a0b55ede49f194b617dda87f766 0015-usb-gadget-u_ether-Re-attach-netif-device-to-mirror.patch "