From ae20f00ed698ab0cffe1e60c904ea24779091f41 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 8 Jan 2025 17:08:32 -0500 Subject: [PATCH] modernize --- user/linux-pine64-pinenote/APKBUILD | 47 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/user/linux-pine64-pinenote/APKBUILD b/user/linux-pine64-pinenote/APKBUILD index 9e35c1b..d061a7a 100644 --- a/user/linux-pine64-pinenote/APKBUILD +++ b/user/linux-pine64-pinenote/APKBUILD @@ -1,55 +1,52 @@ # Reference: -# Kernel config based on: arch/arm64/configs/pinenote_defconfig +# Kernel config based on: arch/arm64/configs/(CHANGEME!) pkgname=linux-pine64-pinenote pkgver=6.12.0 pkgrel=0 -pkgdesc="Pine64 PineNote close to mainline fork" +pkgdesc="Pine64 PineNote kernel fork" arch="aarch64" _carch="arm64" _flavor="pine64-pinenote" url="https://kernel.org" license="GPL-2.0-only" options="!strip !check !tracedeps pmb:cross-native" -makedepends="bison findutils flex installkernel openssl-dev perl" +makedepends=" + bash + bc + bison + devicepkg-dev + findutils + flex + openssl-dev + perl +" # Source -_config="config-$_flavor.$arch" +_repository="https://github.com/m-weigand" _commit="9d066a65f5cbaa8cd3bfc73a1b54fbac2d0f76ac" - +_config="config-$_flavor.$arch" source=" - $pkgname-$_commit.tar.gz::https://github.com/m-weigand/linux/archive/$_commit.tar.gz + $pkgname-$_commit.tar.gz::$_repository/archive/$_commit.tar.gz $_config " -builddir="$srcdir/linux-$_commit" +builddir="$srcdir/$_repository-$_commit" +_outdir="out" prepare() { default_prepare - cp "$srcdir/config-$_flavor.$CARCH" .config + . downstreamkernel_prepare } build() { unset LDFLAGS - make ARCH="$_carch" CC="${CC:-gcc}" \ - KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" + make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \ + KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" } package() { - mkdir -p "$pkgdir"/boot - - install -Dm644 "$builddir/arch/$_carch/boot/Image" \ - "$pkgdir/boot/vmlinuz" - - 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 - rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source - - install -D "$builddir"/include/config/kernel.release \ - "$pkgdir"/usr/share/kernel/$_flavor/kernel.release + downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \ + "$_flavor" "$_outdir" } sha512sums="