77 lines
1.8 KiB
Text
77 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.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
|
|
8fab93cbbcfa9c80e6f0ea3ce72218b4328831b9256e40ae0f7b46d5423c3e01cbaf6bc2ca62d1a1aef19b0fe705650a030880b0ef7eac8d66d33d2478b22370 config-odroid-hc2.armv7
|
|
"
|