huawei-lua-u22: new device (!559)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
ea840383f7
commit
969a4f876c
9 changed files with 3394 additions and 0 deletions
26
device/device-huawei-lua-u22/APKBUILD
Normal file
26
device/device-huawei-lua-u22/APKBUILD
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname="device-huawei-lua-u22"
|
||||||
|
pkgdesc="Huawei Y3 II 3G"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="armv7"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="msm-fb-refresher postmarketos-base linux-huawei-lua-u22 mkbootimg mesa-dri-swrast"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo initfs-hook.sh"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
install -Dm644 "$srcdir"/initfs-hook.sh \
|
||||||
|
"$pkgdir"/etc/postmarketos-mkinitfs/hooks/00-${pkgname}.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sha512sums="aca066f7128dd91035087dffc69a6fccf9a709c7f7ee92e99a8b6a18221c89c0a85240e189466b005d994f21ddff589fb8895698ddb6ab2febf62a5bb3d15a29 deviceinfo
|
||||||
|
e1f35a48cd76a84cb3a84e26ec223f41ba2adaaec9023880fba3d4f11eb39c69bb2b124bc412d7173d9e6d945a5a78c09384f3cc3b64eaede42248fd92397241 initfs-hook.sh"
|
33
device/device-huawei-lua-u22/deviceinfo
Normal file
33
device/device-huawei-lua-u22/deviceinfo
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Huawei Y3 II 3G"
|
||||||
|
deviceinfo_manufacturer="Huawei"
|
||||||
|
deviceinfo_codename="huawei-lua-u22"
|
||||||
|
deviceinfo_date=""
|
||||||
|
deviceinfo_dtb=""
|
||||||
|
deviceinfo_modules_initfs=""
|
||||||
|
deviceinfo_arch="armv7"
|
||||||
|
|
||||||
|
# Device related
|
||||||
|
deviceinfo_keyboard="false"
|
||||||
|
deviceinfo_external_storage="true"
|
||||||
|
deviceinfo_screen_width="480"
|
||||||
|
deviceinfo_screen_height="854"
|
||||||
|
deviceinfo_dev_touchscreen="/dev/input/event3"
|
||||||
|
deviceinfo_dev_touchscreen_calibration=""
|
||||||
|
deviceinfo_dev_keyboard=""
|
||||||
|
|
||||||
|
# Bootloader related
|
||||||
|
deviceinfo_flash_method="fastboot"
|
||||||
|
deviceinfo_kernel_cmdline=""
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
deviceinfo_flash_offset_base="0x80000000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x04000000"
|
||||||
|
deviceinfo_flash_offset_second="0x00f00000"
|
||||||
|
deviceinfo_flash_offset_tags="0x00000100"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
|
6
device/device-huawei-lua-u22/initfs-hook.sh
Normal file
6
device/device-huawei-lua-u22/initfs-hook.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Framebuffer
|
||||||
|
echo 0,1709 > /sys/devices/platform/mtkfb.0/graphics/fb0/pan
|
||||||
|
echo 480,2592 > /sys/devices/platform/mtkfb.0/graphics/fb0/virtual_size
|
||||||
|
|
70
device/linux-huawei-lua-u22/APKBUILD
Normal file
70
device/linux-huawei-lua-u22/APKBUILD
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm/configs/wt96582_s96582aa71_defconfig
|
||||||
|
|
||||||
|
pkgname="linux-huawei-lua-u22"
|
||||||
|
pkgver=3.10.72
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Huawei Y3 II 3G kernel fork"
|
||||||
|
arch="armv7"
|
||||||
|
_carch="arm"
|
||||||
|
_flavor="huawei-lua-u22"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps"
|
||||||
|
makedepends="xz perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev"
|
||||||
|
|
||||||
|
# Compiler: latest GCC from Alpine
|
||||||
|
HOSTCC="${CC:-gcc}"
|
||||||
|
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||||
|
|
||||||
|
# Source
|
||||||
|
_repository="kernel-huawei-y3ii"
|
||||||
|
_commit="83637cb899ac81dfdabd8935181caec15a7c6929"
|
||||||
|
_config="config-${_flavor}.${arch}"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/HenriDellal/${_repository}/archive/${_commit}.tar.gz
|
||||||
|
$_config
|
||||||
|
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
gcc8-fix-put-user.patch
|
||||||
|
fix-touchscreen.patch
|
||||||
|
kernel-use-the-gnu89-standard-explicitly.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/${_repository}-${_commit}"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||||
|
}
|
||||||
|
|
||||||
|
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="1772a62d28175bd31f7e1c7f5543f15ffa9a75421409f2dceff5445eaf79ded9d229538b389df0a16d3fd00c4670d625c66e4a9efc7e809fb02c8ee7b0d9a260 linux-huawei-lua-u22-83637cb899ac81dfdabd8935181caec15a7c6929.tar.gz
|
||||||
|
5b720380fc83292068f578f0e4cdbeaf7f25775258e7031102575d4a4950bfcb8598e0fac86a85d20f9f6482927b08b429a50fd216ca66874829dd19fb419bd8 config-huawei-lua-u22.armv7
|
||||||
|
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||||
|
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||||
|
dd947f60b8a8082a0d4dcd9c1f0c25178d242edc18aa7ade8390d9f0b13f1756a41bf49bbe4edd890ee70d6e1d751b6d5a7fc0d6bbd4687cf1a0c3b9513a1561 fix-touchscreen.patch
|
||||||
|
2ec1a4d6e12dd961541f32d308b97b9daf4817976660601b38ec1ab18631ac88bef6704237f088edcc9f6508bbd4ffbb0014d1ce0fd585587267235a9658a3fe kernel-use-the-gnu89-standard-explicitly.patch"
|
3178
device/linux-huawei-lua-u22/config-huawei-lua-u22.armv7
Normal file
3178
device/linux-huawei-lua-u22/config-huawei-lua-u22.armv7
Normal file
File diff suppressed because it is too large
Load diff
17
device/linux-huawei-lua-u22/fix-touchscreen.patch
Normal file
17
device/linux-huawei-lua-u22/fix-touchscreen.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
--- a/drivers/input/touchscreen/mediatek/FT5446/focaltech_driver.c
|
||||||
|
+++ b/drivers/input/touchscreen/mediatek/FT5446/focaltech_driver.c
|
||||||
|
@@ -598,12 +598,12 @@ static void tpd_down(int x, int y, int p) {
|
||||||
|
}
|
||||||
|
input_report_key(tpd->dev, BTN_TOUCH, 1);
|
||||||
|
input_report_abs(tpd->dev, ABS_MT_TOUCH_MAJOR, 20);
|
||||||
|
- input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0x3f);
|
||||||
|
+ //input_report_abs(tpd->dev, ABS_MT_PRESSURE, 0x3f);
|
||||||
|
input_report_abs(tpd->dev, ABS_MT_POSITION_X, x);
|
||||||
|
input_report_abs(tpd->dev, ABS_MT_POSITION_Y, y);
|
||||||
|
//printk("tpd:D[%4d %4d %4d] ", x, y, p);
|
||||||
|
/* track id Start 0 */
|
||||||
|
- //input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, p);
|
||||||
|
+ input_report_abs(tpd->dev, ABS_MT_TRACKING_ID, p);
|
||||||
|
input_mt_sync(tpd->dev);
|
||||||
|
if (FACTORY_BOOT == get_boot_mode()|| RECOVERY_BOOT == get_boot_mode())
|
||||||
|
{
|
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
1
device/linux-huawei-lua-u22/gcc8-fix-put-user.patch
Symbolic link
1
device/linux-huawei-lua-u22/gcc8-fix-put-user.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
@ -0,0 +1,62 @@
|
||||||
|
From 51b97e354ba9fce1890cf38ecc754aa49677fc89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
Date: Mon, 20 Oct 2014 12:23:12 +0300
|
||||||
|
Subject: kernel: use the gnu89 standard explicitly
|
||||||
|
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
|
||||||
|
commit 51b97e354ba9fce1890cf38ecc754aa49677fc89 upstream.
|
||||||
|
|
||||||
|
Sasha Levin reports:
|
||||||
|
"gcc5 changes the default standard to c11, which makes kernel build
|
||||||
|
unhappy
|
||||||
|
|
||||||
|
Explicitly define the kernel standard to be gnu89 which should keep
|
||||||
|
everything working exactly like it was before gcc5"
|
||||||
|
|
||||||
|
There are multiple small issues with the new default, but the biggest
|
||||||
|
issue seems to be that the old - and very useful - GNU extension to
|
||||||
|
allow a cast in front of an initializer has gone away.
|
||||||
|
|
||||||
|
Patch updated by Kirill:
|
||||||
|
"I'm pretty sure all gcc versions you can build kernel with supports
|
||||||
|
-std=gnu89. cc-option is redunrant.
|
||||||
|
|
||||||
|
We also need to adjust HOSTCFLAGS otherwise allmodconfig fails for me"
|
||||||
|
|
||||||
|
Note by Andrew Pinski:
|
||||||
|
"Yes it was reported and both problems relating to this extension has
|
||||||
|
been added to gnu99 and gnu11. Though there are other issues with the
|
||||||
|
kernel dealing with extern inline have different semantics between
|
||||||
|
gnu89 and gnu99/11"
|
||||||
|
|
||||||
|
End result: we may be able to move up to a newer stdc model eventually,
|
||||||
|
but right now the newer models have some annoying deficiencies, so the
|
||||||
|
traditional "gnu89" model ends up being the preferred one.
|
||||||
|
|
||||||
|
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||||
|
Singed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||||
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 917f5c5..acef402 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -241,7 +241,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTCXX = g++
|
||||||
|
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||||
|
+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
|
||||||
|
HOSTCXXFLAGS = -O2
|
||||||
|
|
||||||
|
# Decide whether to build built-in, modular, or both.
|
||||||
|
@@ -374,6 +374,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||||
|
-Werror-implicit-function-declaration \
|
||||||
|
-Wno-format-security \
|
||||||
|
-fno-delete-null-pointer-checks \
|
||||||
|
+ -std=gnu89 \
|
||||||
|
-Werror=format -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
|
||||||
|
|
||||||
|
KBUILD_AFLAGS_KERNEL :=
|
Loading…
Reference in a new issue