pmaports/linux-motorola-titan/APKBUILD

112 lines
3.3 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
f949e35a9a57cd23c4bfd6c9fed06db30e7af30be4a0931ab3f00e371d75b07623ea7fdbff11d6011271c19a839470c9acba5521f45dc664a925ba42688ed861 changes1.diff
dd4094d5f4ec281d32f12af88cb22a782e497c8e52f69cf60b73ac7d6171fc95f1f8040b3d0ad2ff3f016d22ac1d91c5b522e5d03203534a76742bc55a082af5 init"