linux-ayn-odin: new aport (MR 4986)

This commit is contained in:
Anton Bambura 2024-04-01 11:37:21 +03:00
parent 44b9db8247
commit d3b6adacd6
No known key found for this signature in database
GPG key ID: 1441EAFE8D7F4C2D
2 changed files with 8453 additions and 0 deletions

View file

@ -0,0 +1,79 @@
# Maintainer: Jenneron <jenneron@protonmail.com>
# Based on linux-postmarketos-qcom-sdm845
#
# This kernel package can be replaced with linux-postmarketos-qcom-sdm845 once
# https://gitlab.com/sdm845-mainline/linux/-/merge_requests/91 is merged
_flavor="ayn-odin"
pkgname=linux-$_flavor
pkgver=6.7.0
pkgrel=0
pkgdesc="Mainline Kernel fork for AYN Odin"
arch="aarch64"
_carch="arm64"
url="https://gitlab.com/jenneron/linux"
license="GPL-2.0-only"
options="!check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community
pmb:kconfigcheck-uefi"
makedepends="bash bison findutils flex installkernel openssl-dev perl zstd"
_config="config-$_flavor.$arch"
_commit="87349bbdebbd62f0a235cdcc31dc25f507fc444f"
# Source
source="
linux-$_commit.tar.gz::https://gitlab.com/jenneron/linux/-/archive/$_commit/linux-$_commit.tar.gz
$_config
"
builddir="$srcdir/linux-$_commit"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
}
package() {
if [ -e "$builddir/arch/$_carch/boot/vmlinuz.efi" ]; then
# ZBOOT EFI decompressor for EFI booting
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz.efi" \
"$pkgdir/boot/linux.efi"
# Old GZIP'd kernel image for boot.img compatibility
install -Dm644 "$builddir/arch/$_carch/boot/vmlinuz" \
"$pkgdir/boot/vmlinuz"
else
echo "WARNING: CONFIG_ZBOOT not enabled!"
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
fi
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/boot/dtbs-tmp
mkdir -p "$pkgdir"/boot/dtbs/qcom
cp -r "$pkgdir"/boot/dtbs-tmp/qcom/sdm8* "$pkgdir"/boot/dtbs/qcom
rm -rf "$pkgdir"/boot/dtbs-tmp
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
}
sha512sums="
baedc6653df9a0c697ddf127dd9d43be12fb54f34c699404ec5d2837f24ca8fc8889e4b5055c84ce0f6be120c4284386acbc8eeb134fe80edc01c26f9d1893be linux-87349bbdebbd62f0a235cdcc31dc25f507fc444f.tar.gz
1b05e7a0cac57ef06ceff76cdb2e0fef573636f177edd3a125f975c9e190b6ddc4fb0cf90927302146110e895121c44d03148a7a18ba3ef701a3620d612b18c7 config-ayn-odin.aarch64
"

File diff suppressed because it is too large Load diff