#define DUMMY_END (0xffffffff)

//Define the version of MAUI software
#define MAUI_VERSION               1
#define SECURE_RO_VERSION          1

//==============================================================================
// MAUI's GFH header body
//==============================================================================


__maui_gfh__ const MAUI_GFH g_maui_gfh =
{
      //GFH_FILE_INFO_v1
      {
         GFH_HEADER(GFH_FILE_INFO, 1),
         GFH_FILE_INFO_ID,

         MAUI_VERSION,
#ifndef __FACTORY_BIN__
         PRIMARY_MAUI,
#else
         PRIMARY_FACTORY_BIN,
#endif
         MAUI_DEVICE_TYPE,
         P_MAUI_SIGNATURE_TYPE,

         (kal_uint32)(&Load$$ROM_GFH$$Base),
         GFH_FILE_SIZE_BY_POST_BUILD,
         MAX_LENGTH_ROM,
         (kal_uint32)(&Image$$ROM_GFH$$Length),
#define SIGNATURE_TYPE           SIG_PHASH
#define SIGNATURE_LEN            SIG_PHASH_LEN
#endif /* __MTK_SECURE_PLATFORM__ */

#define BL_VERSION               1

#ifdef __MINI_BOOTLOADER__
//==============================================================================
// Bootloader's GFH header body
//==============================================================================

__bootloader_gfh__ const BOOTLOADER_GFH g_bootloader_gfh = 
{
      //GFH_FILE_INFO_v1
      {  
         GFH_HEADER(GFH_FILE_INFO, 1),
         GFH_FILE_INFO_ID,
         
         BL_VERSION,
         ARM_BL,
         BL_DEVICE_TYPE,
         SIGNATURE_TYPE,
         
         (kal_uint32)(&Load$$BL_GFH_SECTION$$Base),
         GFH_FILE_SIZE_BY_POST_BUILD,
         BL_MAX_SIZE,
         (kal_uint32)(&Image$$BL_GFH_SECTION$$Length),
         SIGNATURE_LEN,
         (kal_uint32)(&Image$$READ_ONLY$$Base),
         BL_BINARY_ATTRIBUTE,
      },
/* ------------------------------------- */
/* global information */
/* ------------------------------------- */
#pragma arm section rodata = "BOOT_CERT_SIG"
const kal_uint32 g_boot_cert_sig[SIG_SINGLE_AND_PHASH_LEN>>2] = {SIG_HASH_VER};
#pragma arm section rodata



#pragma arm section rodata = "BOOT_CERT_DATA"
const DL_CTRL_FORMAT_ST DL_CTRL_BIN = 
{
    
    //GFH_FILE_INFO_v1
    {  
       GFH_HEADER(GFH_FILE_INFO, 1),
       GFH_FILE_INFO_ID,
       1,
       BOOT_CERT_CTRL,
       g_flash_dev,
       SIG_SINGLE_AND_PHASH,
       (kal_uint32)(&Image$$BOOT_CERT$$Base),
       sizeof(DL_CTRL_FORMAT_ST)+ sizeof(g_boot_cert_sig),          //File Length, filled out by post-build
       32*1024,
       (kal_uint32)(&Image$$BOOT_CERT$$Length),
       SIG_SINGLE_AND_PHASH_LEN,
       0,
       0
    },

    //GFH_BOOT_CERT_CTRL_CONTENT