pmaports/device/linux-fairphone-fp2/APKBUILD
Grant Miller ee659a5bb4
linux-*: use upstream gcc6 [skip ci]
Adjust HOSTCC to work with Alpine's version.
2018-11-29 09:16:00 +01:00

87 lines
3.8 KiB
Text

# Kernel config based on: arch/arm/configs/lineageos_FP2_defconfig
pkgname="linux-fairphone-fp2"
pkgver=3.4.0
pkgrel=8
pkgdesc="Fairphone 2 kernel fork"
arch="armhf"
_carch="arm"
_flavor="fairphone-fp2"
url="https://kernel.org"
license="GPL2"
options="!strip !check !tracedeps"
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="gcc-6"
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
fi
# Source
_repository="android_kernel_fairphone_msm8974"
_commit="284400aea4b9f8a3c97a34408f48d0971897ae02"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
$_config
compiler-gcc6.h
0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
0002-gpu-msm-Fix-compilation.patch
0003-Fix-includes.patch
0004-msm-fix-trace.patch
0005-Input-lifebook-use-static-inline-instead-of-inline-i.patch
0006-Input-sentelic-use-static-inline-instead-of-inline.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"
# Generate master DTB (deviceinfo_bootimg_qcdt)
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
}
package() {
# kernel.release
install -D "$builddir/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
# zImage (find the right one)
cd "$builddir/arch/$_carch/boot"
_target="$pkgdir/boot/vmlinuz-$_flavor"
for _zimg in 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
# Master DTB (deviceinfo_bootimg_qcdt)
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
"$pkgdir/boot/dt.img"
}
sha512sums="6b440c5d087b790894606d4736af815204d9e6f682b7c1ba78f5852fa7aecd74cb276f4953d270f14c96d5418f4e2a83c5179c54d50e2e5afc9084f83ab54200 linux-fairphone-fp2-284400aea4b9f8a3c97a34408f48d0971897ae02.tar.gz
cb5f1d366daff93b2d4cd8785b095f7113a606ef82736b5d1486f53eeb69f3f684eabf6e4a83d96aaf7b129a41d0e2e9c6bbd6b8c6206bce52e0ba2172414009 config-fairphone-fp2.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
19d21a15d5470ba0a77ddfac2ea662f6424bca4af66d310019ba3c3d7d976cae6b7f88422d64e564c47a7347a7338459f61f3ac94d13d7b981defc206f99a120 0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
6f806c8e2a5b6e7e503c2b98ff55cd90f4e77cb7d82b9a3e3f85f4d718265be06f03a81ab9c0d88a95508b4192713c98f3959b18c6119edf209722c3002d19fe 0002-gpu-msm-Fix-compilation.patch
403d4999e98ddf73e083076c130a7c9de265096b7abeaabe1ba4305403202e651289a538d104cb37adf783fcecea009f3ed2b722d8640d8d3f12e6cbb8ebe97d 0003-Fix-includes.patch
432099f87fbcd66fa801ecaedb06715754198761c709cbb40b0dc8ffef14a6d6d5f0df27823229b731b18438c705c60c0ce44728b192d8e0f20c285bf761b7f3 0004-msm-fix-trace.patch
fdc336206dedc11f560849738903f18ffa28ea5387b8764cae37c981a5e1bc610d32f041c0cde4ff246fb24cb79cb3f5d7820a40ea33aac75b9660897299b03f 0005-Input-lifebook-use-static-inline-instead-of-inline-i.patch
ea45a9faa3320410b76409b373dc4a2d41ef2f815c48cdfe5ca8072df402ecab87bbd2021f116a4d93827bc62f59bce4c5defc10758134a1e054a66822371a77 0006-Input-sentelic-use-static-inline-instead-of-inline.patch"