
// Uncomment and modify the following definitions as per the compiler used
// typedef char uint8_t;
// typedef unsigned short uint16_t;
// typedef unsigned int uint32_t;
// typedef unsigned long uint64_t;

struct uboot_header {
    uint32_t version_info;
    uint32_t fuse_mode;
} __attribute__((packed));
        
struct keywriter_lite_header {
    uint16_t magic;
    uint16_t size;
    uint8_t abi_major;
    uint8_t abi_minor;
    uint16_t reserved0;
    uint32_t cmd_id;
    uint32_t reserved1[2];
} __attribute__((packed));
        
struct ext_otp {
    uint32_t field_header;
    uint32_t action_flags;
    uint16_t ext_otp_size;
    uint16_t ext_otp_index;
    uint8_t ext_otp_rpwp[16];
    uint8_t ext_otp[128];
    uint32_t reserved[4];
} __attribute__((packed));
        
struct checksum {
    uint8_t hash[64];
} __attribute__((packed));
        
struct keywrlite_blob {
    struct uboot_header ubheader;
    struct keywriter_lite_header header;
    struct ext_otp extotp;
    struct checksum chksum;
}__attribute__((packed));

struct keywrlite_blob blob = {
    .ubheader =
        {
            .version_info = 0x1,
            .fuse_mode = 0x9045,
        }
        ,
    .header =
        {
            .magic = 0x9012,
            .size = 172,
            .abi_major = 0,
            .abi_minor = 1,
            .reserved0 = 0,
            .cmd_id = 12,
            .reserved1 = {0x0, 0x0},
        }
        ,
    .extotp =
        {
            .field_header = 0xd0e5,
            .action_flags = 0xa5a5a55a,
            .ext_otp_size = 32,
            .ext_otp_index = 960,
            .ext_otp_rpwp = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
            .ext_otp = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x47, 0xe0, 0xa0, 0x45, 0x0, 0x0, 0x0, 0x0},
            .reserved = {0x0, 0x0, 0x0, 0x0},
        }
        ,
    .chksum =
        {
            .hash = {0xe9, 0xbf, 0x93, 0x5f, 0xde, 0x78, 0x28, 0x54, 0x20, 0xd4, 0x47, 0x13, 0x74, 0xb1, 0x4b, 0x2e, 0xd1, 0xcd, 0x67, 0x93, 0xb6, 0x6e, 0x74, 0xbb, 0x72, 0xa5, 0xca, 0xc9, 0xd0, 0x93, 0xf2, 0xb3, 0x90, 0x5a, 0xa4, 0xd5, 0x9a, 0x2d, 0x4, 0xc0, 0xc4, 0xcf, 0xfc, 0x4d, 0xd9, 0x99, 0x12, 0x11, 0xc1, 0x97, 0x84, 0xb6, 0x14, 0x3, 0xe, 0xe6, 0x6f, 0x44, 0x77, 0x8, 0xd5, 0x60, 0x64, 0x8a},
        }
        ,

};