pmaports/device/linux-xiaomi-santoni/APKBUILD
Asriel Dreemurr 0ea7b9a70a
xiaomi-santoni: tweak kernel config for hybris-boot, add X11 config for xf86-video-hwcomposer (!420)
Signed-off-by: Asriel Dreemurr <asriel.danctnix@gmail.com>
2019-07-16 23:07:33 +02:00

76 lines
2.5 KiB
Text

# Kernel config based on: arch/arm64/configs/santoni_defconfig
pkgname="linux-xiaomi-santoni"
pkgver=3.18.140
pkgrel=1
pkgdesc="Xiaomi Redmi 4X kernel fork - msm-3.18 rebase"
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"
# Compiler: latest GCC from Alpine
HOSTCC="${CC:-gcc}"
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
# Source
_repository="msm-3.18"
_commit="2dd8017f40290eb326e352cca254cd8bdd1614c9"
_config="config-${_flavor}.${arch}"
source="
$pkgname-$_commit.tar.gz::https://github.com/bitrvmpd/${_repository}/archive/${_commit}.tar.gz
fix-xorg-mdss-update-fb-info.patch
disable-substream-runtime-errors.patch
$_config
"
builddir="$srcdir/${_repository}-${_commit}"
prepare() {
default_prepare
# 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="d7a290e676aa40d35289cedbad5dd077accff4e1a2467223765a79f101ff4c1313315cbffd574ad74c648c4b8f5751d16a1fa1607c9939b373d3f2974a7b2326 linux-xiaomi-santoni-2dd8017f40290eb326e352cca254cd8bdd1614c9.tar.gz
a277af28a718f5caf94257005393aa92d62c96110a8ec6368ff62f2e0d871b69c56c4ce00174db637204d53fa63ad3a79b8d6141713dca0878e1f06fe0379caa fix-xorg-mdss-update-fb-info.patch
14ee08e4f93befeaabfb35e6bf0b8bb5b2eecba1c21ce4498499c377c2cf4d5fccbfe85e14ca92c704d067386ec08a06805ab886f0ec7691471cf379838545aa disable-substream-runtime-errors.patch
685668bb733c485167c5944aec6c749904933312f6a930f27ee279bdea2c7ddfc4fc46ed9cd3cf6469fc3ef798ab832bda35f86a8befff4bade85b6de6de9332 config-xiaomi-santoni.aarch64"