pmaports/device/testing/linux-remarkable-zero-gravitas/APKBUILD

87 lines
2.9 KiB
Text
Raw Permalink Normal View History

2024-08-08 04:07:01 +00:00
# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm/configs/(CHANGEME!)
pkgname=linux-remarkable-zero-gravitas
pkgver=5.4.70
_rmver=1.3.4
pkgrel=0
pkgdesc="remarkable reMarkable 1 kernel fork"
arch="armv7"
_carch="arm"
_flavor="remarkable-zero-gravitas"
_abi_release=$pkgver
url="https://github.com/reMarkable/linux"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="
bash
bc
bison
devicepkg-dev
findutils
flex
openssl-dev
lzop
perl
rsync
"
# Source
_commit="RM1XX_${pkgver}_v$_rmver"
_config="config-$_flavor.$arch"
source="
https://github.com/reMarkable/linux/archive/refs/tags/RM1XX_${pkgver}_v$_rmver.tar.gz
linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
brcmfmac-disable-power-management.patch
brcmfmac-fix-suspend-resume-when-power-is-cut-off.patch
enable-automatic-partial-refreshing.patch
$_config
"
subpackages="$pkgname-dev"
builddir="$srcdir"/linux-RM1XX_${pkgver}_v$_rmver
_outdir="out"
prepare() {
default_prepare
REPLACE_GCCH=0 . downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" KLZOP="/usr/bin/lzop" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
"$_flavor" "$_outdir"
}
dev() {
pkgdesc="Headers and script for third party modules for $pkgname kernel"
depends="gmp-dev bash perl"
cd "$builddir"
local dir="$subpkgdir"/usr/src/linux-headers-$_abi_release
mkdir -p "$dir"
make -j1 headers_install ARCH="$_carch" INSTALL_HDR_PATH="$dir"
mkdir -p "$subpkgdir"/lib/modules/$_abi_release
install -Dm644 "$builddir"/$_outdir/Module.symvers \
"$subpkgdir"/lib/modules/$_abi_release/Module.symvers
ln -sf /usr/src/linux-headers-$_abi_release \
"$subpkgdir"/lib/modules/$_abi_release/build
}
sha512sums="
0409c8443f5a705e8254858f966eed571b935f1be952f64c1d74b52a043d0638ba358370ca20f665d69b70aabe06f03e0bfa02ccd1a4a2a174d5b9579a10b44e RM1XX_5.4.70_v1.3.4.tar.gz
ee80928d83189a6b71f853c97551326e3ac74167dee3bda0ae85a034278ca69403bbfbbd9dfaf9f77426e46d7260e4fda8e8900649f1b6355bac62a8cda83776 linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
c5fc4f2f70112cc66a91a2948f7fd4adcd7172a95191b4c862084c7b80093cfa696925aa9a825c41bddac7441ba153eb264b8146e52a4556a73349e6fd10e641 brcmfmac-disable-power-management.patch
27ec1bc1d916dbd2258192c1ed864eacbd2746b49caa554fbaf1124bac478bab0b729e7fabbab8705ae175bb098800f795d415f4de4964da921c1b802560b67a brcmfmac-fix-suspend-resume-when-power-is-cut-off.patch
0f47278c5bfafb939e46224fbf16f9491e3cc560ac128dcf430a1f6cf9064fb1c5bf5db1a3076c35d30c004aec525a7d6616a647564f197bb29c57701c1db982 enable-automatic-partial-refreshing.patch
d9d928409229f005116d8040f4f42673293c09310ab2d38c51f9d1705cbc56bada8ea855dee74f7ab64d4ce0a8bbc08dd44d9e1c8a677de949a90522cc7639ee config-remarkable-zero-gravitas.armv7
"