2018-12-15 21:47:49 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
|
|
|
# Kernel config based on: arch/arm/configs/fusion3_yuga_defconfig
|
2017-09-02 18:51:38 +00:00
|
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
|
|
# - set CONFIG_USB_ETH=y and CONFIG_USB_ETH_RNDIS=y (needed for ethernet over USB (rndis))
|
2017-10-11 15:11:05 +00:00
|
|
|
# - disable ANDROID_PARANOID_NETWORK (removes network restrictions)
|
2017-09-02 18:51:38 +00:00
|
|
|
|
2018-12-15 21:47:49 +00:00
|
|
|
pkgname="linux-sony-yuga"
|
2017-09-02 18:51:38 +00:00
|
|
|
pkgver=3.4.0
|
2018-12-15 21:47:49 +00:00
|
|
|
pkgrel=8
|
|
|
|
pkgdesc="Sony Xperia Z kernel fork"
|
2017-09-02 18:51:38 +00:00
|
|
|
arch="armhf"
|
2018-12-15 21:47:49 +00:00
|
|
|
_carch="arm"
|
|
|
|
_flavor="sony-yuga"
|
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL-2.0-only"
|
2017-09-02 18:51:38 +00:00
|
|
|
options="!strip !check !tracedeps"
|
2018-12-15 21:47:49 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
|
|
|
|
|
|
|
# Compiler: latest GCC from Alpine
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="android_kernel_sony_apq8064"
|
|
|
|
_commit="f164c6d1016cb34ac90c053acbebe6e47fdd400f"
|
|
|
|
_config="config-${_flavor}.${arch}"
|
2017-09-02 18:51:38 +00:00
|
|
|
source="
|
2018-12-15 21:47:49 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
2017-09-02 18:51:38 +00:00
|
|
|
$_config
|
2018-12-15 21:47:49 +00:00
|
|
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
gcc8-fix-put-user.patch
|
2017-10-20 00:07:00 +00:00
|
|
|
00_fix_return_address.patch
|
|
|
|
psmouse_base.patch
|
|
|
|
kgsl_iommu_sync_lock.patch
|
|
|
|
02_reduce_lzo_compression.patch
|
2017-09-02 18:51:38 +00:00
|
|
|
"
|
2018-12-15 21:47:49 +00:00
|
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
2017-09-02 18:51:38 +00:00
|
|
|
|
|
|
|
prepare() {
|
2018-12-15 21:47:49 +00:00
|
|
|
default_prepare
|
|
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
2017-09-02 18:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-12-15 21:47:49 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
2017-09-02 18:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-12-15 21:47:49 +00:00
|
|
|
# kernel.release
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
2017-09-02 18:51:38 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2018-12-15 21:47:49 +00:00
|
|
|
|
|
|
|
# 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
|
2017-09-02 18:51:38 +00:00
|
|
|
}
|
|
|
|
|
2017-09-14 18:16:16 +00:00
|
|
|
sha512sums="a20ab3f27b43999287ebef5ee150b1652ebc4996a2670079ff86a9ca07bd69555dbd1efb564ff767fb2bf22673dd609817aaded4731b09383d74c68887f545f4 linux-sony-yuga-f164c6d1016cb34ac90c053acbebe6e47fdd400f.tar.gz
|
2017-10-11 15:11:05 +00:00
|
|
|
4a38b0e6828311095401a9337ff22b290b95865e07fd7c321e1e54c343659ee0fb01606a66beb603994c5a7701628682dbda6c92e02fad437d5f1d4f5a55efe8 config-sony-yuga.armhf
|
2018-12-15 21:47:49 +00:00
|
|
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
2017-09-11 15:29:22 +00:00
|
|
|
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
2017-09-02 18:51:38 +00:00
|
|
|
f7e31cfe422696922aec52002e56c58103183966edee3bb8e1995d33f8d37b07c32280a8ecc213874e358a6ff367418556a4542fba7e3c17e4b8e82e05c3a543 psmouse_base.patch
|
|
|
|
448bad436377a22c93ac401b9aecb504fe8e84b9511a3dd28f3cc125f3725cc1168ef03dee9f8f1085a9fbb7910b9e75cd25a382ccce626b427c8e27f7c17ffc kgsl_iommu_sync_lock.patch
|
2017-09-11 15:29:22 +00:00
|
|
|
ef5b912c26fea4ab882592bdf7487942c64b123de8d25d08d976f29743f311742ee2f773bf2d110ddb5095f254dbb0bd4487c5cfce77311929082599199e7ebd 02_reduce_lzo_compression.patch"
|