修改 ah fw 在fw img 之后读取附加的oem数据
This commit is contained in:
@@ -20,6 +20,10 @@ Information is free from patent or copyright infringement.
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define BOARD_OEM_INFO_SIZE_MAX (8192)
|
||||
|
||||
|
||||
/**
|
||||
* @brief load oem configuration information from oem partition,
|
||||
* then set module type.
|
||||
|
@@ -387,14 +387,6 @@ void board_oem_signal_mtx_binding(iot_board_info_v1_t *rc_info)
|
||||
|
||||
|
||||
|
||||
// 抓取额外的差分oem数据
|
||||
static uint32_t board_load_oem_cfg_ext(uint8_t *buff,uint32_t buff_size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -416,6 +408,7 @@ uint32_t board_load_oem_cfg()
|
||||
uint8_t diff_idx_array[BOARD_RESOURCE_NUM_MAX] = {0};
|
||||
uint32_t crc_cal;
|
||||
uint8_t gpio;
|
||||
int read_oem_ext_flag=0;
|
||||
|
||||
/* init cpu index value */
|
||||
#if (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE)
|
||||
@@ -438,7 +431,7 @@ uint32_t board_load_oem_cfg()
|
||||
/* [TODO]: optimize the logic to look up only on the first startup */
|
||||
iot_layout_get_part_size(PART_NUM_OEM, &oem_part_size);
|
||||
oem_diff_offset = sizeof(iot_oem_cfg_t) + IOT_OEM_SECTION_START_ADDR;
|
||||
buf_oem = os_mem_malloc(IOT_DRIVER_MID, oem_part_size - oem_diff_offset);
|
||||
buf_oem = os_mem_malloc(IOT_DRIVER_MID, BOARD_OEM_INFO_SIZE_MAX);
|
||||
if (buf_oem == NULL) {
|
||||
ret = ERR_FAIL;
|
||||
goto out;
|
||||
@@ -464,7 +457,13 @@ uint32_t board_load_oem_cfg()
|
||||
hdr_check:
|
||||
if (hw_ver_cal != hw_ver_rc) {
|
||||
if (ptr_hdr->have_next == 0) {
|
||||
goto out;
|
||||
if(read_oem_ext_flag ||
|
||||
iot_oem_read_mtd_ext(&buf_oem[offset],BOARD_OEM_INFO_SIZE_MAX-offset)){
|
||||
goto out;
|
||||
} else {
|
||||
ptr_hdr->have_next = 1;
|
||||
read_oem_ext_flag = 1;
|
||||
}
|
||||
}
|
||||
// 统计有多少个rc table
|
||||
cnt_rc++;
|
||||
|
Reference in New Issue
Block a user