pmaports/device/testing/linux-motorola-athene/APKBUILD
Luca Weiss c57aa7b299
device/*/linux-*: enable CONFIG_TMPFS_POSIX_ACL (MR 1939)
This is required by some software, e.g. bluez/gnome to set some ACLs on
/dev/rfkill (see #904). While probably nobody will notice on the
downstream kernels (as we don't have any proper software there anyways)
it's definitely needed on mainline-ish kernels. Surprisingly only one
kernel has broken by enabling this option (linux-sony-tulip) which I've
patched up.

linux-postmarketos-qcom-sdm660 did not break by enabling this option,
but required linux4.17-gcc10-extern_YYLOC_global_declaration.patch to
build again, so this was fixed too.

[ci:skip-build] [ci:ignore-count]
2021-02-09 21:54:35 +01:00

65 lines
2.6 KiB
Text

# Kernel config based on: arch/arm64/configs/athene_defconfig
pkgname=linux-motorola-athene
pkgver=3.10.108
pkgrel=4
pkgdesc="Motorola Moto G4 kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="motorola-athene"
url="https://kernel.org"
license="GPL2"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev dtbtool xz gcc6"
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
# request if you find out that it is booting working with newer GCCs as
# well. See <https://postmarketos.org/vendorkernel> for instructions.
if [ "${CC:0:5}" != "gcc6-" ]; then
CC="gcc6-$CC"
HOSTCC="gcc6-gcc"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_motorola_msm8952"
_commit="4f6c8d2e1507595b5ef404d076128874176f1219"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/fengjiongmax/$_repository/archive/$_commit.tar.gz
$_config
01_fix_gcc6_errors.patch
scripts-dtc-yylloc.patch
disable-wireguard-Kconfig.patch
optimize_compile_options.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
# Generate master DTB (deviceinfo_bootimg_qcdt)
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm64/boot/dt.img" "arch/arm64/boot/"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
# Master DTB (deviceinfo_bootimg_qcdt)
install -Dm644 "$builddir/arch/arm64/boot/dt.img" \
"$pkgdir/boot/dt.img"
}
sha512sums="74d13e6787337454dc09c643efcf95cd46a2f02deecbe687c7a451f53bc2a5978aca394cf76f828cced88a6cffb310deb430c2c8c989471b368733f1aad728c2 linux-motorola-athene-4f6c8d2e1507595b5ef404d076128874176f1219.tar.gz
07d3aa0ed6b05de0870a03cbcbcd7a532b0dfa541d9fbf1253986b1de5812f5055ccbb9de9b9d69bbc971e44c8a2ccf9fa7d215d1dd155dd17e8884b0b59f872 config-motorola-athene.aarch64
972e98523d6ef06342e69a09e979bdd86904cf7f9a843b519b37791e531b680182564a2ab537c94629c3589f4e775b2c39de04c64e210a0f8b6f10745c3596f1 01_fix_gcc6_errors.patch
84f97f389b6a7305519a257666367157f84ed20c64633d51b8608f7d55517514870b487ac7428ac5c2a49b0a1371100a8862120b415c3eda5255ad485385ac81 scripts-dtc-yylloc.patch
a32585798f24bb764718209e6c35e304b3499b53e2b34aa9e935bc55197d041aa1169f8352319abbe174a3d5f3ad68b01a7ea5addd3652fe7bcfe8ae4a2a1a6e disable-wireguard-Kconfig.patch
c6123ff692663f383151d722d0c43501ba4c24c0e5c8b5206356fd76bde6b72d20eebee9fcce1a01e6ee5bb637976f7f4349746ccdc7bc474a1a1e83b68a3f08 optimize_compile_options.patch"