2017-08-25 15:47:32 +00:00
|
|
|
# Kernel config based on: arch/arm/configs/msm8610_defconfig
|
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
pkgname="linux-huawei-y530"
|
2017-08-25 15:47:32 +00:00
|
|
|
pkgver=3.4.0
|
2018-11-28 22:54:09 +00:00
|
|
|
pkgrel=5
|
2017-09-08 15:18:11 +00:00
|
|
|
pkgdesc="Kernel for Huawei MSM8x1x devices"
|
2017-11-04 22:05:57 +00:00
|
|
|
arch="armhf"
|
|
|
|
_carch="arm"
|
|
|
|
_flavor="huawei-y530"
|
|
|
|
url="https://github.com/PieroV/android_kernel_huawei_msm8x1x"
|
|
|
|
license="GPL2"
|
2017-08-25 15:47:32 +00:00
|
|
|
options="!strip !check !tracedeps"
|
2018-10-01 06:44:18 +00:00
|
|
|
makedepends="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"
|
2018-11-28 22:54:09 +00:00
|
|
|
HOSTCC="gcc-6"
|
2018-10-01 06:44:18 +00:00
|
|
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
|
|
|
fi
|
2017-11-04 22:05:57 +00:00
|
|
|
|
|
|
|
# Source
|
|
|
|
_repository="android_kernel_huawei_msm8x1x"
|
|
|
|
_commit="1880463bf10c4c2d2b348698614a613902184e22"
|
|
|
|
_config="config-${_flavor}.armhf"
|
2017-08-25 15:47:32 +00:00
|
|
|
source="
|
2017-11-04 22:05:57 +00:00
|
|
|
$pkgname-$_commit.tar.gz::https://github.com/PieroV/${_repository}/archive/${_commit}.tar.gz
|
2017-08-25 15:47:32 +00:00
|
|
|
$_config
|
|
|
|
compiler-gcc6.h
|
|
|
|
00_fix_return_address.patch
|
|
|
|
01_timeconst_fix.patch
|
|
|
|
02_gpu-msm-fix-gcc5-compile.patch
|
|
|
|
03_avoid_rpmb_read_during_boot.patch
|
2017-09-08 15:18:11 +00:00
|
|
|
04_add_missing_dtb.patch
|
|
|
|
05_fix_mdp3_ctrl_off.patch
|
|
|
|
06_fix_mdss_fb_rgb_mode.patch
|
|
|
|
07_fix_mdss_fb_refresh_rate.patch
|
2017-09-10 11:35:20 +00:00
|
|
|
08_fix_touchscreen.patch
|
2017-11-04 22:05:57 +00:00
|
|
|
09_fix_various_include_directives.patch
|
2017-08-25 15:47:32 +00:00
|
|
|
"
|
2017-11-04 22:05:57 +00:00
|
|
|
builddir="$srcdir/${_repository}-${_commit}"
|
2017-08-25 15:47:32 +00:00
|
|
|
|
|
|
|
prepare() {
|
2017-11-04 22:05:57 +00:00
|
|
|
default_prepare
|
2017-08-25 15:47:32 +00:00
|
|
|
|
|
|
|
# gcc6 support
|
2017-11-04 22:05:57 +00:00
|
|
|
cp -v "$srcdir/compiler-gcc6.h" "$builddir/include/linux/"
|
2017-08-25 15:47:32 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# Remove -Werror from all makefiles
|
|
|
|
find . -type f -name Makefile -print0 | \
|
|
|
|
xargs -0 sed -i 's/-Werror-/-W/g'
|
|
|
|
find . -type f -name Makefile -print0 | \
|
|
|
|
xargs -0 sed -i 's/-Werror//g'
|
2017-08-25 15:47:32 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
|
|
|
cp "$srcdir"/$_config "$builddir"/.config
|
|
|
|
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
|
|
|
|
}
|
2017-08-25 15:47:32 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2017-11-04 22:05:57 +00:00
|
|
|
CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
2017-08-25 15:47:32 +00:00
|
|
|
|
2017-10-04 15:05:00 +00:00
|
|
|
# the 'no-pic' flag is necessary to avoid the
|
2017-09-14 18:24:33 +00:00
|
|
|
# error 'Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)' when loading the module
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" CFLAGS_MODULE="-fno-pic" \
|
2017-11-04 22:05:57 +00:00
|
|
|
CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
|
2017-10-04 15:05:00 +00:00
|
|
|
modules
|
2017-09-14 18:24:33 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# Generate master DTB
|
2017-08-25 15:47:32 +00:00
|
|
|
dtbTool -s 2048 -p "scripts/dtc/" -o "arch/arm/boot/dt.img" "arch/arm/boot/"
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-11-04 22:05:57 +00:00
|
|
|
# kernel.release
|
|
|
|
install -D "$builddir/include/config/kernel.release" \
|
|
|
|
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
2017-08-25 15:47:32 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# 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
|
2017-08-25 15:47:32 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# Master DTB
|
|
|
|
install -Dm644 "$builddir/arch/arm/boot/dt.img" \
|
|
|
|
"$pkgdir/boot/dt.img"
|
2017-09-14 18:24:33 +00:00
|
|
|
|
2017-11-04 22:05:57 +00:00
|
|
|
# Modules
|
|
|
|
cd "$builddir"
|
2017-09-14 18:24:33 +00:00
|
|
|
unset LDFLAGS
|
|
|
|
make ARCH="$_carch" CC="${CC:-gcc}" \
|
2017-11-04 22:05:57 +00:00
|
|
|
CONFIG_NO_ERROR_ON_MISMATCH=y \
|
|
|
|
KBUILD_BUILD_VERSION="$((pkgrel + 1))-postmarketOS" \
|
|
|
|
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 \
|
|
|
|
modules_install
|
2017-08-25 15:47:32 +00:00
|
|
|
}
|
|
|
|
|
2017-09-14 18:16:16 +00:00
|
|
|
sha512sums="b88fe4981fb35d289977c9a7ca6b041ec8d09380250485d7b3f3e1e1ef51ba500db2e1aecd222aa8c140a3b9ec5ed2fa638b68ddf446efe81f278aa8b8e7871f linux-huawei-y530-1880463bf10c4c2d2b348698614a613902184e22.tar.gz
|
2017-10-11 15:11:05 +00:00
|
|
|
101504dfdbb13cc9acdce816ecdd6566bb03d1411896dba02495c9fe78bf89f6c36d8703922923b52c99866d020832a91206b3e3baa778570789cad6780d437d config-huawei-y530.armhf
|
2017-08-25 15:47:32 +00:00
|
|
|
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
|
|
|
ea1d3b5a234fa565e3c1a792de48f4fc4e6023d281d303c8e319c7ef28edc5739ab0e4dea0139a41f0a5c7d03e27921ccaa214fd0ac5c72245a094ce60128864 00_fix_return_address.patch
|
|
|
|
a2bb98fb8d988bbb659cae00fbaca360828300e9b98b90aed5ee0dd839c3f740696df4094a9021b813cbada06820d115aabed581a47cdd2c947e8d853c20b145 01_timeconst_fix.patch
|
|
|
|
7be03a9e78b7ac330a54b1f00509caa0621a95c0c55901878ad757f9dd69cc05ba2c8b5ea987063ae1224f92c4d090d515fa5d369e7755181a4871b0d0f82881 02_gpu-msm-fix-gcc5-compile.patch
|
2017-09-08 15:18:11 +00:00
|
|
|
760fdff79df31754ebed59839f34fc8c5a61750471614ac93a01b1e13b2535e7ca1f879c0cad3e83ad92946586c91679ba853eac4fe454d7e948317c84d81941 03_avoid_rpmb_read_during_boot.patch
|
2017-11-04 22:05:57 +00:00
|
|
|
e1fff84343ec4374a7c4bd9e472fc1c7b1b00efc059724b16ca0b7980b7ff55e542310a3bfbf12a0a1b7936261fee8e633d43be1a084ff3ba64e5e8d271a51f0 04_add_missing_dtb.patch
|
2017-09-08 15:18:11 +00:00
|
|
|
fbc61e379403990167853f4c4fbdfa22d7e9661a7eedecf2a75eec2a8008991a82d0a61be844ab4b1c88383f3fa79b43eff10b1039e44ad5a758a173cbf6386b 05_fix_mdp3_ctrl_off.patch
|
|
|
|
384ae0bf2f5d7e15b0b60655693fd600b52c0f5bfcaa4ba7336d0ebeb224e84b99b597f77d26a1249e14a4e7bbc1629be00556b393bb9dd2266cb4bd67c3cfea 06_fix_mdss_fb_rgb_mode.patch
|
2017-09-10 11:35:20 +00:00
|
|
|
1f743d3e7f4ac7401167ea35edc7d7e113bd80824c4d53631d7500f33557ff486163f8244786c16506b2e21db6ccbcd8a0f7b26fcf4937efee50b62c074f9a22 07_fix_mdss_fb_refresh_rate.patch
|
2017-11-04 22:05:57 +00:00
|
|
|
f83e9b6549155a2f32c89dffbab3ad6fba7b8d93976dfccb1232833244ed6e064e28105a321eaa934c5bb326384730d03f3d3141227a7258a30045fa12573268 08_fix_touchscreen.patch
|
|
|
|
c9831aa037d4cb26fa349c44a27111daf8f7a84a9527d0221ecc4f01839b195243c178838663ff7592bb1d5c3cdc9872b449254beb7b9dffa67c365c3d8e042c 09_fix_various_include_directives.patch"
|