# Maintainer: Jan Jasper de Kroon # Co-Maintainer: Arnav Singh _flavor=postmarketos-allwinner _config="config-$_flavor.$CARCH" pkgname=linux-$_flavor pkgver=6.7.9_git20240306 pkgrel=3 _tag="orange-pi-6.7-20240306-2359" 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-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch 0016-Define-orientation-and-rotation-for-PinePhone-camera.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=" 96f0ccb0b5f702ff8784f860ea7cce9a2aba3d041b84f9195772da4a70b8e8f904b9bd0af90e3cbcb5a322d25858d247e2dba6902a351fe75bdf9ba25d2c8a81 linux-postmarketos-allwinner-orange-pi-6.7-20240306-2359.tar.gz d4f55a4a48148994da01e81e0428f5e2dad05398178096e538a372b2a68aaef1f7b8a9d11c0d8022666cc766940f8f53b9bfc975bad18e61b011ff2c4ad74ef8 config-postmarketos-allwinner.aarch64 e6ea97d9ef24fa23f6ada7e6bd6cbe52992780e743b7a8156729e55483c079c52f718b97e5e00cde834dad400ae6b0a76382a831772cfb6a6ea854b1bd57c9a4 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 81801c25733299fe4a45154ce27ab70a80f19a00dcb7c6c67d0e6ba6bd369dbfa1b43e09b066ddaec9144e0e3f956baf2fed26d1c52f23faad33101662728e53 0015-ARM-dts-allwinner-sun5i-a13-pocketbook-614-plus-Add-.patch 203bcca90a3b7aa061c90dc222618d0fde4a45f4d194660c96f20794e11f85dd738d27a586ac53c08715e3a029fe11dd74f121dbbca9a63a78c9ebe3a01e06db 0016-Define-orientation-and-rotation-for-PinePhone-camera.patch "