lenovo-k5fpr: new device (MR 2503)
[ci:skip-build] already built successfully in CI
This commit is contained in:
parent
7c690db318
commit
3581d1d3d8
7 changed files with 8829 additions and 0 deletions
29
device/testing/device-lenovo-k5fpr/APKBUILD
Normal file
29
device/testing/device-lenovo-k5fpr/APKBUILD
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Reference: <https://postmarketos.org/devicepkg>
|
||||||
|
pkgname=device-lenovo-k5fpr
|
||||||
|
pkgdesc="Lenovo K4 Note"
|
||||||
|
pkgver=0.1
|
||||||
|
pkgrel=0
|
||||||
|
url="https://postmarketos.org"
|
||||||
|
license="MIT"
|
||||||
|
arch="aarch64"
|
||||||
|
options="!check !archcheck"
|
||||||
|
depends="
|
||||||
|
linux-lenovo-k5fpr
|
||||||
|
mesa-dri-gallium
|
||||||
|
mkbootimg
|
||||||
|
postmarketos-base
|
||||||
|
"
|
||||||
|
makedepends="devicepkg-dev"
|
||||||
|
source="deviceinfo"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
devicepkg_build $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
devicepkg_package $startdir $pkgname
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
5389383904e5204e5dd5a4c5450f397de85ad9e57d958720ec7d6f8e0c8329b485ac6c28c928027a57d214ac9155d26a47dbb95440e0ea6335479cdb7d185baf deviceinfo
|
||||||
|
"
|
34
device/testing/device-lenovo-k5fpr/deviceinfo
Normal file
34
device/testing/device-lenovo-k5fpr/deviceinfo
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Reference: <https://postmarketos.org/deviceinfo>
|
||||||
|
# Please use double quotes only. You can source this file in shell
|
||||||
|
# scripts.
|
||||||
|
|
||||||
|
deviceinfo_format_version="0"
|
||||||
|
deviceinfo_name="Lenovo K4 Note"
|
||||||
|
deviceinfo_manufacturer="Lenovo"
|
||||||
|
deviceinfo_codename="lenovo-k5fpr"
|
||||||
|
deviceinfo_year="2016"
|
||||||
|
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_sparse="true"
|
||||||
|
deviceinfo_flash_method="fastboot"
|
||||||
|
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,64N2"
|
||||||
|
deviceinfo_generate_bootimg="true"
|
||||||
|
deviceinfo_bootimg_qcdt="false"
|
||||||
|
#deviceinfo_bootimg_mtk_mkimage="true"
|
||||||
|
deviceinfo_bootimg_dtb_second="false"
|
||||||
|
deviceinfo_flash_pagesize="2048"
|
||||||
|
deviceinfo_flash_offset_base="0x40078000"
|
||||||
|
deviceinfo_flash_offset_kernel="0x00008000"
|
||||||
|
deviceinfo_flash_offset_ramdisk="0x03f88000"
|
||||||
|
deviceinfo_flash_offset_second="0x040f0000"
|
||||||
|
deviceinfo_flash_offset_tags="0x0df88000"
|
|
@ -0,0 +1,301 @@
|
||||||
|
From c108465c38388505fa122b4b9fddbe2724d04c6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: arzamas-16 <arzamas-16@mail.ee>
|
||||||
|
Date: Thu, 9 Sep 2021 23:59:45 +0300
|
||||||
|
Subject: [PATCH] firmware paths for postmarketos
|
||||||
|
|
||||||
|
Replace hardcoded paths for firmware so it could be loaded on postmarketOS.
|
||||||
|
---
|
||||||
|
drivers/misc/mediatek/c2k_ccci/modem_sdio.h | 2 +-
|
||||||
|
.../common/combo/core/include/wmt_conf.h | 2 +-
|
||||||
|
.../common/combo/linux/stp_chrdev_ant.c | 4 +-
|
||||||
|
.../common/conn_soc/core/include/wmt_conf.h | 2 +-
|
||||||
|
.../connectivity/wlan/gen2/os/linux/gl_init.c | 4 +-
|
||||||
|
.../connectivity/wlan/gen2/os/linux/gl_kal.c | 16 ++++----
|
||||||
|
.../connectivity/wlan/gen3/os/linux/gl_init.c | 2 +-
|
||||||
|
.../connectivity/wlan/gen3/os/linux/gl_kal.c | 2 +-
|
||||||
|
drivers/misc/mediatek/dual_ccci/ccci_chrdev.c | 2 +-
|
||||||
|
.../fmradio/mt6627/pub/mt6627_fm_lib.c | 28 ++++++-------
|
||||||
|
.../fmradio/mt6630/pub/mt6630_fm_lib.c | 40 +++++++++----------
|
||||||
|
.../mediatek/include/mt-plat/mt_ccci_common.h | 2 +-
|
||||||
|
.../misc/mediatek/wmt_ccci/wmt_cfg_parser.h | 2 +-
|
||||||
|
13 files changed, 54 insertions(+), 54 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/misc/mediatek/c2k_ccci/modem_sdio.h b/drivers/misc/mediatek/c2k_ccci/modem_sdio.h
|
||||||
|
index 3b206dcd..ca102ee7 100644
|
||||||
|
--- a/drivers/misc/mediatek/c2k_ccci/modem_sdio.h
|
||||||
|
+++ b/drivers/misc/mediatek/c2k_ccci/modem_sdio.h
|
||||||
|
@@ -379,7 +379,7 @@ enum {
|
||||||
|
/*Image type and header defination part*/
|
||||||
|
/*=================================================================================*/
|
||||||
|
|
||||||
|
-#define C2K_IMG_PATH "/vendor/firmware/modem_3_3g_n.img"
|
||||||
|
+#define C2K_IMG_PATH "/lib/firmware/postmarketos/modem_3_3g_n.img"
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MD_BOOTING = 0,
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/common/combo/core/include/wmt_conf.h b/drivers/misc/mediatek/connectivity/common/combo/core/include/wmt_conf.h
|
||||||
|
index d5b54222..d6bca3fe 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/common/combo/core/include/wmt_conf.h
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/common/combo/core/include/wmt_conf.h
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
********************************************************************************
|
||||||
|
*/
|
||||||
|
#define CUST_CFG_WMT "WMT.cfg"
|
||||||
|
-#define CUST_CFG_WMT_PREFIX "/vendor/firmware/"
|
||||||
|
+#define CUST_CFG_WMT_PREFIX "/lib/firmware/postmarketos/"
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* E X T E R N A L R E F E R E N C E S
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/common/combo/linux/stp_chrdev_ant.c b/drivers/misc/mediatek/connectivity/common/combo/linux/stp_chrdev_ant.c
|
||||||
|
index f0b6ef72..b5adf3c6 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/common/combo/linux/stp_chrdev_ant.c
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/common/combo/linux/stp_chrdev_ant.c
|
||||||
|
@@ -21,8 +21,8 @@ MODULE_LICENSE("Dual BSD/GPL");
|
||||||
|
#define ANT_DRIVER_NAME "mtk_stp_ANT_chrdev"
|
||||||
|
#define ANT_DEV_MAJOR 197 /* never used number */
|
||||||
|
static PINT8 ANT_BUILT_IN_PATCH_FILE_NAME;
|
||||||
|
-static PINT8 ANT_BUILT_IN_PATCH_FILE_NAME_E1 = "/vendor/firmware/ANT_RAM_CODE_E1.BIN";
|
||||||
|
-static PINT8 ANT_BUILT_IN_PATCH_FILE_NAME_E2 = "/vendor/firmware/ANT_RAM_CODE_E2.BIN";
|
||||||
|
+static PINT8 ANT_BUILT_IN_PATCH_FILE_NAME_E1 = "/lib/firmware/postmarketos/ANT_RAM_CODE_E1.BIN";
|
||||||
|
+static PINT8 ANT_BUILT_IN_PATCH_FILE_NAME_E2 = "/lib/firmware/postmarketos/ANT_RAM_CODE_E2.BIN";
|
||||||
|
|
||||||
|
#define PFX "[MTK-ANT] "
|
||||||
|
#define ANT_LOG_DBG 3
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/common/conn_soc/core/include/wmt_conf.h b/drivers/misc/mediatek/connectivity/common/conn_soc/core/include/wmt_conf.h
|
||||||
|
index 832d01bf..cf4ddd7a 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/common/conn_soc/core/include/wmt_conf.h
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/common/conn_soc/core/include/wmt_conf.h
|
||||||
|
@@ -31,7 +31,7 @@
|
||||||
|
********************************************************************************
|
||||||
|
*/
|
||||||
|
#define CUST_CFG_WMT "WMT_SOC.cfg"
|
||||||
|
-#define CUST_CFG_WMT_PREFIX "/vendor/firmware/"
|
||||||
|
+#define CUST_CFG_WMT_PREFIX "/lib/firmware/postmarketos/"
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* E X T E R N A L R E F E R E N C E S
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c
|
||||||
|
index 6dae1527..dc2b2ba2 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_init.c
|
||||||
|
@@ -2868,9 +2868,9 @@ static INT_32 wlanProbe(PVOID pvData)
|
||||||
|
} else if (kalReadToFile("/data/misc/wifi/wifi.cfg",
|
||||||
|
pucConfigBuf, WLAN_CFG_FILE_BUF_SIZE, &u4ConfigReadLen) == 0) {
|
||||||
|
DBGLOG(INIT, LOUD, "CFG_FILE: Read /data/misc/wifi/wifi.cfg\n");
|
||||||
|
- } else if (kalReadToFile("/vendor/firmware/wifi.cfg",
|
||||||
|
+ } else if (kalReadToFile("/lib/firmware/postmarketos/wifi.cfg",
|
||||||
|
pucConfigBuf, WLAN_CFG_FILE_BUF_SIZE, &u4ConfigReadLen) == 0) {
|
||||||
|
- DBGLOG(INIT, LOUD, "CFG_FILE: Read /vendor/firmware/wifi.cfg\n");
|
||||||
|
+ DBGLOG(INIT, LOUD, "CFG_FILE: Read /lib/firmware/postmarketos/wifi.cfg\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pucConfigBuf[0] != '\0' && u4ConfigReadLen > 0)
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
|
||||||
|
index 09da1ef5..16abbb78 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/gl_kal.c
|
||||||
|
@@ -822,33 +822,33 @@ WLAN_STATUS kalFirmwareOpen(IN P_GLUE_INFO_T prGlueInfo)
|
||||||
|
case WMTHWVER_MT6620_E3:
|
||||||
|
case WMTHWVER_MT6620_E4:
|
||||||
|
case WMTHWVER_MT6620_E5:
|
||||||
|
- filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME, O_RDONLY, 0);
|
||||||
|
+ filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME, O_RDONLY, 0);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WMTHWVER_MT6620_E6:
|
||||||
|
default:
|
||||||
|
- filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME "_E6", O_RDONLY, 0);
|
||||||
|
+ filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_E6", O_RDONLY, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#elif defined(MT6628)
|
||||||
|
-/* filp = filp_open("/vendor/firmware/"CFG_FW_FILENAME"_MT6628", O_RDONLY, 0); */
|
||||||
|
-/* filp = filp_open("/vendor/firmware/"CFG_FW_FILENAME"_MT6582", O_RDONLY, 0); */
|
||||||
|
+/* filp = filp_open("/lib/firmware/postmarketos/"CFG_FW_FILENAME"_MT6628", O_RDONLY, 0); */
|
||||||
|
+/* filp = filp_open("/lib/firmware/postmarketos/"CFG_FW_FILENAME"_MT6582", O_RDONLY, 0); */
|
||||||
|
#if 0 /* new wifi ram code mechanism, waiting firmware ready, then we can enable these code */
|
||||||
|
kalMemZero(aucFilePath, sizeof(aucFilePath));
|
||||||
|
- kalMemCopy(aucFilePath, "/vendor/firmware/" CFG_FW_FILENAME "_AD", sizeof("/vendor/firmware/" CFG_FW_FILENAME "_AD"));
|
||||||
|
+ kalMemCopy(aucFilePath, "/lib/firmware/postmarketos/" CFG_FW_FILENAME "_AD", sizeof("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_AD"));
|
||||||
|
filp = filp_open(aucFilePath, O_RDONLY, 0);
|
||||||
|
if (!IS_ERR(filp))
|
||||||
|
goto open_success;
|
||||||
|
#endif
|
||||||
|
kalMemZero(aucFilePath, sizeof(aucFilePath));
|
||||||
|
- kalMemCopy(aucFilePath, "/vendor/firmware/" CFG_FW_FILENAME "_", strlen("/vendor/firmware/" CFG_FW_FILENAME "_"));
|
||||||
|
- glGetChipInfo(prGlueInfo, &aucFilePath[strlen("/vendor/firmware/" CFG_FW_FILENAME "_")]);
|
||||||
|
+ kalMemCopy(aucFilePath, "/lib/firmware/postmarketos/" CFG_FW_FILENAME "_", strlen("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_"));
|
||||||
|
+ glGetChipInfo(prGlueInfo, &aucFilePath[strlen("/lib/firmware/postmarketos/" CFG_FW_FILENAME "_")]);
|
||||||
|
|
||||||
|
DBGLOG(INIT, INFO, "open file: %s\n", aucFilePath);
|
||||||
|
|
||||||
|
filp = filp_open(aucFilePath, O_RDONLY, 0);
|
||||||
|
#else
|
||||||
|
- filp = filp_open("/vendor/firmware/" CFG_FW_FILENAME, O_RDONLY, 0);
|
||||||
|
+ filp = filp_open("/lib/firmware/postmarketos/" CFG_FW_FILENAME, O_RDONLY, 0);
|
||||||
|
#endif
|
||||||
|
if (IS_ERR(filp)) {
|
||||||
|
DBGLOG(INIT, ERROR, "Open FW image: %s failed\n", CFG_FW_FILENAME);
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_init.c b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_init.c
|
||||||
|
index 8e6a4dd2..714c82f8 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_init.c
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_init.c
|
||||||
|
@@ -2641,7 +2641,7 @@ static INT_32 wlanProbe(PVOID pvData)
|
||||||
|
} else if (kalReadToFile("/data/misc/wifi/wifi.cfg", pucConfigBuf,
|
||||||
|
WLAN_CFG_FILE_BUF_SIZE, &u4ConfigReadLen) == 0) {
|
||||||
|
/* ToDo:: Nothing */
|
||||||
|
- } else if (kalReadToFile("/vendor/firmware/wifi.cfg", pucConfigBuf,
|
||||||
|
+ } else if (kalReadToFile("/lib/firmware/postmarketos/wifi.cfg", pucConfigBuf,
|
||||||
|
WLAN_CFG_FILE_BUF_SIZE, &u4ConfigReadLen) == 0) {
|
||||||
|
/* ToDo:: Nothing */
|
||||||
|
}
|
||||||
|
diff --git a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
|
||||||
|
index 57bf521b..80b13400 100644
|
||||||
|
--- a/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
|
||||||
|
+++ b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
|
||||||
|
@@ -889,7 +889,7 @@ static gid_t orgfsgid;
|
||||||
|
static mm_segment_t orgfs;
|
||||||
|
|
||||||
|
static PUINT_8 apucFwPath[] = {
|
||||||
|
- (PUINT_8) "/vendor/firmware/",
|
||||||
|
+ (PUINT_8) "/lib/firmware/postmarketos/",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
diff --git a/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c b/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
|
||||||
|
index 87504f94..11720e16 100644
|
||||||
|
--- a/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
|
||||||
|
+++ b/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
|
||||||
|
@@ -35,7 +35,7 @@ static unsigned int md_sbp_code_default;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_MODEM_FIRMWARE_PATH
|
||||||
|
-#define CONFIG_MODEM_FIRMWARE_PATH "/vendor/firmware/"
|
||||||
|
+#define CONFIG_MODEM_FIRMWARE_PATH "/lib/firmware/postmarketos/"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static char *type_str[] = {[modem_invalid] = "invalid",
|
||||||
|
diff --git a/drivers/misc/mediatek/fmradio/mt6627/pub/mt6627_fm_lib.c b/drivers/misc/mediatek/fmradio/mt6627/pub/mt6627_fm_lib.c
|
||||||
|
index b8425402..672085fb 100644
|
||||||
|
--- a/drivers/misc/mediatek/fmradio/mt6627/pub/mt6627_fm_lib.c
|
||||||
|
+++ b/drivers/misc/mediatek/fmradio/mt6627/pub/mt6627_fm_lib.c
|
||||||
|
@@ -24,22 +24,22 @@
|
||||||
|
#include "mt6627_fm_cust_cfg.h"
|
||||||
|
/* #include "mach/mt_gpio.h" */
|
||||||
|
|
||||||
|
-/* #define MT6627_FM_PATCH_PATH "/vendor/firmware/mt6627/mt6627_fm_patch.bin" */
|
||||||
|
-/* #define MT6627_FM_COEFF_PATH "/vendor/firmware/mt6627/mt6627_fm_coeff.bin" */
|
||||||
|
-/* #define MT6627_FM_HWCOEFF_PATH "/vendor/firmware/mt6627/mt6627_fm_hwcoeff.bin" */
|
||||||
|
-/* #define MT6627_FM_ROM_PATH "/vendor/firmware/mt6627/mt6627_fm_rom.bin" */
|
||||||
|
+/* #define MT6627_FM_PATCH_PATH "/lib/firmware/postmarketos/mt6627/mt6627_fm_patch.bin" */
|
||||||
|
+/* #define MT6627_FM_COEFF_PATH "/lib/firmware/postmarketos/mt6627/mt6627_fm_coeff.bin" */
|
||||||
|
+/* #define MT6627_FM_HWCOEFF_PATH "/lib/firmware/postmarketos/mt6627/mt6627_fm_hwcoeff.bin" */
|
||||||
|
+/* #define MT6627_FM_ROM_PATH "/lib/firmware/postmarketos/mt6627/mt6627_fm_rom.bin" */
|
||||||
|
|
||||||
|
static struct fm_patch_tbl mt6627_patch_tbl[5] = {
|
||||||
|
- {FM_ROM_V1, "/vendor/firmware/mt6627/mt6627_fm_v1_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6627/mt6627_fm_v1_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V2, "/vendor/firmware/mt6627/mt6627_fm_v2_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6627/mt6627_fm_v2_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V3, "/vendor/firmware/mt6627/mt6627_fm_v3_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6627/mt6627_fm_v3_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V4, "/vendor/firmware/mt6627/mt6627_fm_v4_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6627/mt6627_fm_v4_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V5, "/vendor/firmware/mt6627/mt6627_fm_v5_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6627/mt6627_fm_v5_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V1, "/lib/firmware/postmarketos/mt6627/mt6627_fm_v1_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6627/mt6627_fm_v1_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V2, "/lib/firmware/postmarketos/mt6627/mt6627_fm_v2_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6627/mt6627_fm_v2_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V3, "/lib/firmware/postmarketos/mt6627/mt6627_fm_v3_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6627/mt6627_fm_v3_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V4, "/lib/firmware/postmarketos/mt6627/mt6627_fm_v4_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6627/mt6627_fm_v4_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V5, "/lib/firmware/postmarketos/mt6627/mt6627_fm_v5_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6627/mt6627_fm_v5_coeff.bin", NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct fm_hw_info mt6627_hw_info = {
|
||||||
|
diff --git a/drivers/misc/mediatek/fmradio/mt6630/pub/mt6630_fm_lib.c b/drivers/misc/mediatek/fmradio/mt6630/pub/mt6630_fm_lib.c
|
||||||
|
index c0aedf2c..1b0472c8 100644
|
||||||
|
--- a/drivers/misc/mediatek/fmradio/mt6630/pub/mt6630_fm_lib.c
|
||||||
|
+++ b/drivers/misc/mediatek/fmradio/mt6630/pub/mt6630_fm_lib.c
|
||||||
|
@@ -23,29 +23,29 @@
|
||||||
|
#include "mt6630_fm_cust_cfg.h"
|
||||||
|
|
||||||
|
static struct fm_patch_tbl mt6630_patch_tbl[5] = {
|
||||||
|
- {FM_ROM_V1, "/vendor/firmware/mt6630_fm_v1_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v1_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V2, "/vendor/firmware/mt6630_fm_v2_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v2_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V3, "/vendor/firmware/mt6630_fm_v3_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v3_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V4, "/vendor/firmware/mt6630_fm_v4_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v4_coeff.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V5, "/vendor/firmware/mt6630_fm_v5_patch.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v5_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V1, "/lib/firmware/postmarketos/mt6630_fm_v1_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v1_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V2, "/lib/firmware/postmarketos/mt6630_fm_v2_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v2_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V3, "/lib/firmware/postmarketos/mt6630_fm_v3_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v3_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V4, "/lib/firmware/postmarketos/mt6630_fm_v4_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v4_coeff.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V5, "/lib/firmware/postmarketos/mt6630_fm_v5_patch.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v5_coeff.bin", NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct fm_patch_tbl mt6630_patch_tbl_tx[5] = {
|
||||||
|
- {FM_ROM_V1, "/vendor/firmware/mt6630_fm_v1_patch_tx.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v1_coeff_tx.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V2, "/vendor/firmware/mt6630_fm_v2_patch_tx.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v2_coeff_tx.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V3, "/vendor/firmware/mt6630_fm_v3_patch_tx.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v3_coeff_tx.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V4, "/vendor/firmware/mt6630_fm_v4_patch_tx.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v4_coeff_tx.bin", NULL, NULL},
|
||||||
|
- {FM_ROM_V5, "/vendor/firmware/mt6630_fm_v5_patch_tx.bin",
|
||||||
|
- "/vendor/firmware/mt6630_fm_v5_coeff_tx.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V1, "/lib/firmware/postmarketos/mt6630_fm_v1_patch_tx.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v1_coeff_tx.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V2, "/lib/firmware/postmarketos/mt6630_fm_v2_patch_tx.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v2_coeff_tx.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V3, "/lib/firmware/postmarketos/mt6630_fm_v3_patch_tx.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v3_coeff_tx.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V4, "/lib/firmware/postmarketos/mt6630_fm_v4_patch_tx.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v4_coeff_tx.bin", NULL, NULL},
|
||||||
|
+ {FM_ROM_V5, "/lib/firmware/postmarketos/mt6630_fm_v5_patch_tx.bin",
|
||||||
|
+ "/lib/firmware/postmarketos/mt6630_fm_v5_coeff_tx.bin", NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct fm_hw_info mt6630_hw_info = {
|
||||||
|
diff --git a/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h b/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
|
||||||
|
index ee5e9714..c62f010b 100644
|
||||||
|
--- a/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
|
||||||
|
+++ b/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
|
||||||
|
@@ -61,7 +61,7 @@ typedef enum {
|
||||||
|
/* image name/path */
|
||||||
|
#define MOEDM_IMAGE_NAME "modem.img"
|
||||||
|
#define DSP_IMAGE_NAME "DSP_ROM"
|
||||||
|
-#define CONFIG_MODEM_FIRMWARE_PATH "/vendor/firmware/"
|
||||||
|
+#define CONFIG_MODEM_FIRMWARE_PATH "/lib/firmware/postmarketos/"
|
||||||
|
#define CONFIG_MODEM_FIRMWARE_CIP_PATH "/custom/etc/firmware/"
|
||||||
|
#define IMG_ERR_STR_LEN 64
|
||||||
|
|
||||||
|
diff --git a/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h b/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
|
||||||
|
index 23d25e94..6f99948c 100644
|
||||||
|
--- a/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
|
||||||
|
+++ b/drivers/misc/mediatek/wmt_ccci/wmt_cfg_parser.h
|
||||||
|
@@ -78,7 +78,7 @@ do { \
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define WMT_CFG_FILE "WMT_SOC.cfg"
|
||||||
|
-#define WMT_CFG_FILE_PREFIX "/vendor/firmware/"
|
||||||
|
+#define WMT_CFG_FILE_PREFIX "/lib/firmware/postmarketos/"
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* D A T A T Y P E S
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
69
device/testing/linux-lenovo-k5fpr/APKBUILD
Normal file
69
device/testing/linux-lenovo-k5fpr/APKBUILD
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
# Reference: <https://postmarketos.org/vendorkernel>
|
||||||
|
# Kernel config based on: arch/arm64/configs/k5fpr_defconfig
|
||||||
|
|
||||||
|
pkgname=linux-lenovo-k5fpr
|
||||||
|
pkgver=3.18.140
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Lenovo K4 Note kernel fork"
|
||||||
|
arch="aarch64"
|
||||||
|
_carch="arm64"
|
||||||
|
_flavor="lenovo-k5fpr"
|
||||||
|
url="https://kernel.org"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
|
makedepends="
|
||||||
|
bash
|
||||||
|
bc
|
||||||
|
bison
|
||||||
|
devicepkg-dev
|
||||||
|
flex
|
||||||
|
gcc6
|
||||||
|
openssl-dev
|
||||||
|
perl
|
||||||
|
python3
|
||||||
|
"
|
||||||
|
|
||||||
|
# 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_lenovo_k5fpr"
|
||||||
|
_commit="41a555ec0bc654d3303f02d50627732f3ea8e65a"
|
||||||
|
_config="config-$_flavor.$arch"
|
||||||
|
source="
|
||||||
|
$pkgname-$_commit.tar.gz::https://github.com/EncryptedCicada/$_repository/archive/$_commit.tar.gz
|
||||||
|
$_config
|
||||||
|
gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
0001-firmware-paths-for-postmarketos.patch
|
||||||
|
python3dct.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="
|
||||||
|
1cb5e39becc8e31288620d37753e6a3df2465032161524afa0103a8b34d60d10db45fc0939fbc0f0507c3e689db0f763bbb7cf2f0a1fc1fbe2e230e9de9c39c2 linux-lenovo-k5fpr-41a555ec0bc654d3303f02d50627732f3ea8e65a.tar.gz
|
||||||
|
d9dd218d7439f58e7846715189a4715cac2f6c0547324220baaa67400d0f4458a6a35b8a4213891b129c502dd018385bd9e786bc45d47bba4a377b421288d01b config-lenovo-k5fpr.aarch64
|
||||||
|
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||||
|
749a2971d7b9d8a5bd4dc16a8d12bf8faf7012a5c10d5f939da8e7149b10ea1ac7e001cd5bb3ebff4c2781640dbd891c19e0f09901f722f41f63a956f83f75cb 0001-firmware-paths-for-postmarketos.patch
|
||||||
|
a2990a27436d3ffe40f1fd1e388486727042cc5fa5be23b19dad623a18731c94c07ac4a89be1e59e6214593d2b03d38702b60a7475807e8cda0811c4e5d50a9b python3dct.patch
|
||||||
|
"
|
3645
device/testing/linux-lenovo-k5fpr/config-lenovo-k5fpr.aarch64
Normal file
3645
device/testing/linux-lenovo-k5fpr/config-lenovo-k5fpr.aarch64
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1 @@
|
||||||
|
../../.shared-patches/linux/gcc10-extern_YYLOC_global_declaration.patch
|
4750
device/testing/linux-lenovo-k5fpr/python3dct.patch
Normal file
4750
device/testing/linux-lenovo-k5fpr/python3dct.patch
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue