aboutsummaryrefslogtreecommitdiff
path: root/rmi4update/firmware_image.h
diff options
context:
space:
mode:
Diffstat (limited to 'rmi4update/firmware_image.h')
-rw-r--r--rmi4update/firmware_image.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/rmi4update/firmware_image.h b/rmi4update/firmware_image.h
index 1c91324..bba6e0d 100644
--- a/rmi4update/firmware_image.h
+++ b/rmi4update/firmware_image.h
@@ -43,6 +43,53 @@
#define RMI_IMG_LOCKDOWN_V5_OFFSET 0xB0
#define RMI_IMG_LOCKDOWN_V5_SIZE 0x50
+// Leon add for BL_V7
+#define RMI_IMG_V10_CNTR_ADDR_OFFSET 0x0C
+
+struct container_descriptor {
+ unsigned char content_checksum[4];
+ unsigned char container_id[2];
+ unsigned char minor_version;
+ unsigned char major_version;
+ unsigned char reserved_08;
+ unsigned char reserved_09;
+ unsigned char reserved_0a;
+ unsigned char reserved_0b;
+ unsigned char container_option_flags[4];
+ unsigned char content_options_length[4];
+ unsigned char content_options_address[4];
+ unsigned char content_length[4];
+ unsigned char content_address[4];
+};
+
+enum container_id {
+ TOP_LEVEL_CONTAINER = 0,
+ UI_CONTAINER,
+ UI_CONFIG_CONTAINER,
+ BL_CONTAINER,
+ BL_IMAGE_CONTAINER,
+ BL_CONFIG_CONTAINER,
+ BL_LOCKDOWN_INFO_CONTAINER,
+ PERMANENT_CONFIG_CONTAINER,
+ GUEST_CODE_CONTAINER,
+ BL_PROTOCOL_DESCRIPTOR_CONTAINER,
+ UI_PROTOCOL_DESCRIPTOR_CONTAINER,
+ RMI_SELF_DISCOVERY_CONTAINER,
+ RMI_PAGE_CONTENT_CONTAINER,
+ GENERAL_INFORMATION_CONTAINER,
+ DEVICE_CONFIG_CONTAINER,
+ FLASH_CONFIG_CONTAINER,
+ GUEST_SERIALIZATION_CONTAINER,
+ GLOBAL_PARAMETERS_CONTAINER,
+ CORE_CODE_CONTAINER,
+ CORE_CONFIG_CONTAINER,
+ DISPLAY_CONFIG_CONTAINER,
+ EXTERNAL_TOUCH_AFE_CONFIG_CONTAINER,
+ UTILITY_CONTAINER,
+ UTILITY_PARAMETER_CONTAINER,
+};
+// BL_V7 end
+
class FirmwareImage
{
public:
@@ -65,6 +112,7 @@ public:
private:
unsigned long Checksum(unsigned short * data, unsigned long len);
void PrintHeaderInfo();
+ void ParseHierarchicalImg(); // BL_V7
private:
unsigned long m_checksum;
@@ -83,6 +131,7 @@ private:
unsigned char * m_configData;
unsigned char * m_lockdownData;
unsigned char * m_memBlock;
+ unsigned long m_cntrAddr; // BL_V7
};
#endif // _FIRMWAREIMAGE_H_