# Reference: # Kernel config based on: arch/arm64/configs/librem5-devkit_defconfig pkgname=linux-purism-librem5 # . pkgver=5.7.0 _purismver=${pkgver}+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 pmb:cross-native" 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 } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" } package() { downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" make modules_install dtbs_install \ ARCH="$_carch" \ INSTALL_MOD_PATH="$pkgdir" \ INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb" } sha512sums="1ef367fb4835780e440d65076c5b7ba611a8e37f745ed4a1f76f4bf9e01f4b27010f5d0728ea05ab0af094134e5007a67ffa49d3e753722a917786241b421b8f linux-purism-librem5-5.7.0+librem5.1.tar.gz 4d1f3b99c1f6ce3f95eab375403c6c4ca1ebb7131379ef3355e583993940b537d5026c9283289c1f512f0bfdbfad05c3153b4d5374ef8f13af74926f473b252c config-purism-librem5.aarch64"