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
相關文章
- 新增節點教程
- 新增Jenkins節點Jenkins
- KubeSphere 新增節點
- Oracle RAC新增節點Oracle
- rancher新增k8s節點時顯示節點已新增K8S
- DataNode工作機制 & 新增節點 &下線節點
- rac新增節點前之清除節點資訊
- HDFS動態新增節點
- XML DOM 新增節點概述XML
- HAC叢集新增新節點
- k8s系列--node(k8s節點介紹,新增節點,移除節點)K8S
- DKHhadoop新增新節點功能介紹Hadoop
- oracle11g RAC新增節點Oracle
- mongodb副本集新增刪除節點MongoDB
- redis cluster節點/新增刪除操作Redis
- oracle 11g rac新增節點前之清除節點資訊Oracle
- networkx基礎用法:新增節點、新增邊、刪除節點、刪除邊、計算度、賦權重
- K3S新增節點報錯
- rac新增節點步驟(11g)
- 遠端Jenkins新增Mac電腦節點JenkinsMac
- rac新增節點容易遇到的問題
- 11gR2 RAC新增節點步驟
- oracle11g_RAC新增刪除節點Oracle
- Oracle 11g RAC重新新增節點Oracle
- 一體機HDATA節點新增和刪除
- Oracle優化案例-新增RAC節點(二十九)Oracle優化
- Windows 11.2.0.4 RAC安裝配置以及RAC新增節點Windows
- Hyperledger Fabric節點的動態新增和刪除
- DKHhadoop叢集新增節點管理功能的操作步驟Hadoop
- rac新增節點容易遇到的問題(11g)
- 11g rac新增節點步驟(11g)
- 11g rac新增節點容易遇到的問題
- k8s叢集刪除和新增node節點K8S
- k8s~為pod新增節點的資源限制K8S
- 使用joinjs繪製流程圖(七)-實戰-繪製流程圖+節點設定樣式+節點新增事件JS流程圖事件
- 動態建立節點並且給建立的元素新增屬性
- Oracle叢集軟體管理-新增和刪除叢集節點Oracle
- 怎樣新增、刪除、移動、複製、建立、查詢節點