2017-08-11 10:41:29 +00:00
|
|
|
# APKBUILD based on linux-vanilla aport. Changes:
|
|
|
|
# - add !check !tracedeps
|
|
|
|
# - package: just install zImage-dtb 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/aosp_rhine_amami_defconfig
|
|
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
|
|
# - change compression from CONFIG_KERNEL_LZMA=y to
|
|
|
|
# CONFIG_KERNEL_GZIP=y (so it works with busybox)
|
|
|
|
# - disable proprietary graphics driver
|
|
|
|
|
|
|
|
_vendor=sony
|
|
|
|
_flavor=sony-castor-windy
|
2017-08-18 21:13:38 +00:00
|
|
|
_branch=next
|
2017-08-11 10:41:29 +00:00
|
|
|
_config="config-${_flavor}.armhf"
|
|
|
|
|
|
|
|
pkgname=linux-${_flavor}
|
|
|
|
pkgver=4.3
|
|
|
|
case $pkgver in
|
|
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
|
|
*.*) _kernver=$pkgver;;
|
|
|
|
esac
|
2018-11-28 22:54:09 +00:00
|
|
|
pkgrel=5
|
2017-08-11 10:41:29 +00:00
|
|
|
arch="armhf"
|
|
|
|
pkgdesc="Sony Xperia Z2 Tablet kernel"
|
2017-08-18 21:13:38 +00:00
|
|
|
url="https://github.com/andersson"
|
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-08-11 10:41:29 +00:00
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
install=
|
|
|
|
source="
|
2017-08-18 21:13:38 +00:00
|
|
|
$pkgname-$_branch.tar.gz::https://github.com/andersson/kernel/archive/${_branch}.tar.gz
|
2017-08-11 10:41:29 +00:00
|
|
|
$_config
|
2017-08-18 21:13:38 +00:00
|
|
|
mmc-wifi-fix.patch
|
2017-08-11 10:41:29 +00:00
|
|
|
compiler-gcc6.h
|
|
|
|
"
|
|
|
|
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"
|
2018-11-28 22:54:09 +00:00
|
|
|
HOSTCC="gcc-6"
|
2018-10-01 06:44:18 +00:00
|
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
|
|
fi
|
2017-08-11 10:41:29 +00:00
|
|
|
|
|
|
|
ksrcdir="$srcdir/kernel-${_branch}"
|
|
|
|
|
|
|
|
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-08-11 10:41:29 +00:00
|
|
|
|
|
|
|
mkdir -p "$srcdir"/build
|
2017-10-04 15:05:00 +00:00
|
|
|
cp "$srcdir"/$_config "$srcdir"/build/.config
|
2017-08-11 10:41:29 +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-09-13 17:47:53 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|
2017-10-04 15:05:00 +00:00
|
|
|
CFLAGS_MODULE=-fno-pic
|
2017-08-11 10:41:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-09-13 17:47:53 +00:00
|
|
|
cat "$srcdir/build/arch/arm/boot/zImage" \
|
2017-08-11 10:41:29 +00:00
|
|
|
"$srcdir/build/arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dtb" > \
|
|
|
|
"$srcdir/build/arch/arm/boot/zImage-dtb"
|
|
|
|
|
|
|
|
install -Dm644 "$srcdir/build/arch/arm/boot/zImage-dtb" \
|
|
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2017-08-18 21:13:38 +00:00
|
|
|
|
|
|
|
cd "$srcdir/build"
|
2017-09-13 17:47:53 +00:00
|
|
|
make -j1 modules_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_MOD_STRIP=1 \
|
2017-10-04 15:05:00 +00:00
|
|
|
INSTALL_MOD_PATH="$pkgdir"
|
2017-08-11 10:41:29 +00:00
|
|
|
}
|
2017-08-18 21:13:38 +00:00
|
|
|
|
|
|
|
sha512sums="42e3d7ea75a2e69a7589e74409fe43f2abdee0f4cc1fcea1b138622e3845524145e4c41343abc57d71236b1e2f59715f719845fcf5e628a6c343e9b10d06942a linux-sony-castor-windy-next.tar.gz
|
2017-10-26 18:13:18 +00:00
|
|
|
fd1df610c222a0be9aeddd43fd322a99c2344cd9ffb993483dba10c9d0c22596d01df5071b25c1dde5ee4dd5dc242adcfeb67d28274496d9a20bc571697945c6 config-sony-castor-windy.armhf
|
2017-08-18 21:13:38 +00:00
|
|
|
a13b17a151f732c2842df963019079cab07118fcdcdb2f2dfdfbd18571c7e2bd95a94734dc3a4eef1dae970e698f46047973efba6f355b26bf553fa6c2ac895d mmc-wifi-fix.patch
|
2017-08-11 10:41:29 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|