2018-10-16 05:48:34 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2017-10-28 19:43:28 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/aosp_shinano_aries_defconfig
|
2017-08-24 17:35:46 +00:00
|
|
|
|
2017-10-28 19:43:28 +00:00
|
|
|
pkgname="linux-sony-aries"
|
2017-08-24 17:35:46 +00:00
|
|
|
pkgver=3.10.84
|
2018-10-16 05:48:34 +00:00
|
|
|
pkgrel=8
|
2017-08-24 17:35:46 +00:00
|
|
|
pkgdesc="Sony Xperia Z3 Compact kernel"
|
2017-10-28 19:43:28 +00:00
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor=sony-aries
|
2017-08-24 17:35:46 +00:00
|
|
|
url="https://github.com/sonyxperiadev/kernel"
|
2017-10-28 19:43:28 +00:00
|
|
|
license="GPL2"
|
2017-08-24 17:35:46 +00:00
|
|
|
options="!strip !check !tracedeps"
|
2018-10-16 05:48:34 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
2018-10-01 06:44:18 +00:00
|
|
|
|
2018-10-16 05:48:34 +00:00
|
|
|
# Compiler: latest GCC from Alpine
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
2017-10-28 19:43:28 +00:00
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="kernel"
|
2018-10-16 05:48:34 +00:00
|
|
|
_commit="2134cafba220b32c43701368413ee333b41b7fe0"
|
|
|
|
_config="config-${_flavor}.${arch}"
|
2017-08-24 17:35:46 +00:00
|
|
|
source="
|
2017-10-28 19:43:28 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/sonyxperiadev/${_repository}/archive/${_commit}.tar.gz
|
2017-08-24 17:35:46 +00:00
|
|
|
$_config
|
2018-10-16 05:48:34 +00:00
|
|
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
gcc8-fix-put-user.patch
|
2017-08-24 17:35:46 +00:00
|
|
|
"
|
2018-10-16 05:48:34 +00:00
|
|
|
|
2017-10-28 19:43:28 +00:00
|
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
2017-08-24 17:35:46 +00:00
|
|
|
|
|
|
|
prepare() {
|
2017-10-28 19:43:28 +00:00
|
|
|
default_prepare
|
2018-10-16 05:48:34 +00:00
|
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
2017-08-24 17:35:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2018-10-16 05:48:34 +00:00
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
2017-08-24 17:35:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2018-10-16 05:48:34 +00:00
|
|
|
# kernel.release
|
2017-10-28 19:43:28 +00:00
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
2017-08-24 17:35:46 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2018-10-16 05:48:34 +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-08-24 17:35:46 +00:00
|
|
|
}
|
|
|
|
|
2018-10-16 05:48:34 +00:00
|
|
|
sha512sums="fae2299d9d36956be71f40ae724ac0a5069b53d440c114184f82495550c76743e9275e37ad00f6d4a012d32e91a580f424cdb1a1222647c5f2fd678a405a225f linux-sony-aries-2134cafba220b32c43701368413ee333b41b7fe0.tar.gz
|
2017-10-23 19:25:40 +00:00
|
|
|
0c453c3f74941854e98d3a4465e667e6996192b2c0e8ef69a3de5815cd26317642099bf7e85b91f200c5ba5edd70c43fb7a5982f0268fb8d31788a537914c8ef config-sony-aries.armhf
|
2018-10-16 05:48:34 +00:00
|
|
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
00ef6044df2e904289fcbbe268c0200e94b085c374e6126b7f8ff7763285c689bafe9781dc17b85b3684d1d438f3839891925d6ca892ddb6610e68f12e3784a2 gcc8-fix-put-user.patch"
|