new device: ASUS Zenfone Go (Z00VD)
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
diff --git a/include/linux/log2.h b/include/linux/log2.h
|
||||
index fd7ff3d91e6a..4b0c8edcb947 100644
|
||||
--- a/include/linux/log2.h
|
||||
+++ b/include/linux/log2.h
|
||||
@@ -15,12 +15,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
-/*
|
||||
- * deal with unrepresentable constant logarithms
|
||||
- */
|
||||
-extern __attribute__((const, noreturn))
|
||||
-int ____ilog2_NaN(void);
|
||||
-
|
||||
/*
|
||||
* non-constant log of base 2 calculators
|
||||
* - the arch may override these in asm/bitops.h if they can be implemented
|
||||
@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
#define ilog2(n) \
|
||||
( \
|
||||
__builtin_constant_p(n) ? ( \
|
||||
- (n) < 1 ? ____ilog2_NaN() : \
|
||||
+ (n) < 2 ? 0 : \
|
||||
(n) & (1ULL << 63) ? 63 : \
|
||||
(n) & (1ULL << 62) ? 62 : \
|
||||
(n) & (1ULL << 61) ? 61 : \
|
||||
@@ -148,10 +142,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
(n) & (1ULL << 4) ? 4 : \
|
||||
(n) & (1ULL << 3) ? 3 : \
|
||||
(n) & (1ULL << 2) ? 2 : \
|
||||
- (n) & (1ULL << 1) ? 1 : \
|
||||
- (n) & (1ULL << 0) ? 0 : \
|
||||
- ____ilog2_NaN() \
|
||||
- ) : \
|
||||
+ 1 ) : \
|
||||
(sizeof(n) <= 4) ? \
|
||||
__ilog2_u32(n) : \
|
||||
__ilog2_u64(n) \
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 591a38331223..8d15418cd7e7 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -610,6 +610,7 @@ all: vmlinux
|
||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
+KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
|
||||
index 35c9db857ebe..cd8b589111ba 100644
|
||||
--- a/arch/arm/include/asm/uaccess.h
|
||||
+++ b/arch/arm/include/asm/uaccess.h
|
||||
@@ -251,7 +251,7 @@ extern int __put_user_8(void *, unsigned long long);
|
||||
({ \
|
||||
unsigned long __limit = current_thread_info()->addr_limit - 1; \
|
||||
const typeof(*(p)) __user *__tmp_p = (p); \
|
||||
- register const typeof(*(p)) __r2 asm("r2") = (x); \
|
||||
+ register typeof(*(p)) __r2 asm("r2") = (x); \
|
||||
register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
|
||||
register unsigned long __l asm("r1") = __limit; \
|
||||
register int __e asm("r0"); \
|
||||
--
|
||||
2.18.0
|
||||
@@ -0,0 +1,85 @@
|
||||
# Kernel config based on: arch/arm/configs/zc500tg_defconfig
|
||||
|
||||
pkgname="linux-asus-z00vd"
|
||||
pkgver=3.18.41
|
||||
pkgrel=0
|
||||
pkgdesc="ASUS Zenfone Go kernel fork"
|
||||
arch="armhf"
|
||||
_carch="arm"
|
||||
_flavor="asus-z00vd"
|
||||
url="https://kernel.org"
|
||||
license="GPL2"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev python2"
|
||||
|
||||
# Compiler: latest GCC from Alpine
|
||||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
# Source
|
||||
_repository="ZC500TG"
|
||||
_commit="7957ae0b17bb46d56a5cddd1d313aec76296aee8"
|
||||
_config="config-${_flavor}.${arch}"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/nik124seleznev/${_repository}/archive/${_commit}.tar.gz
|
||||
$_config
|
||||
01_fix_warnings.patch
|
||||
02_gcc8_error.patch
|
||||
"
|
||||
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
|
||||
|
||||
# Make a output folder because the kernel needs it for some reason
|
||||
mkdir "$builddir/out"
|
||||
|
||||
# Clean up kernel source
|
||||
make -C "$builddir" O="$builddir/out" ARCH="$_carch" ARCH_MTK_PLATFORM="mt6580" HOSTCC="$HOSTCC" clean
|
||||
make -C "$builddir" O="$builddir/out" ARCH="$_carch" ARCH_MTK_PLATFORM="mt6580" HOSTCC="$HOSTCC" mrproper
|
||||
|
||||
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
|
||||
cp "$srcdir"/$_config "$builddir"/arch/$_carch/configs/zc500tg_pmos_defconfig
|
||||
make -C "$builddir" O="$builddir/out" ARCH="$_carch" ARCH_MTK_PLATFORM="mt6580" HOSTCC="$HOSTCC" zc500tg_pmos_defconfig
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make -C "$builddir" O="$builddir/out" ARCH="$_carch" CC="${CC:-gcc}" ARCH_MTK_PLATFORM="mt6580" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
# kernel.release
|
||||
install -D "$builddir/out/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/out/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="eb4575d8d3603097141991bc207a51f3ed9281d6e1432570666aeeb3299c86574e80724e27721e2f64844fe9efdfd99df898138e1d2053f143132d1b0e89414b linux-asus-z00vd-7957ae0b17bb46d56a5cddd1d313aec76296aee8.tar.gz
|
||||
c0bbe3df4f9f1cbd89a3817377ab1ecc45b679c852d0376f4c3bff74cee8fe1c84e90acfb56db560664e752927989c91bf8562de24a73ae3b06fde032524a86c config-asus-z00vd.armhf
|
||||
1db0eb57279ab2b0ad70e0f93dfe6faa0d807cf24832c2e55b2c726b43cdece84edfc614e6455cddddbce890de1df80e37fd1805b9fd6ccc259047c5ef7a6ba6 01_fix_warnings.patch
|
||||
f60b91c7cffd1704e6ac51d1c352b87f74432fc645deff2ff4feeeffff3c441af425191254f871a999555b3abcd1d199eeba0c12dbef4d9364f4d70df4484976 02_gcc8_error.patch"
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user