#include "pid.h" #define PID_SIZE 70 #define HWID_OFFSET -67 #ifdef FLASH_2M #define PID_SIZE 70 #define LOADER_SIZE (64<<10) #define KERNEL_SIZE (640<<10) #define FS_SIZE (1216<<10) - PID_SIZE - 8 #define CHECKSUM_RANGE 0x1dfffc #define ADAM2_SIZE (32<<10) #define DOWNLOAD_SIZE (16<<10) #else #define LOADER_SIZE (128<<10) #define KERNEL_SIZE (704<<10) #define FS_SIZE (3136<<10) - PID_SIZE - 8 #define CHECKSUM_RANGE 0x3dfffc #define ADAM2_SIZE (92<<10) #define DOWNLOAD_SIZE (36<<10) #endif #ifdef MB101 #define PID_SIZE 70 #define LOADER_SIZE (64<<10) #define KERNEL_SIZE (640<<10) #define FS_SIZE (1216<<10) - PID_SIZE - 8 #define CHECKSUM_RANGE 0x1dfffc #define ADAM2_SIZE (40<<10) #define DOWNLOAD_SIZE (24<<10) #endif typedef struct{ u_int8_t loader[LOADER_SIZE]; u_int8_t kernel[KERNEL_SIZE]; u_int8_t filesystem[FS_SIZE]; sercomm_pid_t pid; u_int8_t signature[4]; u_int16_t checksum; u_int16_t fake; }image_t;