95198e12e9
device-xiaomi-santoni: use mdss-fb-init-hack to refresh the display, and swapfile to fix "out of memory" when loading proprietary blobs. I have tested the kernel, USB Networking, Display, USB OTG, Wi-Fi (with proprietary blobs) works fine, through I haven't figured out how to get Bluetooth and among of other stuff to work. Audio works. For more information on how to get Wi-Fi and Audio to work, check out the wiki page for this device, I have updated it. [ci:skip-build]: already built successfully in CI
82 lines
2.5 KiB
Text
82 lines
2.5 KiB
Text
# Kernel config based on: arch/arm64/configs/S88536AA2-perf_defconfig
|
|
|
|
pkgname="linux-xiaomi-santoni"
|
|
pkgver=3.18.136
|
|
pkgrel=0
|
|
pkgdesc="Xiaomi Redmi 4X kernel fork - msm-3.18 rebased"
|
|
arch="aarch64"
|
|
_carch="arm64"
|
|
_flavor="xiaomi-santoni"
|
|
url="https://kernel.org"
|
|
license="GPL2"
|
|
options="!strip !check !tracedeps"
|
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev gcc6"
|
|
|
|
# Tested with GCC-8, won't boot, PSTORE doesn't work so no logs are provided.
|
|
# Looks like we're stuck with GCC-6. For a while, through.
|
|
if [ "${CC:0:5}" != "gcc6-" ]; then
|
|
CC="gcc6-$CC"
|
|
HOSTCC="gcc6-gcc"
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
fi
|
|
|
|
# Source
|
|
_repository="msm-3.18"
|
|
_commit="adc4e69112d26b6b74c1b3f7e890109faf7c6a7e"
|
|
_config="config-${_flavor}.${arch}"
|
|
source="
|
|
$pkgname-$_commit.tar.gz::https://github.com/Danct12/${_repository}/archive/${_commit}.tar.gz
|
|
$_config
|
|
compiler-gcc6.h
|
|
"
|
|
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"
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
sha512sums="66d3fe05d7cfaae719608f349a557ca331de86d74023a26e97710e1ac756892e9f690cdfc353058e12a41ae0927aaaf7506739a009433465fe372a52964af6aa linux-xiaomi-santoni-adc4e69112d26b6b74c1b3f7e890109faf7c6a7e.tar.gz
|
|
4bf0b6ac007aa32c3739b6a4aeae589612995a2a333445619a4e50e3551a2ee80b6f42e31252ac5a55537bf7ce0d9a1e43a748a46bd74ead4a6e36ad34b63539 config-xiaomi-santoni.aarch64
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h"
|