2019-05-05 06:54:57 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
2018-03-25 19:00:40 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/franken_defconfig
|
|
|
|
|
|
|
|
pkgname="linux-samsung-kylessopen"
|
|
|
|
pkgver=3.0.101
|
2019-05-05 06:54:57 +00:00
|
|
|
pkgrel=4
|
|
|
|
pkgdesc="Samsung Galaxy Trend kernel fork"
|
2018-03-25 19:00:40 +00:00
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="samsung-kylessopen"
|
|
|
|
url="https://kernel.org"
|
2019-05-05 06:54:57 +00:00
|
|
|
license="GPL-2.0-only"
|
2018-03-25 19:00:40 +00:00
|
|
|
options="!strip !check !tracedeps"
|
2019-05-05 06:54:57 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev lzo xz"
|
2018-10-01 06:44:18 +00:00
|
|
|
|
2019-05-05 06:54:57 +00:00
|
|
|
# Compiler: latest GCC from Alpine
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
2018-03-25 19:00:40 +00:00
|
|
|
|
2019-05-05 06:54:57 +00:00
|
|
|
# Source: backup of https://github.com/pavlepiramida/FrankenKernel
|
|
|
|
_kernel="pavlepiramida-frankenkernel"
|
2018-03-25 19:00:40 +00:00
|
|
|
_commit="d0e853abec2d7be79f5d9b319273a0b66046b125"
|
|
|
|
_config="config-${_flavor}.${arch}"
|
|
|
|
source="
|
2019-05-05 06:54:57 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://gitlab.com/samsung-kylessopen-kernels/$_kernel/-/archive/$_commit/$_kernel-$_commit.tar.gz
|
2018-03-25 19:00:40 +00:00
|
|
|
$_config
|
|
|
|
gcc5.patch
|
|
|
|
0001-fix-video-argb-setting.patch
|
2019-05-05 06:54:57 +00:00
|
|
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
gcc8-fix-put-user.patch
|
2018-03-25 19:00:40 +00:00
|
|
|
"
|
2019-05-05 06:54:57 +00:00
|
|
|
builddir="$srcdir/$_kernel-$_commit"
|
2018-03-25 19:00:40 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
2019-05-05 06:54:57 +00:00
|
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
2018-03-25 19:00:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2019-05-05 06:54:57 +00:00
|
|
|
sha512sums="874957ad6a6c959b5479ece21225d9423f62e67a6a4c1f9a9e56d0c6078b6644a4ff2e490c7e43a8ef5241b148af6085b041f02268586cf8c61b1eacfd3511ad linux-samsung-kylessopen-d0e853abec2d7be79f5d9b319273a0b66046b125.tar.gz
|
2018-03-25 19:00:40 +00:00
|
|
|
b28a411506adb2540c3de93b4d7529d25efb96ab93b31417bd78c4deea3b1e4f63bd4240d090dd27c54040e9c937a27bc8702d471be414722265d2dbd1cf4630 config-samsung-kylessopen.armhf
|
|
|
|
db5d16e03a93b453c98882dcd08b7a4cd96c126393365d8916d9cf045e8725831f70ea841756526af7bead36a74301024e3c569c438442906e079fea2ac0a022 gcc5.patch
|
2019-05-05 06:54:57 +00:00
|
|
|
e3083c260ed9c4fc0d83f43106700b6173876dbfae072f6e6696ac6785a4dc17771fbcb3e21601e04ed29a11bf0f7a2a09ad549375e0c34cea245c7f2e2bcbbd 0001-fix-video-argb-setting.patch
|
|
|
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch"
|