3209440946
[ci:skip-build]: already built successfully in CI
79 lines
3.1 KiB
Text
79 lines
3.1 KiB
Text
# Reference: <https://postmarketos.org/vendorkernel>
|
|
# Kernel config based on: arch/arm/configs/lineageos_find7_defconfig
|
|
|
|
pkgname="linux-oppo-find-7a"
|
|
pkgver=3.4.113
|
|
pkgrel=2
|
|
pkgdesc="OPPO Find 7a kernel fork"
|
|
arch="armv7"
|
|
_carch="arm"
|
|
_flavor="oppo-find-7a"
|
|
url="https://kernel.org"
|
|
license="GPL-2.0-only"
|
|
options="!strip !check !tracedeps"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-libelf devicepkg-dev dtbtool xz"
|
|
|
|
# Compiler: latest GCC from Alpine
|
|
HOSTCC="${CC:-gcc}"
|
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
|
|
|
# Source
|
|
_repository="android_kernel_oppo_msm8974"
|
|
_commit="60e8a8df2d253b053cdac10a0ffd196b7b9c3925"
|
|
_config="config-${_flavor}.${arch}"
|
|
source="
|
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
|
$_config
|
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
gcc8-fix-put-user.patch
|
|
kernel-use-the-gnu89-standard-explicitly.patch
|
|
0001-fix-video-argb-setting.patch
|
|
0002-mdss_fb.patch
|
|
"
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
|
}
|
|
|
|
build() {
|
|
unset LDFLAGS
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
|
|
|
# Generate master DTB (deviceinfo_bootimg_qcdt)
|
|
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
|
|
}
|
|
|
|
package() {
|
|
# kernel.release
|
|
install -D "$builddir/include/config/kernel.release" \
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
|
|
|
# zImage (find the right one)
|
|
cd "$builddir/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
|
|
|
|
# Master DTB (deviceinfo_bootimg_qcdt)
|
|
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
|
|
"$pkgdir/boot/dt.img"
|
|
}
|
|
|
|
sha512sums="e3fa1f9ab51a2b6213b9abaa3bb5e010fd2c41e98f572022fcfff66f17fc3639e1b29184b923c437ab4ed3411feb7e5667303304600fac3e929793c10a16daa2 linux-oppo-find-7a-60e8a8df2d253b053cdac10a0ffd196b7b9c3925.tar.gz
|
|
30134ad4cbd9cc3c906425847dbc095b4db37011e98d0c200bb7bd4fc8c6bb468f7537b2f77e542ae401c65c75feed9e16abde1d8d9787f83131684c5a52c8bc config-oppo-find-7a.armv7
|
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
|
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
|
|
a48336bbfead6ad0c84d2fce0c40a3f5530aebdff356a6835cceaf59a50a6f860d2f8027703a92927955fbb18857ba78788e010d017bf67730f069b36e96fe87 0001-fix-video-argb-setting.patch
|
|
5b3aabb59ae7a06c4c13668dde2033be477116626a423c4828e53330afebf8e07fc907a3add193f9dc263a6c9a80771475703e5d4c28a9bddd0597e2a8cd9b89 0002-mdss_fb.patch"
|