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.18.1
|
|
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="
|
|
1d3f676403b7f21c6790cac568e9655f95012c250a7d0f35cb8223c8a36ce561b414a25cd85be6892607facb617247d4983f4be426388dd6c6817991a6da928d linux-5.18.1.tar.xz
|
|
22d641b681dffd5348076e8dc095d3a1b402bc496e05156356d0be7a77b8e7a270a66dedc1d6197320806740508589d359ea7335859972f4cadd9ebf1d81212d config-odroid-hc2.armv7
|
|
"
|