7aded95988
This reverts commit ee659a5bb4
and increases the pkgrels of all affected linux pmaports.
I have compiled *every single kernel* that was modified with this
commit, and it worked. That took 12 hours. So I'm pretty confident that
this is a good commit. Let's roll it out and go back to stability \o/
I'll kick off the binary repo building directly after pushing this, but
it will take some time until all binary packages are available again.
[skip ci]: it wouldn't finish in time.
106 lines
4.2 KiB
Text
106 lines
4.2 KiB
Text
# Kernel config based on: arch/arm/configs/lineageos_cancro_defconfig
|
|
|
|
pkgname="linux-xiaomi-cancro"
|
|
pkgver=3.4.0
|
|
pkgrel=2
|
|
pkgdesc="Mi 3 kernel fork"
|
|
arch="armhf"
|
|
_carch="arm"
|
|
_flavor="xiaomi-cancro"
|
|
url="https://kernel.org"
|
|
license="GPL2"
|
|
options="!strip !check !tracedeps"
|
|
makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev dtbtool gcc6"
|
|
|
|
# Compiler: this kernel was only tested with GCC6. Feel free to make a merge
|
|
# request if you find out that it is booting working with newer GCCs as
|
|
# well. See <https://postmarketos.org/vendorkernel> for instructions.
|
|
if [ "${CC:0:5}" != "gcc6-" ]; then
|
|
CC="gcc6-$CC"
|
|
HOSTCC="gcc6-gcc"
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
fi
|
|
|
|
# Source
|
|
_repository="android_kernel_xiaomi_cancro"
|
|
_commit="b263a8914dcb8f9609be55070c3e40c85020188d"
|
|
_config="config-${_flavor}.${arch}"
|
|
source="
|
|
$pkgname-$_commit.tar.gz::https://github.com/LineageOS/${_repository}/archive/${_commit}.tar.gz
|
|
$_config
|
|
compiler-gcc6.h
|
|
01_smd_private.patch
|
|
02_gpu-msm-fix-gcc5-compile.patch
|
|
03t_spdrv.patch
|
|
tspdrv_2.patch
|
|
tspdrv_3.patch
|
|
tspdrv_4.patch
|
|
tspdrv_5.patch
|
|
05_q6voice.patch
|
|
"
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# gcc6 support
|
|
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
|
|
|
# Remove -Werror from all makefiles
|
|
local i
|
|
local makefiles="$(find . -type f -name Makefile)
|
|
$(find . -type f -name Kbuild)"
|
|
for i in $makefiles; do
|
|
sed -i 's/-Werror-/-W/g' "$i"
|
|
sed -i 's/-Werror//g' "$i"
|
|
done
|
|
|
|
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
|
cp "$srcdir"/$_config "$builddir"/.config
|
|
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
|
}
|
|
|
|
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="f24bf599d5a4de3729ceea6a558013a71b550ae772968928cc0825115665a267f65cb16c3b69ed3223e069886c7a1ca16bd0a754cc081accda2ce34fec3b1b58 linux-xiaomi-cancro-b263a8914dcb8f9609be55070c3e40c85020188d.tar.gz
|
|
3a87850b94ffc1cf66e974519267d4d69d8ceb96d8bd6a49091e04c844fb7058c340743d561ce9f53febbde7d9967fe8090817f73092647a35998ab08fd416e4 config-xiaomi-cancro.armhf
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
39892cc41e484c51dccc29cadea475aaf99772bafb19231086b614b9eaee520843cd9361c89a6780229961e0ebf4bbf0e115d0e30f8302944b78091fcf7900e7 01_smd_private.patch
|
|
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch
|
|
b16626bcf66016aee891050cade45127630062339227ce5d20862ab48eba712f92b3ab09e5e0e1bd8e57084fb20dafc4f8a6b3be61823b51136de2ba4c5a9986 03t_spdrv.patch
|
|
c1a70619ffb7aec52b8e4b0847800ff7eeae7f1061e61f68030849e0542175c1f83ca5fa12ab78c12e4cce5900467c5c07677d45abff4bc9889d529a7dd20522 tspdrv_2.patch
|
|
977e8b6bd17b148fea92952ea92d50c35dd94b3b585af2b30dee000c1092539139b08128494a63b7963bdd6ed4e6a2f44d5faba7e48af41e01440e41f9538b3b tspdrv_3.patch
|
|
4b6c12f0591302fe50617ce49eae456befd1e8b9cfcf7ec8a322cbff5f54fbfd85c1b5ea68ad5f84e63450a0972eb07e46bbeb9c5f76c9b42cc2d88e5ef295b7 tspdrv_4.patch
|
|
a509f9fbe351fd22d3f036ed3718f9f1e0b24791b7ddb6851bc683fa5197f5856477f6b5552cd6bb6e07df1e355c2a65c228f29e896b158e369ca4c7c7e9e07b tspdrv_5.patch
|
|
4e7484eaa142e013c9aee12053d91a65983f7629d2b923566d4431143fa0529988dbc28b01dee21336995090ce8127b2ba79208bf61df359632bfeebae9c6618 05_q6voice.patch"
|