xiaomi-laurel_sprout-pmOS/linux-postmarketos-qcom-sm6125/APKBUILD

69 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-08-22 00:32:11 +00:00
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/(CHANGEME!)
pkgname=linux-postmarketos-qcom-sm6125
pkgver=5.18.0
2021-08-22 00:32:11 +00:00
pkgrel=0
pkgdesc="Mainline Kernel fork for SM6125 devices"
2021-08-22 00:32:11 +00:00
arch="aarch64"
_carch="arm64"
_flavor="postmarketos-qcom-sm6125"
2021-08-22 00:32:11 +00:00
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
flex
openssl-dev
perl
"
# Source
2022-03-18 21:51:23 +00:00
_repository="linux"
_commit="3398a1d7daeca76a3adef6e64e8f0f516f95195e"
2021-08-22 00:32:11 +00:00
_config="config-$_flavor.$arch"
source="
2022-03-18 21:51:23 +00:00
$pkgname-$_commit.tar.gz::https://gitlab.com/sm6125-mainline/$_repository/-/archive/$_commit.tar.gz
2021-08-22 00:32:11 +00:00
$_config
"
builddir="$srcdir/$_repository-$_commit"
2022-03-18 21:51:23 +00:00
2021-08-22 00:32:11 +00:00
prepare() {
default_prepare
2022-03-18 21:51:23 +00:00
cp "$srcdir/config-$_flavor.$arch" .config
2021-08-22 00:32:11 +00:00
}
build() {
unset LDFLAGS
2022-03-18 21:51:23 +00:00
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor"
2021-08-22 00:32:11 +00:00
}
package() {
2022-03-18 21:51:23 +00:00
mkdir -p "$pkgdir"/boot
2022-03-18 21:51:23 +00:00
install -Dm644 "$builddir/arch/$_carch/boot/Image.gz" \
"$pkgdir/boot/vmlinuz"
2022-03-18 21:51:23 +00:00
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_PATH="$pkgdir"/boot/ \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_MOD_STRIP=1 \
INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
2021-08-22 00:32:11 +00:00
}
2022-03-18 21:51:23 +00:00
2021-08-22 00:32:11 +00:00
sha512sums="
2022-03-18 21:51:23 +00:00
a7f3278990e837143337e37f9d2fac1bb0fd6b859681de0e8226fae2addae2cfaa2d44d6bddf43004a887e189d22223a4debd2891cbf580d61b6b8fa184c5c2a linux-xiaomi-laurel_sprout-3398a1d7daeca76a3adef6e64e8f0f516f95195e.tar.gz
695be42583078511a180cc2bc36f70a038ff1a3c5e81e084c70ee9341936159ee695884d3e43e5afd6be717ab35e3445ac577c04f4847670040d0c6ab28651fa config-xiaomi-laurel_sprout.aarch64
2021-08-22 00:32:11 +00:00
"