jhonxie/rk2918_tools — Issue #2: 包结构分析
Author: jhonxie
Created: 2011-10-19 09:59:23+00:00
State: open

```c
#pragma byteorder(little_endian)

struct RkFirmwareHeader
{
char HeadCode[6]; //"RKFWf"

unsigned int version;
unsigned int v;

unsigned short year;
unsigned char month;
unsigned char day;

unsigned char hour;
unsigned char minute;
unsigned char second;

unsigned int chip;

unsigned int loader_offset;
unsigned int loader_length;

unsigned int image_offset;
unsigned int image_length;
};

struct update_part {
char name[32];
char filename[32];
char reserved[32];
unsigned int pos;
unsigned int flags;
unsigned int padded_size;
unsigned int size;
};

struct update_header {
char magic[4];
unsigned int length;
char model[0x22];
char id[0x1e];
char manufacturer[0x38];
unsigned int unknown1;
unsigned int version;
unsigned int num_parts;

struct update_part parts[16];

unsigned char reserved[0x74];
};

struct bootloader_header {
char magic[6];
unsigned int version;
unsigned int unknown1;

unsigned short build_year;
unsigned char build_month;
unsigned char build_day;
unsigned char build_hour;
unsigned char build_minute;
unsigned char build_second;
/* 104 (0x68) bytes */

unsigned int chip;
};
```