3e140ea690
Migration guide: https://github.com/postmarketOS/pmbootstrap/wiki/Migration-to-aports-subfolders
107 lines
3.1 KiB
Text
107 lines
3.1 KiB
Text
# 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 based on: arch/arm/configs/lineageos_d855_defconfig
|
|
# Changes:
|
|
# - enable devtmpfs (needed for udev -> touch support in weston)
|
|
|
|
_vendor=lge
|
|
_flavor=lg-d855
|
|
_hash="efce7b0879c76224f5bf37d8a1025eaed99192b0"
|
|
_config="config-${_flavor}.armhf"
|
|
|
|
pkgname=linux-${_flavor}
|
|
pkgver=3.4.0
|
|
case $pkgver in
|
|
*.*.*) _kernver=${pkgver%.*};;
|
|
*.*) _kernver=$pkgver;;
|
|
esac
|
|
pkgrel=3
|
|
arch="armhf"
|
|
pkgdesc="LG G3 kernel from LineageOS"
|
|
url="https://github.com/LineageOS/android_kernel_lge_g3"
|
|
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_${_vendor}_g3/archive/${_hash}.zip
|
|
$_config
|
|
compiler-gcc6.h
|
|
gpu-msm-fix-gcc5-compile.patch
|
|
"
|
|
subpackages=""
|
|
license="GPL2"
|
|
|
|
_abi_release=${pkgver}
|
|
_carch="arm"
|
|
HOSTCC="${CC:-gcc}"
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
ksrcdir="$srcdir/android_kernel_${_vendor}_g3-${_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/"
|
|
|
|
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-dtb" \
|
|
"$pkgdir/boot/vmlinuz-$_flavor"
|
|
|
|
install -D "$srcdir/build/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
}
|
|
|
|
sha512sums="e8e614cb468cc93f076c051e7233c03440f3db916733ed2914212859c01c6dd933fc49a4eb3dd56afe71cec39c5de796fa36c98e303375068fe0a6bfa5ddd23d linux-lg-d855-efce7b0879c76224f5bf37d8a1025eaed99192b0.zip
|
|
d99b0ce33d5a4e7cba98c6503d1199139f169dde5269f806873d809629ac4f0897dc88dafa18b0fd32771631e0ebb37dc7289b06e7a7515394c283c726e3081e config-lg-d855.armhf
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 gpu-msm-fix-gcc5-compile.patch"
|