2017-09-02 18:51:38 +00:00
|
|
|
# APKBUILD based on linux-vanilla aport. Changes:
|
|
|
|
# - disabled module installation
|
|
|
|
# - add !check !tracedeps
|
|
|
|
# - package: just install zImage and kernel.release, because the kernel config
|
|
|
|
# does not generate modules or dtb files
|
|
|
|
# - do not create -dev subpackage (makes no sense without module support)
|
|
|
|
#
|
|
|
|
# Kernel config changes, based on: arch/arm/configs/fusion3_yuga_defconfig
|
|
|
|
# - 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
|
|
|
|
|
|
|
_vendor=sony
|
|
|
|
_flavor=sony-yuga
|
|
|
|
_hash="f164c6d1016cb34ac90c053acbebe6e47fdd400f"
|
|
|
|
_config="config-${_flavor}.armhf"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
pkgver=3.4.0
|
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
2018-02-17 17:26:31 +00:00
|
|
|
pkgrel=5
|
2017-09-02 18:51:38 +00:00
|
|
|
arch="armhf"
|
|
|
|
pkgdesc="Sony Xperia Z kernel"
|
|
|
|
url="https://github.com/LineageOS/android_kernel_sony_apq8064"
|
2018-02-17 17:26:31 +00:00
|
|
|
depends=""
|
2018-10-01 06:44:18 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6"
|
2017-09-02 18:51:38 +00:00
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
install=
|
|
|
|
source="
|
|
|
|
$pkgname-$_hash.tar.gz::https://github.com/LineageOS/android_kernel_sony_apq8064/archive/$_hash.tar.gz
|
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
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
|
|
|
"
|
|
|
|
subpackages=""
|
|
|
|
license="GPL2"
|
|
|
|
|
|
|
|
_abi_release=${pkgver}
|
|
|
|
_carch="arm"
|
2018-10-01 06:44:18 +00:00
|
|
|
|
|
|
|
# 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
|
2017-09-02 18:51:38 +00:00
|
|
|
|
|
|
|
ksrcdir="$srcdir/android_kernel_sony_apq8064-${_hash}"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
local _patch_failed=
|
|
|
|
cd "$ksrcdir"
|
|
|
|
|
|
|
|
# first apply patches in specified order
|
|
|
|
for i in $source; do
|
|
|
|
case $i in
|
|
|
|
*.patch)
|
|
|
|
msg "Applying $i..."
|
|
|
|
if ! patch -s -p1 -N -i "$srcdir"/$i; then
|
|
|
|
echo $i >>failed
|
|
|
|
_patch_failed=1
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if ! [ -z "$_patch_failed" ]; then
|
|
|
|
error "The following patches failed:"
|
|
|
|
cat failed
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# gcc6 support
|
2017-10-04 15:05:00 +00:00
|
|
|
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/"
|
2017-09-02 18:51:38 +00:00
|
|
|
|
|
|
|
mkdir -p "$srcdir"/build
|
2017-10-04 15:05:00 +00:00
|
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
2017-09-02 18:51:38 +00:00
|
|
|
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
|
|
|
silentoldconfig
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/build
|
|
|
|
unset LDFLAGS
|
|
|
|
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2017-10-04 15:05:00 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine"
|
2017-09-02 18:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
}
|
|
|
|
|
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
|
2017-09-02 18:51:38 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
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"
|