pmaports/device/community/linux-odroid-hc2/APKBUILD

78 lines
1.8 KiB
Text
Raw Normal View History

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/odroidxu4_defconfig
# Maintainer: Dylan Van Assche <me@dylanvanassche.be>
pkgname=linux-odroid-hc2
pkgver=5.16.14
pkgrel=0
pkgdesc="ODROID XU3/XU4/HC1/HC2/MC1 kernel fork"
arch="armv7"
_carch="arm"
_flavor="odroid-hc2"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables"
makedepends="
bison
devicepkg-dev
findutils
flex
gmp-dev
installkernel
mpc1-dev
mpfr-dev
openssl-dev
perl
rsync
xz
linux-headers
"
# Source
_config="config-$_flavor.$arch"
_pkgname="linux"
source="
$_pkgname-$pkgver.tar.xz::https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-$pkgver.tar.xz
$_config
"
subpackages="$pkgname-dev"
builddir="$srcdir/$_pkgname-$pkgver"
prepare() {
default_prepare
REPLACE_GCCH=0 \
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_STRIP=1 \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
}
dev() {
provides="linux-headers"
replaces="linux-headers"
cd $builddir
# https://github.com/torvalds/linux/blob/master/Documentation/kbuild/headers_install.rst
make -j1 headers_install \
ARCH="$_carch" \
INSTALL_HDR_PATH="$subpkgdir"/usr
}
sha512sums="
3daf1b5a01cbab632492e18a8e71aaf2085545f4944ce587bc7c27e86a0a739d0cbffe7890ce9c5bc863b3c5083281bca6ed4df8d3c69d60c6dcc210cd86993e linux-5.16.14.tar.xz
22d641b681dffd5348076e8dc095d3a1b402bc496e05156356d0be7a77b8e7a270a66dedc1d6197320806740508589d359ea7335859972f4cadd9ebf1d81212d config-odroid-hc2.armv7
"