lg-sf340n: new device (MR 5004)
(MR 5004)
This commit is contained in:
parent
95a9e93450
commit
9d9cc83ea2
7 changed files with 5385 additions and 0 deletions
30
device/testing/device-lg-sf340n/APKBUILD
Normal file
30
device/testing/device-lg-sf340n/APKBUILD
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-lg-sf340n
|
||||
pkgdesc="LG Stylo 3 Plus"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-lg-sf340n
|
||||
mkbootimg
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
26a20ab5618090eeb17f22b87e6568867b1425da9e76a49e7ae1dc13f8c9ce88fe96c195c15d48ab980d3349fab5d6029d95d8b891036cc824a30d59bf47a371 deviceinfo
|
||||
"
|
31
device/testing/device-lg-sf340n/deviceinfo
Normal file
31
device/testing/device-lg-sf340n/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="LG Stylo 3 Plus"
|
||||
deviceinfo_manufacturer="LG"
|
||||
deviceinfo_codename="lg-sf340n"
|
||||
deviceinfo_year="2017"
|
||||
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="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=30 msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 androidboot.hardware=sf340"
|
||||
deviceinfo_generate_bootimg="true"
|
||||
deviceinfo_bootimg_qcdt="false"
|
||||
deviceinfo_bootimg_dtb_second="false"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_header_version="0"
|
||||
deviceinfo_flash_offset_base="0x80000000"
|
||||
deviceinfo_flash_offset_kernel="0x00008000"
|
||||
deviceinfo_flash_offset_ramdisk="0x02000000"
|
||||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
54
device/testing/linux-lg-sf340n/01_fix_gcc6_errors.patch
Normal file
54
device/testing/linux-lg-sf340n/01_fix_gcc6_errors.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
From 44f841be2a223d672eaf9fa3029fd9249aeca583 Mon Sep 17 00:00:00 2001
|
||||
From: MOVZX <movzx@yahoo.com>
|
||||
Date: Tue, 25 Apr 2017 17:04:40 +0300
|
||||
Subject: [PATCH] prima: Fix GCC6 Warnings
|
||||
|
||||
Signed-off-by: MOVZX <movzx@yahoo.com>
|
||||
---
|
||||
drivers/staging/prima/CORE/MAC/src/include/utilsApi.h | 2 +-
|
||||
drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c | 2 +-
|
||||
drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c | 5 ++---
|
||||
4 files changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/prima/CORE/MAC/src/include/utilsApi.h b/drivers/staging/prima/CORE/MAC/src/include/utilsApi.h
|
||||
index 3a175473378..798a05cd2b4 100644
|
||||
--- a/drivers/staging/prima/CORE/MAC/src/include/utilsApi.h
|
||||
+++ b/drivers/staging/prima/CORE/MAC/src/include/utilsApi.h
|
||||
@@ -705,7 +705,7 @@ halRoundS32(tANI_S32 p)
|
||||
else
|
||||
k = p;
|
||||
|
||||
- return(k);
|
||||
+ return(k);
|
||||
}
|
||||
|
||||
// New functions for endianess conversion
|
||||
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
|
||||
index 23ab858c355..b4f26def1d1 100644
|
||||
--- a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
|
||||
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
|
||||
@@ -5698,7 +5698,7 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
|
||||
if (eHAL_STATUS_SUCCESS != status)
|
||||
smsLog(pMac, LOGE,
|
||||
FL( "failed to update the supported channel list"));
|
||||
- pMac->scan.defer_update_channel_list = false;
|
||||
+ pMac->scan.defer_update_channel_list = false;
|
||||
}
|
||||
|
||||
#ifdef WLAN_AP_STA_CONCURRENCY
|
||||
diff --git a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
index 14c6eadf524..e26b697f793 100644
|
||||
--- a/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
+++ b/drivers/staging/prima/CORE/VOSS/src/wlan_nv_template_builtin.c
|
||||
@@ -587,9 +587,8 @@ _NV_TEMPLATE_TABLE NvTablesBuiltIn[/*TABLES_MAX*/][TABLE_ENTRIES_MAX] = {
|
||||
((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
|
||||
(char *)&nvDefaults.tables.hwCalValues.calData),"psSlpTimeOvrHdxLNA5G"},
|
||||
{"ed",_ID_U8,SINGULAR,0,0,0,
|
||||
- (((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) +
|
||||
- sizeof(uint16)) - (char *)&nvDefaults.tables.hwCalValues.calData),
|
||||
- "nv_TxBBFSel9MHz"},
|
||||
+ ((char *)&(nvDefaults.tables.hwCalValues.calData.psSlpTimeOvrHdxLNA5G) -
|
||||
+ (char *)&nvDefaults.tables.hwCalValues.calData),"nv_TxBBFSel9MHz"},
|
||||
{"ee",_ID_U8,SINGULAR,0,0,0,
|
||||
((char *)&(nvDefaults.tables.hwCalValues.calData.hwParam2) -
|
||||
(char *)&nvDefaults.tables.hwCalValues.calData),"hwParam2"},
|
69
device/testing/linux-lg-sf340n/APKBUILD
Normal file
69
device/testing/linux-lg-sf340n/APKBUILD
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
|
||||
pkgname=linux-lg-sf340n
|
||||
pkgver=3.18.71
|
||||
pkgrel=0
|
||||
pkgdesc="LG Stylo 3 Plus kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="lg-sf340n"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
findutils
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
gcc6
|
||||
"
|
||||
|
||||
# Compiler: GCC 6 (doesn't boot when compiled with newer versions)
|
||||
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||
CC="gcc6-$CC"
|
||||
HOSTCC="gcc6-gcc"
|
||||
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||
fi
|
||||
|
||||
# Source
|
||||
_repository="android_kernel_lge_sd4xx-common"
|
||||
_commit="5738ee4d063b2037010b8932e02d9ae9c9377a4e"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/LG-SD4XX/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
replace-Sun-Solaris-style-flag-on-section.patch
|
||||
01_fix_gcc6_errors.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="
|
||||
083734f915183578318bd90a419253c24be95af4f6b88fae33c2553b1af98b203128f730ef4b8025e028e83a9bfb5f263bb46a5332c059166e0b03f2b90b92aa linux-lg-sf340n-5738ee4d063b2037010b8932e02d9ae9c9377a4e.tar.gz
|
||||
fe94f3eef5e9214e33c9c235f084e88ec79cc731554743f80eb6f504a2e603bea225f7e9a024cdcf2ba5c5a86b85a661d144f5613592e0975414cf7355388d2b config-lg-sf340n.aarch64
|
||||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
447cbff1af8989c270e5bad0b783f33329594199a35ee4c01ef4a6a8ed41d534041ef8952656f8c80d8720223393c6466d84c7277cd03973698235e58aa721c8 replace-Sun-Solaris-style-flag-on-section.patch
|
||||
f70bc2c087f741212152b5d224e8faba39635d4c79c63a656e70c0d88936cf87eea22c90bf64a35eda4f4186840ac8248ca82ed6acb9d30e18e76c80820dc8fa 01_fix_gcc6_errors.patch
|
||||
"
|
5149
device/testing/linux-lg-sf340n/config-lg-sf340n.aarch64
Normal file
5149
device/testing/linux-lg-sf340n/config-lg-sf340n.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,39 @@
|
|||
Based on https://lkml.org/lkml/2020/4/1/1206. In original patch, YYLOC declaration was removed.
|
||||
However, using original patch, which removes yylloc declaration on 3.18.14 kernel version results in 'yylloc not declared' error.
|
||||
See part of the original description below:
|
||||
|
||||
gcc 10 will default to -fno-common, which causes this error at link
|
||||
time:
|
||||
|
||||
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
|
||||
|
||||
This is because both dtc-lexer as well as dtc-parser define the same
|
||||
global symbol yyloc. Before with -fcommon those were merged into one
|
||||
defintion. The proper solution would be to to mark this as "extern",
|
||||
|
||||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||
index 3b41bfca636..9b9c29e6f31 100644
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -39,7 +39,7 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
#define YY_USER_ACTION \
|
||||
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
index 2d30f41778b..d0eb405cb81 100644
|
||||
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
@@ -637,7 +637,7 @@ char *yytext;
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
#define YY_USER_ACTION \
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
|
||||
index 302353d9..22f35fb5 100644
|
||||
--- a/arch/arm64/mm/proc.S
|
||||
+++ b/arch/arm64/mm/proc.S
|
||||
@@ -186,7 +186,7 @@ ENTRY(cpu_do_switch_mm)
|
||||
ret
|
||||
ENDPROC(cpu_do_switch_mm)
|
||||
|
||||
- .section ".text.init", #alloc, #execinstr
|
||||
+ .section ".text.init", "ax"
|
||||
|
||||
/*
|
||||
* __cpu_setup
|
Loading…
Reference in a new issue