# Maintainer: Antoine Fontaine # Reference: # Kernel config based on: arch/arm/configs/s5030_defconfig pkgname=linux-wiko-lenny2 pkgver=3.10.72 pkgrel=0 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" options="!strip !check !tracedeps pmb:cross-native" 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 $_config " builddir="$srcdir/$pkgname-$_commit" prepare() { default_prepare mkdir KERNEL_OBJ cp "$srcdir/$_config" "$builddir"/KERNEL_OBJ/.config yes "" | make -C "$builddir" ARCH="$_carch" HOSTCC="$HOSTCC" \ O="$builddir"/KERNEL_OBJ oldconfig } build() { unset LDFLAGS make ARCH="$_carch" CC="${CC:-gcc}" \ KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \ O="$builddir"/KERNEL_OBJ } package() { # kernel.release install -D "$builddir/KERNEL_OBJ/include/config/kernel.release" \ "$pkgdir/usr/share/kernel/$_flavor/kernel.release" # zImage (find the right one) cd "$builddir/KERNEL_OBJ/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 } 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 8442eb8df3177de0db1be818ae32bfa8e6d0906146d9b1a2567b18143d891ffacb9176d1d2954c31cb90370b9fd5f74e6b98369e4036cdf30d9ae4ced9d5284e config-wiko-lenny2.armv7"