2019-06-23 10:58:45 +00:00
|
|
|
# Reference: <https://postmarketos.org/vendorkernel>
|
|
|
|
# Kernel config based on: arch/arm64/configs/msm8916_defconfig
|
|
|
|
|
|
|
|
_flavor="postmarketos-qcom-msm8916"
|
|
|
|
pkgname="linux-${_flavor}"
|
2019-12-23 11:47:03 +00:00
|
|
|
pkgver=5.5_rc3
|
2019-06-23 10:58:45 +00:00
|
|
|
pkgrel=0
|
|
|
|
pkgdesc="Mainline kernel fork for Qualcomm MSM8916 devices"
|
2019-12-07 14:00:13 +00:00
|
|
|
arch="aarch64 armv7"
|
2019-06-23 10:58:45 +00:00
|
|
|
url="https://github.com/msm8916-mainline/linux"
|
|
|
|
license="GPL-2.0-only"
|
|
|
|
options="!strip !check !tracedeps"
|
|
|
|
depends_dev="perl gmp-dev elfutils-dev bash flex bison"
|
|
|
|
makedepends="$depends_dev sed installkernel bc linux-headers openssl-dev dtbtool"
|
|
|
|
|
2019-12-07 14:00:13 +00:00
|
|
|
# Architecture
|
|
|
|
case "$CARCH" in
|
|
|
|
aarch64) _carch="arm64" ;;
|
|
|
|
arm*) _carch="arm" ;;
|
|
|
|
esac
|
|
|
|
|
2019-06-23 10:58:45 +00:00
|
|
|
# Compiler: latest GCC from Alpine
|
|
|
|
HOSTCC="${CC:-gcc}"
|
|
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
|
|
|
|
# Source
|
2019-12-23 11:47:03 +00:00
|
|
|
_tag=v${pkgver//_/-}-msm8916
|
2019-06-23 10:58:45 +00:00
|
|
|
source="
|
|
|
|
$pkgname-$_tag.tar.gz::$url/archive/$_tag.tar.gz
|
2019-12-07 14:00:13 +00:00
|
|
|
config-$_flavor.aarch64
|
|
|
|
config-$_flavor.armv7
|
2019-06-23 10:58:45 +00:00
|
|
|
"
|
|
|
|
builddir="$srcdir/linux-${_tag#v}"
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
default_prepare
|
2019-12-07 14:00:13 +00:00
|
|
|
cp "$srcdir/config-$_flavor.$CARCH" .config
|
2019-06-23 10:58:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
|
|
KBUILD_BUILD_VERSION=$((pkgrel + 1 ))
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
mkdir -p "$pkgdir"/boot
|
|
|
|
make zinstall modules_install dtbs_install \
|
|
|
|
ARCH="$_carch" \
|
|
|
|
INSTALL_PATH="$pkgdir"/boot \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" \
|
|
|
|
INSTALL_DTBS_PATH="$pkgdir"/usr/share/dtb
|
|
|
|
rm -f "$pkgdir"/lib/modules/*/build "$pkgdir"/lib/modules/*/source
|
|
|
|
|
|
|
|
install -D "$builddir"/include/config/kernel.release \
|
|
|
|
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
|
|
|
|
|
|
|
|
# Master DTB (deviceinfo_bootimg_qcdt)
|
2019-12-07 14:00:13 +00:00
|
|
|
dtbTool -p scripts/dtc/ -o "arch/$_carch/boot"/dt.img "arch/$_carch/boot/"
|
|
|
|
install -Dm644 "arch/$_carch/boot"/dt.img "$pkgdir"/boot/dt.img
|
2019-06-23 10:58:45 +00:00
|
|
|
}
|
|
|
|
|
2019-12-23 11:47:03 +00:00
|
|
|
sha512sums="f812b03b83d77b51ee4d99ed22b955bd8a6ae714e4dd171d7798975cf0e5ce30067748655ff5ae052aeb8941d9f4d6a9c10b8bccd997a8f5cff9b16553fd3ea7 linux-postmarketos-qcom-msm8916-v5.5-rc3-msm8916.tar.gz
|
2019-12-07 14:00:13 +00:00
|
|
|
ef2a21d00e781a69cc6f800b6097a36b8a4bd656bd3d72ccb999a4fb6f7123adaf5c24511089b98545d3e46746353b30025cd174dc7eff98f793362e4331aa7c config-postmarketos-qcom-msm8916.aarch64
|
|
|
|
8dc4f6242a3f2022f38741113bfc9b4737c6e94b4544914c8f441c4c83ca91c56e31258077bdb4fdb1e5fa80a79b62bb28e1cbbb43042df4e75ec6fe5bc1caef config-postmarketos-qcom-msm8916.armv7"
|