pmaports/device/testing/linux-postmarketos-imx-ereader/APKBUILD
Stefan Hansson 27e8b6a82a
linux-postmarketos-imx-ereader: enable zstd firmware compression support (MR 5382)
Needed for
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/60282 as
kobo-clara2e uses linux-firmware.

[ci:skip-build] already built successfully in CI
2024-07-29 15:51:46 -07:00

76 lines
2.5 KiB
Text

# Maintainer: Andreas Kemnade <andreas@kemnade.info>
# Kernel config based on: arch/arm/configs/kobo_defconfig
pkgname=linux-postmarketos-imx-ereader
pkgver=6.9.0
pkgrel=1
pkgdesc="i.MX E-Book reader kernel fork, close to mainline"
replaces="linux-kobo-clara-mainline"
provides="linux-kobo-clara-mainline=$pkgver-r$pkgrel"
arch="armv7"
_carch="arm"
_flavor="postmarketos-imx-ereader"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
gmp-dev
lzop
mpc1-dev
mpfr-dev
openssl-dev
perl
"
# Source
_repository="linux"
_commit="4b0c49001732b93f6787c44e090b8e8f72e6fe6a"
_rtl8189fs_repository="rtl8189ES_linux"
_rtl8189fs_commit="9a82349c2c40515f9d20b9f6721670f76b4e1c7a"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/akemnade/$_repository/archive/$_commit.tar.gz
$_rtl8189fs_repository-$_rtl8189fs_commit.tar.gz::https://github.com/jwrdegoede/$_rtl8189fs_repository/archive/$_rtl8189fs_commit.tar.gz
$_config
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
_rtl8189fs_dir="$srcdir/$_rtl8189fs_repository-$_rtl8189fs_commit"
prepare() {
REPLACE_GCCH=0
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$(( pkgrel + 1 ))-postmarketOS"
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$(( pkgrel + 1 ))-postmarketOS" \
CONFIG_RTW_SDIO_PM_KEEP_POWER=n \
CONFIG_RTW_DEBUG=n \
-C "$_rtl8189fs_dir" KSRC="$builddir"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
make modules_install dtbs_install \
O="$_outdir" ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
install -Dm644 "$_rtl8189fs_dir"/8189fs.ko "$pkgdir/lib/modules/$(make -s O="$_outdir" ARCH="$_carch" kernelrelease)/kernel/drivers/net/wireless"
}
sha512sums="
cb42f542ba1ddd7abefd54dd6e289173ae3cc10c808b3af1f11ba7e0e28c81cc27b7d05071fc9038bd6b56c6b42dbad4b96980bb105a0318dc7b43a1f7120cd9 linux-postmarketos-imx-ereader-4b0c49001732b93f6787c44e090b8e8f72e6fe6a.tar.gz
f02f35ce3f4b3fc86c867099c04ee0e6755e8eb17e048aba3b8749fe1adb689619cb340724fdb95d395c30dc055846f4e0b170fea6e7c8add2dd5a39ba733104 rtl8189ES_linux-9a82349c2c40515f9d20b9f6721670f76b4e1c7a.tar.gz
e8e738e95229896da7dd093c00a561e7e624126b8b7d66893a2ae20cbb02548d2cef32dbc2b132b490547ea569121194e52619d81ab3b2ef62fbc0167afbb263 config-postmarketos-imx-ereader.armv7
"