pmaports/device/community/linux-odroid-hc2/APKBUILD
Dylan Van Assche 415ff553f0
linux-odroid-hc2: upgrade to 5.15.5 (MR 2724)
Tested on my ODROID HC2 running edge

[ci:skip-build]: already built successfully in CI
2021-12-05 21:12:03 +01:00

78 lines
1.8 KiB
Text

# 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.15.5
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"
_commit="31b3089969f700a8f6d8833b66ca89e104ba01ee"
source="
$_pkgname-$pkgver.tar.gz::https://github.com/tobetter/linux/archive/$_commit.tar.gz
$_config
"
subpackages="$pkgname-dev"
builddir="$srcdir/$_pkgname-$_commit"
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="
365d13514ce71379a038d05d1738188b230baa9c9c709bd0b3e1cb058375e45e567872e36b8b69f34a3d09f7d0f865cc668fff507fb7402000c23a2e7ad7d2ce linux-5.15.5.tar.gz
bf3e599de30d88ab9c0df3e7a9487bf9aa0b511615208c82a1c7f2fc254839a896637effa3bb49a7081eded25168aa3aa5855feb516b935d33f106995cffbfba config-odroid-hc2.armv7
"