pmaports/device/linux-google-crosshatch/APKBUILD
Zhuowei Zhang d0f36689ab google-crosshatch: enable wifi driver in kernel config (!184)
The LineageOS kernel integrates the Wi-Fi driver, so reconfigure with
the Lineage defconfig and copy the Wi-Fi options over to our defconfig.

This doesn't get Wi-Fi working yet, but it gives a good starting point.
2019-01-30 09:38:32 +01:00

74 lines
3.1 KiB
Text

# Reference: <https://postmarketos.org/vendorkernel>
# Kernel config based on: arch/arm64/configs/lineageos_crosshatch_defconfig
pkgname="linux-google-crosshatch"
pkgver=4.9.96
pkgrel=1
pkgdesc="Google Pixel 3 XL kernel fork"
arch="aarch64"
_carch="arm64"
_flavor="google-crosshatch"
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 dtbtool openssl-dev lz4 dtc"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="android_kernel_google_crosshatch"
# Lineage 16.0 branch
_commit="f8cb98bcb606f94a2307f39c21dfb705fe7868d2"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
clk-qcom-mdss-fix-in-tree-build.patch
init-initramfs-disable-do_skip_initramfs.patch
arm64-boot-disable-building-DTBO-images.patch
init-ignore-dm-parameter.patch
sec_ts-disable-touchscreen-firmware-upgrade.patch
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
# Pixel 3 XL uses lz4 to compress kernel.
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in Image.lz4-dtb zImage-dtb Image.gz-dtb *zImage Image; do
[ -e "$_zimg" ] || continue
msg "zImage found: $_zimg"
install -Dm644 "$_zimg" "$_target"
break
done
if ! [ -e "$_target" ]; then
error "Could not find zImage in $PWD!"
return 1
fi
}
sha512sums="e5f840cc4f5a1c68150d397de079db51d51943b0ed2858011ed38b834d2fdfa1f88344b3dcbe886dea2a1b5ee959d6e7b918b009762d5e06a9edf807294647e1 linux-google-crosshatch-f8cb98bcb606f94a2307f39c21dfb705fe7868d2.tar.gz
8bae8235ac2a70a8bff6baafe5cc331742d36d0e58e32ae3791e0ed3c403590a5ec18633e8a532d6f9c575a5601d2812cd80510c47b9a6b57bfd92a51aaf4760 config-google-crosshatch.aarch64
720c5856b7d1d8b3cb20f77507818b7fe1b4950d444f7ed20cb02d255987d8860d5ed293e81ea326f147af13004b524886c733123794ac62978fda13689a5189 clk-qcom-mdss-fix-in-tree-build.patch
0f536e5acd0f5e6d6774918d8e226ae1f4edc486596fc5c93a110b4eb2555e0f1281f460065928a7f7a272b886f61f7967fe60cc4952ed1f4b37143bd2a28962 init-initramfs-disable-do_skip_initramfs.patch
43b1c1bcdd653366a5d0196bf6171f67914c3c417eeba04f4f071e095e8b3191e67ec8e03b1ed1701a9a0efe5b3e134ed7fb464439e9a389aafdcf0064f20a10 arm64-boot-disable-building-DTBO-images.patch
66ac924e2619994dad71a88223d62e911cc90c20f578eb1b0544f115de8367ea9767e7955245c70699f7af040bb8c42f9fa7aff60d4638f1e568a3b3662d30a6 init-ignore-dm-parameter.patch
7c941332085c6a2372ad083400e354c61f38752c2706d07592a7ce6a72aa5d8bb9cb10521fe0c941ac4e49aa3dbd2f9473c42ed2a10ec66b1b50b65e8ad1e0a8 sec_ts-disable-touchscreen-firmware-upgrade.patch"