pmaports/linux-motorola-titan/APKBUILD

113 lines
3.5 KiB
Text
Raw Normal View History

# APKBUILD based on linux-vanilla aport. Changes:
# - disabled module installation
# - add !check !tracedeps
# - package: just install zimage 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/titan_defconfig
# Changes:
# - enable devtmpfs (needed for udev -> touch support in weston)
_vendor=motorola
_flavor=motorola-titan
_hash="09cff47d6b79b73ecc3461e227abf09faaa9e754"
_config="config-${_flavor}.armhf"
pkgname=linux-${_flavor}
pkgver=3.4.113
case $pkgver in
*.*.*) _kernver=${pkgver%.*};;
*.*) _kernver=$pkgver;;
esac
pkgrel=0
arch="armhf"
pkgdesc="Motorola Moto G 2014 kernel from LineageOS"
url="https://github.com/LineageOS/android_kernel_motorola_msm8226"
depends="postmarketos-mkinitfs"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev xz"
options="!strip !check !tracedeps"
install=
source="
$pkgname-$_hash.zip::https://github.com/LineageOS/android_kernel_motorola_msm8226/archive/${_hash}.zip
$_config
compiler-gcc6.h
changes1.patch
gcc5-compile.patch
Wno-error.patch
"
subpackages=""
license="GPL2"
_abi_release=${pkgver}
_carch="arm"
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
ksrcdir="$srcdir/android_kernel_motorola_msm8226-${_hash}"
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
cp -v "$srcdir/compiler-gcc6.h" "$ksrcdir/include/linux/" || return 1
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$srcdir"/build/.config || return 1
make -C "$ksrcdir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
silentoldconfig
}
# this is so we can do: 'abuild menuconfig' to reconfigure kernel
menuconfig() {
cd "$srcdir"/build || return 1
make ARCH="$_carch" menuconfig
cp .config "$startdir"/$_config
}
build() {
cd "$srcdir"/build
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-Alpine" \
|| return 1
}
package() {
install -Dm644 "$srcdir/build/arch/arm/boot/zImage" \
"$pkgdir/boot/vmlinuz-$_flavor"
install -D "$srcdir/build/include/config/kernel.release" \
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
}
sha512sums="1a5599b1fe0d36a9804b2379cfc69f07ebd6f2fa472c7a7e4ae070131728c46db5f2b9766af282fd64ea075772f700c3b816ca7b7c90d24e21e9da289317ca37 linux-motorola-titan-09cff47d6b79b73ecc3461e227abf09faaa9e754.zip
80857bddbd9fcb93cec4e178c2fd377d39b1bd85454330c02866628942be826f2c1f77e0df3b77f41e893d3d04ee6e18b27fcfc6cda637fafc733916f2f5340d config-motorola-titan.armhf
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
2017-06-05 18:07:52 +00:00
1cb3675952849acc83eac76787f35869021a98f07a9989f3835ff64f63ffe35b5c734e58f71b3f0418ae4c2e15e663be18956e832162b2f9ed6414e9fb3df594 changes1.patch
07753b5925524e2e319a0e5b9814afa8d78b615837fd76d505d356adc1600564798abc7b5f096b1e1e2ac185e781ab7785d296c69f0f654ee426ebe4e4edfc02 gcc5-compile.patch
64aeb4ba3609e5f3da12214a20c56147565706e04ee7fecc25a0a65868cbe791ccee23c9b08a499cd7de608a1cb3c56e074cefe2ecebd69df6b1151445f96218 Wno-error.patch"