改为 在压缩前添加 oem_ext 但固件启动不起来

This commit is contained in:
2024-10-28 19:37:39 +08:00
parent 538d4b4ac4
commit 8b0435853d
8 changed files with 128 additions and 100 deletions

View File

@@ -17,6 +17,7 @@ Information is free from patent or copyright infringement.
#include "iot_flash_api.h"
#include "iot_flash_layout.h"
#include "iot_img_hdr.h"
#ifdef __cplusplus
extern "C" {
@@ -244,6 +245,14 @@ int32_t iot_log_save_done(uint8_t lock);
*/
uint32_t mtd_copy_part(uint8_t src_part, uint8_t dest_part);
/**
* @brief mtd_get_hdr(): get firmware header information of specified partition.
* @param part_num: the specified partition.
* @param hdr: pointer to save header information.
* @return ERR_FAIL: failed; ERR_OK: succeed.
*/
uint32_t mtd_get_hdr(uint8_t part_num, imgHdr *hdr);
/**
* @brief mtd_get_hdr_img_size(uint8_t part) - get img size in hdr
* @param part: part number in flash block.

View File

@@ -48,9 +48,6 @@ extern "C" {
#define IOT_OEM_SECTION_SEC_ADDR (3072)
#define IOT_OEM_EXT_SECTION_OFFSET(fw_size) \
(((fw_size+31)&(~0x1f))+IOT_OEM_SECTION_START_ADDR)
#define IOT_OEM_EXT_MAGIC_STR "_oem_ext"
#define IOT_OEM_DUMMY_LEN 106