linux-vernee-k506: adjust hardcoded firmware paths (MR 1456)
This commit is contained in:
parent
03abf416e6
commit
872fc74aee
2 changed files with 108 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=linux-vernee-k506
|
||||
pkgver=3.18.99
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Vernee Thor kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
|
@ -28,6 +28,7 @@ source="
|
|||
$pkgname-$_commit.tar.gz::https://github.com/MediatekAndroidDevelopers/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
python3dct.patch
|
||||
firmware_paths.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
@ -49,4 +50,5 @@ package() {
|
|||
|
||||
sha512sums="5d51b5ceb3968c37e0653f40dcbc334388f401a086d6232600a05c47ec40deb712fc23cbfca6a59e2e3e5a108c46429e4fe1550608f1fbd687f14c8d17376b6d linux-vernee-k506-6162531eeb91a5291c00eceff7cb707561143471.tar.gz
|
||||
38df769d1752cd137bf2a5a41f627d52d5017e915edef5e0ba35b7f2b67b44310ca125ac104958fe9f2572d16de37d12aa5bc78beebc25cb7680f2a9c15a8dd5 config-vernee-k506.aarch64
|
||||
a2990a27436d3ffe40f1fd1e388486727042cc5fa5be23b19dad623a18731c94c07ac4a89be1e59e6214593d2b03d38702b60a7475807e8cda0811c4e5d50a9b python3dct.patch"
|
||||
a2990a27436d3ffe40f1fd1e388486727042cc5fa5be23b19dad623a18731c94c07ac4a89be1e59e6214593d2b03d38702b60a7475807e8cda0811c4e5d50a9b python3dct.patch
|
||||
8aada5397de0d8f91475afb132e49e9dc500c6f153e98382b31c2d3cb38a9b6b177f47b3610df24260ab81b9e9588cf3e76b58c4213e2db2974345b53bf5e079 firmware_paths.patch"
|
||||
|
|
104
device/testing/linux-vernee-k506/firmware_paths.patch
Normal file
104
device/testing/linux-vernee-k506/firmware_paths.patch
Normal file
|
@ -0,0 +1,104 @@
|
|||
replace hardcoded paths to /etc/firmware /vendor/firmware and point them to /lib/firmware/postmarketos
|
||||
|
||||
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 a9f57b8002b..12815028a9f 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
|
||||
@@ -159,35 +159,35 @@ 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_kal.c b/drivers/misc/mediatek/connectivity/wlan/gen3/os/linux/gl_kal.c
|
||||
index fa6f22ba5a6..464b2819c87 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
|
||||
@@ -106,7 +106,7 @@ static PUINT_8 apucFwPath[] = {
|
||||
(PUINT_8) "/storage/sdcard0/",
|
||||
(PUINT_8) "/vendor/firmware/",
|
||||
#if !CONFIG_ANDROID
|
||||
- (PUINT_8) "/lib/firmware/",
|
||||
+ (PUINT_8) "/lib/firmware/postmarketos/",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
diff --git a/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c b/drivers/misc/mediatek/dual_ccci/ccci_chrdev.c
|
||||
index b0a8c88d45e..9073dabb373 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/include/mt-plat/mt_ccci_common.h b/drivers/misc/mediatek/include/mt-plat/mt_ccci_common.h
|
||||
index ee5e9714621..c62f010baaa 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 23d25e94619..4830339bb93 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
|
Loading…
Reference in a new issue