1 /* 2 * Copyright (C) 2023 Rockchip Electronics Co., Ltd. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _FLASH_IMAGE_H 18 #define _FLASH_IMAGE_H 19 #include "defineHeader.h" 20 21 #pragma pack(1) 22 typedef struct { 23 char name[20]; 24 unsigned int offset; 25 unsigned int size; 26 } STRUCT_PARAM_ITEM, *PSTRUCT_PARAM_ITEM; 27 28 typedef struct { 29 char name[20]; 30 char value[256]; 31 } STRUCT_CONFIG_ITEM, *PSTRUCT_CONFIG_ITEM; 32 #pragma pack() 33 34 int flash_bootloader(char *dest_path, void *pupdate_cmd); 35 int flash_parameter(char *dest_path, void *pupdate_cmd); 36 int flash_normal(char *dest_path, void *pupdate_cmd); 37 int flash_register_partition_data(PSTRUCT_PARAM_ITEM p_param_item, long long *p_gpt_backup_offset); 38 #endif 39