57 lines
1.8 KiB
Text
57 lines
1.8 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Kernel config based on: arch/arm64/configs/librem5-devkit_defconfig
|
|
pkgname="linux-purism-librem5"
|
|
# <kernel ver>.<purism kernel release>
|
|
pkgver=5.6.0
|
|
_purismver=$pkgver-rc5+librem5.1
|
|
pkgrel=0
|
|
pkgdesc="Purism Librem 5 phone kernel fork"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="purism-librem5"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev
|
|
devicepkg-dev bison flex openssl-dev"
|
|
|
|
# Source
|
|
_repository="linux-next"
|
|
# imx8-current-librem5 branch:
|
|
# kconfig generated with: ARCH=arm64 make defconfig KBUILD_DEFCONFIG=librem5_defconfig
|
|
_config="config-$_flavor.$arch"
|
|
source="
|
|
$pkgname-$_purismver.tar.gz::https://source.puri.sm/Librem5/$_repository/-/archive/pureos/$_purismver/$_repository-pureos-$_purismver.tar.gz
|
|
$_config
|
|
"
|
|
builddir="$srcdir/$_repository-pureos-$_purismver"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
REPLACE_GCCH=0 \
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
}
|
|
|
|
package() {
|
|
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
|
|
|
local _install
|
|
case "$CARCH" in
|
|
aarch64*|arm*) _install="modules_install dtbs_install" ;;
|
|
*) _install="modules_install" ;;
|
|
esac
|
|
|
|
make -j1 $_install \
|
|
ARCH="$_carch" \
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
|
|
|
}
|
|
sha512sums="c270ea69bb77fb627cfba3ee553f2164119fffcd2b8a60b5d981c943a4bd22a23e08b7346845b82345d225b8d43c96624ce76888cd39b2d5734e7ec069875adc linux-purism-librem5-5.6.0-rc5+librem5.1.tar.gz
|
|
63499d9f99a90f5c2500ef3b7af51172eaf3d5b59193c62fb5467361b04bcba2e9f1b254eb2f7b2388cdd5c095b81b2c43d04264a01a21aa8f6a80ab336833f4 config-purism-librem5.aarch64"
|