huawei-warsaw: new device (MR 1848)
[ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
577564795a
commit
e13377c1ef
10 changed files with 5270 additions and 0 deletions
22
device/testing/device-huawei-warsaw/APKBUILD
Normal file
22
device/testing/device-huawei-warsaw/APKBUILD
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-huawei-warsaw
|
||||
pkgdesc="Huawei P10 Lite"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-huawei-warsaw mkbootimg mesa-dri-gallium msm-fb-refresher"
|
||||
makedepends="devicepkg-dev"
|
||||
source="deviceinfo"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="1d677f67178d34509af45f620a79657ccbe53d5e9e050686be941a62eed47a7b3850f0c5c63cefa45cfa3fda9e8bb2dcda54c8ce26ae1227da0a646d3e20bdcc deviceinfo"
|
31
device/testing/device-huawei-warsaw/deviceinfo
Normal file
31
device/testing/device-huawei-warsaw/deviceinfo
Normal file
|
@ -0,0 +1,31 @@
|
|||
# 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 P10 Lite"
|
||||
deviceinfo_manufacturer="Huawei"
|
||||
deviceinfo_codename="huawei-warsaw"
|
||||
deviceinfo_year="2017"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="handset"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1080"
|
||||
deviceinfo_screen_height="1920"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="fastboot"
|
||||
deviceinfo_kernel_cmdline="buildvariant=userdebug"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_flash_offset_base="0x10000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x01000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
31
device/testing/linux-huawei-warsaw/01_remove_wireguard.patch
Normal file
31
device/testing/linux-huawei-warsaw/01_remove_wireguard.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- b/net/.gitignore
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-wireguard/
|
||||
--- b/net/Kconfig
|
||||
+++ a/net/Kconfig
|
||||
@@ -80,7 +80,6 @@
|
||||
Short answer: say Y.
|
||||
|
||||
if INET
|
||||
-source "net/wireguard/Kconfig"
|
||||
source "net/ipv4/Kconfig"
|
||||
source "net/ipv6/Kconfig"
|
||||
source "net/netlabel/Kconfig"
|
||||
--- b/net/Makefile
|
||||
+++ a/net/Makefile
|
||||
@@ -14,7 +14,6 @@
|
||||
obj-$(CONFIG_LLC) += llc/
|
||||
obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/
|
||||
obj-$(CONFIG_NETFILTER) += netfilter/
|
||||
-obj-$(CONFIG_WIREGUARD) += wireguard/
|
||||
obj-$(CONFIG_INET) += ipv4/
|
||||
obj-$(CONFIG_XFRM) += xfrm/
|
||||
obj-$(CONFIG_UNIX) += unix/
|
||||
--- b/scripts/Kbuild.include
|
||||
+++ a/scripts/Kbuild.include
|
||||
@@ -365,7 +365,6 @@
|
||||
endef
|
||||
#
|
||||
###############################################################################
|
||||
-$(shell cd "$(srctree)" && ./scripts/fetch-latest-wireguard.sh)
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/net/core/sock.c b/net/core/sock.c
|
||||
index 98568723..bad3dac7 100644
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -141,9 +141,9 @@
|
||||
#include <net/tcp.h>
|
||||
#endif
|
||||
|
||||
-#ifdef CONFIG_ANDROID_PARANOID_NETWORK
|
||||
+//#ifdef CONFIG_ANDROID_PARANOID_NETWORK
|
||||
#include <linux/android_aid.h>
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
#include <net/busy_poll.h>
|
||||
|
11
device/testing/linux-huawei-warsaw/03_fix_dtc.patch
Normal file
11
device/testing/linux-huawei-warsaw/03_fix_dtc.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/scripts/Makefile.lib 2021-01-04 14:53:56.447554188 +0100
|
||||
+++ b/scripts/Makefile.lib 2021-01-04 14:54:57.445167162 +0100
|
||||
@@ -293,7 +293,7 @@
|
||||
$(obj)/%.dtb.S: $(obj)/%.dtb
|
||||
$(call cmd,dt_S_dtb)
|
||||
|
||||
-DTCTOOL = $(KBUILD_SRC)/tools/dtc
|
||||
+DTCTOOL = dtc
|
||||
quiet_cmd_dtc = DTC $@
|
||||
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/drivers/hisi/mntn/blackbox/platform_ap/rdr_hisi_ap_adapter.c b/drivers/hisi/mntn/blackbox/platform_ap/rdr_hisi_ap_adapter.c
|
||||
index ddefead5..66373bde 100644
|
||||
--- a/drivers/hisi/mntn/blackbox/platform_ap/rdr_hisi_ap_adapter.c
|
||||
+++ b/drivers/hisi/mntn/blackbox/platform_ap/rdr_hisi_ap_adapter.c
|
||||
@@ -194,7 +194,7 @@ static unsigned long exception_buf_len __attribute__((__section__(".data")));
|
||||
* You should not use this function to access IO space, use memcpy_toio()
|
||||
* or memcpy_fromio() instead.
|
||||
*/
|
||||
-__no_sanitize_address static void *memcpy_rdr(void *dest, const void *src, size_t count)
|
||||
+__attribute__((no_sanitize_address)) static void *memcpy_rdr(void *dest, const void *src, size_t count)
|
||||
{
|
||||
char *tmp = dest;
|
||||
const char *s = src;
|
||||
@@ -1047,7 +1047,7 @@ void regs_dump(void)
|
||||
}
|
||||
}
|
||||
|
||||
-__no_sanitize_address void last_task_stack_dump(void)
|
||||
+__attribute__((no_sanitize_address)) void last_task_stack_dump(void)
|
||||
{
|
||||
int i;
|
||||
unsigned char *dst = NULL;
|
|
@ -0,0 +1,53 @@
|
|||
From cc641d66eef1e8c67ac36d099d23cee52ca83836 Mon Sep 17 00:00:00 2001
|
||||
From: Henkate <robertpopescu95@yahoo.com>
|
||||
Date: Mon, 30 Oct 2017 21:46:29 +0200
|
||||
Subject: [PATCH] drivers/hwbfm: Disable huawei Bootfail Monitor
|
||||
|
||||
* Ive tried to disable configs in defconfig and also removing the driver entirely, but i keep getting build errors after solving an error.
|
||||
* I dont know if there is a simpler/better way to disable this since i lack C++ knowledge and its been a long time since ive did something in C++ ( i learnt some basic C++ at high school, but not advanced).
|
||||
* Now the phone doesnt reboot anymore and in dmesg appears:
|
||||
|
||||
3,1093,2579384,-;func: bfm_init line: 2616, BFMR is disabled!
|
||||
|
||||
* This driver is causing the phone to reboot to erecovery.
|
||||
* According to dmesg, the driver doesnt see that the phone booted succesfully, and after 30 mins since boot it reboots to erecovery.
|
||||
|
||||
<3>[340, hwboot_time][ 1806.180155] hwboot_timer:update timer [long and short]!
|
||||
<3>[340, hwboot_time][ 1806.180170] hwboot_timer: 30 minutes timer expired! boot fail!
|
||||
<6>[340, hwboot_time][ 1806.180177] >>>>enter func: boot_fail_err, line: 1346.
|
||||
<6>[340, hwboot_time][ 1806.180183] boot_stage = 0x0300000f
|
||||
|
||||
<3>[12505, bfm_process_upp][ 1806.182136] get_ats_1_secs:ats_tmp=1504886599626
|
||||
<3>[12505, bfm_process_upp][ 1806.182145] func: try_to_recovery line: 1210, boot_fail_stage:300000f NATIVE_STAGE_START: 4000000 boot_fail_no: 3000005 suggested_recovery_method: 0
|
||||
<3>[12505, bfm_process_upp][ 1806.182151] func: try_to_recovery line: 1218, File: ../../../../../../kernel/huawei/msm8953/drivers/hwbfm/bfr/core/bfr_core.c Line: 1218 bfr_read_recovery_record
|
||||
<3>[12505, bfm_process_upp][ 1806.249175] func: try_to_recovery line: 1229, File: ../../../../../../kernel/huawei/msm8953/drivers/hwbfm/bfr/core/bfr_core.c Line: 1229 bfr_select_recovery_method
|
||||
<6>[12505, bfm_process_upp][ 1806.249193] >>>>enter func: bfr_select_recovery_method, line: 425.
|
||||
<3>[12505, bfm_process_upp][ 1806.249200] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000001, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249206] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000001, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249213] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000005, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249219] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000004, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249224] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000004, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249231] func: bfm_is_bottom_layer_boofail line: 402, cur_boot_fail_no: 0x03000005, bootstage in bootfail errno: 3
|
||||
<3>[12505, bfm_process_upp][ 1806.249238] func: bfr_select_recovery_method line: 460, bf_total_times:6 bf_bottom_layer_times: 6 bf_app_times: 0
|
||||
<3>[12505, bfm_process_upp][ 1806.249245] func: bfr_select_recovery_method line: 552, [APP has no boot fail] FRM_GOTO_ERECOVERY_DOWNLOAD_RECOVERY
|
||||
<3>[12505, bfm_process_upp][ 1806.249252] func: try_to_recovery line: 1239, File: ../../../../../../kernel/huawei/msm8953/drivers/hwbfm/bfr/core/bfr_core.c Line: 1239 bfr_create_recovery_record
|
||||
<3>[12505, bfm_process_upp][ 1806.266430] func: try_to_recovery line: 1256, File: ../../../../../../kernel/huawei/msm8953/drivers/hwbfm/bfr/core/bfr_core.c Line: 1256 bfr_run_recovery_method
|
||||
|
||||
Change-Id: Ib9e99d6eaf47486143db6fd692f030ccbc63b2cc
|
||||
---
|
||||
drivers/hwbfm/main/bfmr_main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/hwbfm/main/bfmr_main.c b/drivers/hwbfm/main/bfmr_main.c
|
||||
index 31921b0cc36..f81f86f343b 100644
|
||||
--- a/drivers/hwbfm/main/bfmr_main.c
|
||||
+++ b/drivers/hwbfm/main/bfmr_main.c
|
||||
@@ -64,7 +64,7 @@ static int __init early_parse_bfmr_enable_flag(char *p)
|
||||
{
|
||||
if (0 == strncmp(p, "1", strlen("1")))
|
||||
{
|
||||
- s_is_bfmr_enabled = 1;
|
||||
+ s_is_bfmr_enabled = 0;
|
||||
}
|
||||
else
|
||||
{
|
55
device/testing/linux-huawei-warsaw/APKBUILD
Normal file
55
device/testing/linux-huawei-warsaw/APKBUILD
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm64/configs/merge_hi6250_defconfig
|
||||
|
||||
pkgname=linux-huawei-warsaw
|
||||
pkgver=4.4.159
|
||||
pkgrel=0
|
||||
pkgdesc="Huawei P10 Lite kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="huawei-warsaw"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="bash bc bison devicepkg-dev dtc flex openssl-dev perl xz"
|
||||
|
||||
# Source
|
||||
_repository="labyrinth_kernel_prague"
|
||||
_commit="f148d781c3d6bad4bae8d1c4073e233abeca9c96"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/Dil3mm4/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
linux4.2-gcc10-extern_YYLOC_global_declaration.patch
|
||||
01_remove_wireguard.patch
|
||||
02_fix_undeclared_AID_INET.patch
|
||||
03_fix_dtc.patch
|
||||
04_make_rdr_hisi_adapter_compileable.patch
|
||||
05-disable-huawei-bfmr.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
|
||||
}
|
||||
|
||||
sha512sums="457975f60727cb0d6e0a62a2706fc37431480f47635b8deed178843d71a8ae9f0893f33e84b0b41dbfe33e47c7b4b05aa99efbc57fa4411bdbf48395b3340f3e linux-huawei-warsaw-f148d781c3d6bad4bae8d1c4073e233abeca9c96.tar.gz
|
||||
512b7ed7bfc40198317a84f233d77f41420e7a467349c280994cf5e8a29e9b3cd5a08540da1793f3a060139442fef36038409aa94955ee83a8332a0e70b6cc1e config-huawei-warsaw.aarch64
|
||||
eaf2e61fcb508cdd239b8fed209d2a09ecac77287f6b46d003918fdf1c6fa2ee63f7390f3ff7c49029b8ed6cbcdd81c7e9a4b1ece9f5060b6fc84e322bd47f41 linux4.2-gcc10-extern_YYLOC_global_declaration.patch
|
||||
e72fdbde8746f29af60065b765a75e5475ba859bf545e2074609a075aebb6700024fe289ed56ab49bd8f55cb3597ea8e01b465b85d51675b1f45db88a8ebd9ae 01_remove_wireguard.patch
|
||||
03df93e697a1a63bb6003af569850f7bb54749127b8cef8d9c0aa9be1487b9e33e5454d258454d01d8e70ad776e8b4730569549390d327f0cf0d50a5334b8f7e 02_fix_undeclared_AID_INET.patch
|
||||
3c7120bf70cdf508f2d5c919d1e0fa9e716882e3774e146ab953e9708f353d0e71af5325e0e9c881601aa90d6f131892b2f7e8b9bd774b4f993d17da189e5141 03_fix_dtc.patch
|
||||
cdc60b6c829df3b014226b9cb506ed71cf005cf5fec8d4339b54a23f052465501aaa4983ec00f33ef301db2e6a70b24a30439b3f6ce8f7c00348c05d3132ec3f 04_make_rdr_hisi_adapter_compileable.patch
|
||||
6e420722576111a7ba49f265a66de632631c13d1bdb67553916d2156149226526daedc8298d83a38115c0a7189497cdb92b0daa0a263a92e6093f575e855a6e5 05-disable-huawei-bfmr.patch"
|
5028
device/testing/linux-huawei-warsaw/config-huawei-warsaw.aarch64
Normal file
5028
device/testing/linux-huawei-warsaw/config-huawei-warsaw.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/linux4.2-gcc10-extern_YYLOC_global_declaration.patch
|
Loading…
Reference in a new issue