android10.0(Q) Nvram 新增節點
第一步:nvram lib id定義
vendor\mediatek\proprietary\custom\k71v1_64_bsp\cgen\inc\Custom_NvRam_LID.h
typedef enum
{
....
AP_CFG_RDCL_FILE_AUDIO_WB_PARAM_LID,
AP_CFG_REEB_PRODUCT_INFO_LID,
AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID,//cczheng add for logo nvram
// AP_CFG_RDCL_FILE_META_LID,
// AP_CFG_CUSTOM_FILE_CUSTOM1_LID,
// AP_CFG_CUSTOM_FILE_CUSTOM2_LID,
AP_CFG_RDCL_FILE_HEADPHONE_COMPFLT_LID,
...
AP_CFG_CUSTOM_FILE_SMARTPA_CALIB_LID,
AP_CFG_CUSTOM_FILE_MAX_LID,
} CUSTOM_CFG_FILE_LID;
/* audio acf file version */
#define AP_CFG_RDCL_FILE_AUDIO_COMPFLT_LID_VERNO "001"
// cczheng add for logo nvram start
#define AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID_VERNO "000"
//end
第二步:nvram lib id的資料結構和版本號宣告
vendor\mediatek\proprietary\custom\k71v1_64_bsp\cgen\inc\Custom_NvRam_data_item.h
#ifndef CUSTOM_NVRAM_DATA_ITEM_H
#define CUSTOM_NVRAM_DATA_ITEM_H
#include "custom_cfg_module_file.h"
#include "Custom_NvRam_LID.h"
#include "../cfgfileinc/CFG_LOGO_File.h"
BEGIN_NVRAM_DATA
// cczheng add for logo nvram start
LID_BIT VER_LID(AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID)
LOGOINDEX_CUSTOM_PARAM_STRUCT *CFG_FILE_LOGO_INDEX_REC_TOTAL
{
};//end
....
第三步:nvram lib資料結構定義
vendor\mediatek\proprietary\custom\k71v1_64_bsp\cgen\cfgfileinc\CFG_LOGO_File.h
//cczheng add for logo nvram start
#ifndef _CFG_LOGO_FILE_H
#define _CFG_LOGO_FILE_H
typedef struct
{
unsigned char Array[1024];
}LOGOINDEX_CUSTOM_PARAM_STRUCT;
#define CFG_FILE_LOGO_INDEX_REC_SIZE sizeof(LOGOINDEX_CUSTOM_PARAM_STRUCT)
#define CFG_FILE_LOGO_INDEX_REC_TOTAL 1
//end
#endif
第四步:nvram lib 預設值定義
vendor\mediatek\proprietary\custom\k71v1_64_bsp\cgen\cfgdefault\CFG_LOGO_Default.h
//cczheng add for logo nvram start
#ifndef _CFG_LOGO_DEFAULT_FILE_H
#define _CFG_LOGO_DEFAULT_FILE_H
#include "../cfgfileinc/CFG_LOGO_File.h"
LOGOINDEX_CUSTOM_PARAM_STRUCT stLogoDefault =
{
0x01,0x00,0x00,0x00,0x0,0x0,0x0,0x0
};//end
#endif
第五步:nvram lib內容加入nvram陣列中
vendor\mediatek\proprietary\custom\k71v1_64_bsp\cgen\inc\CFG_file_info_custom.h
//cczheng
#include "../cfgfileinc/CFG_LOGO_File.h"
#include "../cfgdefault/CFG_LOGO_Default.h"
const TCFG_FILE g_akCFG_File_Custom[]=
{
....
{
"/mnt/vendor/nvdata/APCFG/APRDEB/PRODUCT_INFO", VER(AP_CFG_REEB_PRODUCT_INFO_LID), CFG_FILE_PRODUCT_INFO_SIZE,
CFG_FILE_PRODUCT_INFO_TOTAL, SIGNLE_DEFUALT_REC, (char *)&stPRODUCT_INFOConfigDefault,DataReset, NULL
},
//cczheng add for logo nvram start
{
"/mnt/vendor/nvdata/APCFG/APRDEB/LOGO_INDEX", VER(AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID), CFG_FILE_LOGO_INDEX_REC_SIZE,
// CFG_FILE_LOGO_INDEX_REC_TOTAL, DEFAULT_ZERO, 0, DataReset, NULL
CFG_FILE_LOGO_INDEX_REC_TOTAL, SIGNLE_DEFUALT_REC, (char *)&stLogoDefault, DataReset, NULL
},//end
....
第六步:nvram lib id需要備份到BinRegion
vendor\mediatek\proprietary\external\nvram\libcustom_nvram\CFG_file_info.c
FileName aBackupToBinRegion[] = {
...
#ifndef MTK_PRODUCT_INFO_SUPPORT
{"PRODUCT_INFO", AP_CFG_REEB_PRODUCT_INFO_LID},
#endif
{"LOGO_INDEX", AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID},//cczheng add for logo nvram
#ifdef MTK_SDIORETRY_SUPPORT
{"SDIO_RETRY", AP_CFG_RDEB_SDIO_RETRY_LID},
#endif
...
};
pfConvertFunc aNvRamConvertFuncTable[] = {
....
NULL,//AP_CFG_RDEB_OMADM_USB_LID
NULL,//AP_CFG_REEB_PRODUCT_INFO_LID
NULL,//AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID cczheng add
...
};
const TABLE_FOR_SPECIAL_LID g_new_nvram_lid[] = {
#ifdef MTK_MLC_NAND_SUPPORT
{ AP_CFG_REEB_PRODUCT_INFO_LID, 0, 2 * 1024 * 1024 },
#else
{ AP_CFG_REEB_PRODUCT_INFO_LID, 0, 1024 * 1024 },
#endif
{ AP_CFG_CUSTOM_FILE_LOGO_INDEX_LID, 0, 1024 * 1024 },//cczheng add
};
第七步:整編後燒寫驗證
adb shell
cd /mnt/vendor/nvdata/APCFG/APRDEB
可以看到 LOGO_INDEX
BT_Addr GPS LOGO_INDEX WIFI WIFI_CUSTOM
或者過濾日誌
2020-11-30 16:29:16.116 484-484/? D/NVRAM: NVM_Init Max Lid: 79
2020-11-30 16:29:16.116 484-484/? D/NVRAM: [NVRAM]: info nvram_gpt_flag =1
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/FILE_VER,0
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDEB/BT_Addr,1
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/AUXADC,2
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_Para,3
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_3A,4
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING,5
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_DEFECT,6
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SENSOR,7
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_LENS,8
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/UART,9
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/FACTORY,10
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/BWCS,11
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/HWMON_ACC,12
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/HWMON_GYRO,13
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDEB/OMADM_USB,14
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/Voice_Recognize_Param,15
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/Audio_AudEnh_Control_Opt,16
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/Audio_VOIP_Param,17
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/HWMON_PS,18
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/MD_Type,19
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/EXT_MD_Type,20
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/SDIO,21
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_VERSION,22
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_FEATURE,23
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_GEOMETRY,24
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/APCFG/APRDCL/MD_SBP,25
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING2,26
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING3,27
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING4,28
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING5,29
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING6,30
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING7,31
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING8,32
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING9,33
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING10,34
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING11,35
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_SHADING12,36
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE,37
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE2,38
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE3,39
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE4,40
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE5,41
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE6,42
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE7,43
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE8,44
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE9,45
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE10,46
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE11,47
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_PLINE12,48
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_AF,49
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgfile =/mnt/vendor/nvdata/media/CAMERA_FLASH_CALIBRATION,50
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Sph,51
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDEB/GPS,52
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_CompFlt,53
2020-11-30 16:29:16.116 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Effect,54
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDEB/WIFI,55
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDEB/WIFI_CUSTOM,56
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Sph_Med,57
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Vol_custom,58
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Sph_Dual_Mic,59
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Wb_Sph,60
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDEB/PRODUCT_INFO,61
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDEB/LOGO_INDEX,62
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Headphone_CompFlt,63
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_gain_table,64
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_ver1_Vol_custom,65
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Hd_Record_Param,66
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Hd_Record_Scene_Table,67
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Buffer_DC_Calibration_Param,68
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/VibSpk_CompFlt,69
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/MusicDRC_CompFlt,70
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/RingToneDRC_CompFlt,71
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_MAGI_CONFERENCE,72
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_HAC_Param,73
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_Sph_Lpbk,74
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/Audio_BT_Gain,75
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/media/AUDIO_FUNC_SWITCH_Param,76
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDCL/FG,77
2020-11-30 16:29:16.117 484-484/? D/NVRAM: deal with cfgcustfile =/mnt/vendor/nvdata/APCFG/APRDCL/smartpa_calib,78
相關文章
- 新增節點教程
- KubeSphere 新增節點
- jQuery新增節點___例_新增表格jQuery
- Oracle RAC新增節點Oracle
- Oracle RAC 新增節點Oracle
- rancher新增k8s節點時顯示節點已新增K8S
- HDFS動態新增節點
- DataNode工作機制 & 新增節點 &下線節點
- [網摘] Oracle RAC新增節點Oracle
- oracle 11g rac新增節點前之清除節點資訊Oracle
- k8s系列--node(k8s節點介紹,新增節點,移除節點)K8S
- redis cluster節點/新增刪除操作Redis
- mongodb副本集新增刪除節點MongoDB
- oracle11g RAC新增節點Oracle
- oracle 10g rac,刪除故障節點並新增新節點Oracle 10g
- oracle 10g rac 新增節點與刪除節點步驟Oracle 10g
- networkx基礎用法:新增節點、新增邊、刪除節點、刪除邊、計算度、賦權重
- DKHhadoop新增新節點功能介紹Hadoop
- rac 11.2R版本新增節點
- 給XML檔案新增新的節點XML
- 【Mongodb】 replica set 新增和刪除節點。MongoDB
- K3S新增節點報錯
- 遠端Jenkins新增Mac電腦節點JenkinsMac
- oracle11g_RAC新增刪除節點Oracle
- Oracle 11g RAC重新新增節點Oracle
- 【kingsql分享】RAC11G 新增節點SQL
- Oracle優化案例-新增RAC節點(二十九)Oracle優化
- Hyperledger Fabric節點的動態新增和刪除
- jquery如何新增一個新的元素節點jQuery
- 新增和刪除hadoop叢集中的節點Hadoop
- [轉載] Oracle9i RAC 手工新增節點Oracle
- Windows 11.2.0.4 RAC安裝配置以及RAC新增節點Windows
- RHEL5 Oracle 10g RAC新增新節點Oracle 10g
- 11G R2 RAC新增刪除節點
- 安裝crs,無法新增節點問題解決
- 新增節點oracle10g rac(rhel4)_clusterwareOracle
- 新增節點oracle10g rac(rhel4)_databaseOracleDatabase
- oracle11gr2_rac_新增節點最佳實踐Oracle