2019-11-27 22:09:21 +00:00
|
|
|
# Maintainer: Antoine Fontaine <antoine.fontaine@epfl.ch>
|
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
|
|
|
# Kernel config based on: arch/arm/configs/s5030_defconfig
|
|
|
|
|
2020-04-25 09:51:42 +00:00
|
|
|
pkgname=linux-wiko-lenny2
|
2019-11-27 22:09:21 +00:00
|
|
|
pkgver=3.10.72
|
2021-02-08 18:03:07 +00:00
|
|
|
pkgrel=2
|
2019-11-27 22:09:21 +00:00
|
|
|
pkgdesc="Wiko Lenny 2 downstream kernel fork"
|
|
|
|
arch="armv7"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="wiko-lenny2"
|
|
|
|
_config="config-wiko-lenny2.armv7"
|
|
|
|
_commit="204adbdcc01951c8eb33fc8b5543320f760bd3e3"
|
|
|
|
url="https://kernel.org"
|
|
|
|
license="GPL-2.0-only"
|
2020-04-21 01:24:27 +00:00
|
|
|
options="!strip !check !tracedeps pmb:cross-native"
|
2019-11-27 22:09:21 +00:00
|
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev gcc4"
|
|
|
|
|
|
|
|
# Compiler: GCC 4 (doesn't compile when compiled with newer versions)
|
|
|
|
if [ "${CC:0:5}" != "gcc4-" ]; then
|
|
|
|
CC="gcc4-$CC"
|
|
|
|
HOSTCC="gcc4-gcc"
|
|
|
|
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Source
|
|
|
|
source="$pkgname-$_commit.tar.gz::https://github.com/pmsourcedump/linux-wiko-lenny2/archive/$_commit.tar.gz
|
|
|
|
don't-use-out-of-tree-vendor-tinno.patch
|
|
|
|
fix-paths.patch
|
|
|
|
fix-busybox-sh-compatibility.patch
|
|
|
|
use-gnu89-explicitly.patch
|
2020-11-04 12:48:12 +00:00
|
|
|
gcc10-extern_YYLOC_global_declaration.patch
|
2019-11-27 22:09:21 +00:00
|
|
|
$_config
|
|
|
|
"
|
|
|
|
builddir="$srcdir/$pkgname-$_commit"
|
2020-07-09 18:48:15 +00:00
|
|
|
_outdir="KERNEL_OBJ"
|
2019-11-27 22:09:21 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
|
|
|
|
2020-07-09 18:48:15 +00:00
|
|
|
mkdir "$_outdir"
|
|
|
|
cp "$srcdir/$_config" "$_outdir"/.config
|
2019-11-27 22:09:21 +00:00
|
|
|
|
2020-07-09 18:48:15 +00:00
|
|
|
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" O="$_outdir" oldconfig
|
2019-11-27 22:09:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
|
2020-07-09 18:48:15 +00:00
|
|
|
O="$_outdir"
|
2019-11-27 22:09:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
# kernel.release
|
2020-07-09 18:48:15 +00:00
|
|
|
install -D "$_outdir/include/config/kernel.release" \
|
2019-11-27 22:09:21 +00:00
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
|
|
|
|
# zImage (find the right one)
|
2020-07-09 18:48:15 +00:00
|
|
|
cd "$_outdir/arch/$_carch/boot"
|
2019-11-27 22:09:21 +00:00
|
|
|
_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
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="1d99e56624c28d6f5336edda26edbc21bd62803a0d31143bd6c61506f245a6f9682f2a5135a63abbf0c9339eb6fda8510a01ae907f88dcb1b775f3b17e91d9de linux-wiko-lenny2-204adbdcc01951c8eb33fc8b5543320f760bd3e3.tar.gz
|
|
|
|
a88df2c0be9bcc26c738436036750c195986a5eda47529604cc4dd2ca0423e55ac6ae12031ec5553df244b7dc5d4ca8507a79568bf5af2ff27c4740a2f96865f don't-use-out-of-tree-vendor-tinno.patch
|
|
|
|
5a96db8474cdb9f7704c7b30cdf426d3f37b7a5f5d172eeebeb434bdb943555c0abd26ed63531855a7ef1122b7a8c1ef394539f8685a5da15f036f47e3a40564 fix-paths.patch
|
|
|
|
9d5cbfb3fa0d076ae090778f4a80c172c296b71eca55bad69b25ecc6bd5658e38bcb53b7483b43066b21907bcb770974a2639983cb1ff59bb24f3fc429fc71d4 fix-busybox-sh-compatibility.patch
|
|
|
|
7674bf62ce6ac7a6cffa9468d464ed66448b72fdae95023895992a2127c107b9914e1453a1e8913ed4a62416c12ea40a54095da9c581a265c0c08476449de20d use-gnu89-explicitly.patch
|
2020-11-04 12:48:12 +00:00
|
|
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
2021-02-08 18:03:07 +00:00
|
|
|
21ee0de0fc33d4faa94e1a3a86f37b6004900645bfe29c7201f006ca09d642eff4f5bfda559876e9c86c02c00e6fc296a84e3d5cb126265fd9b1fe39bf450853 config-wiko-lenny2.armv7"
|