/* $NetBSD: bebox_bootrec.h,v 1.4 2014/04/22 21:37:52 phx Exp $ */
#define BEBOX_HEADER_SIZE 0x6400
#define BEBOX_BLOCK_SIZE 0x200
#define BEBOX_FILE_BLOCK_SIZE 0x100
#define BEBOX_FILE_SIZE_OFFSET 0x00004494
#define BEBOX_FILE_SIZE_ALIGN_OFFSET 0x00004498
#define BEBOX_FILE_BLOCK_MAP_START 0x00000200
#define BEBOX_FILE_BLOCK_MAP_END 0x00000368
u_char bebox_image_data0[] = {
0x00, 0x03, 0x00, 0x00, 0xde, 0xad, 0xbe, 0xef, /* mtime */
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0b, 0x40, /* avail size */
0x00, 0x00, 0x02, 0x00, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0x40, /* used block */
0x01, 0x00, 0x00, 0x00, 0x4e, 0x65, 0x74, 0x42,
0x53, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x41, 0xc0,
0xbe, 0x00, 0xbe, 0x01, 0xbe, 0x02, 0xbe, 0x03,
0xbe, 0x04, 0xbe, 0x05, 0xbe, 0x06, 0xbe, 0x07,
0xbe, 0x08, 0xbe, 0x09, 0xbe, 0x0a, 0xbe, 0x0b,
0xbe, 0x0c, 0xbe, 0x0d, 0xbe, 0x0e, 0xbe, 0x0f,
0xbe, 0x10, 0xbe, 0x11, 0xbe, 0x12, 0xbe, 0x13,
0xbe, 0x14, 0xbe, 0x15, 0xbe, 0x16, 0xbe, 0x17,
0xbe, 0x18, 0xbe, 0x19, 0xbe, 0x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0xcc, 0xbe, 0xcd, 0xbe, 0xce, 0xbe, 0xcf,
0xbe, 0xd0, 0xbe, 0xd1, 0xbe, 0xd2, 0xbe, 0xd3,
};
u_char bebox_image_data1[] = {
0x54, 0x72, 0x61, 0x73, 0x68, 0x00, 0x00, 0x00,
};
u_char bebox_image_data2[] = {
0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xde, 0xad, 0xbe, 0xef, /* mtime */
0xde, 0xad, 0xbe, 0xef, 0x00, 0x00, 0x00, 0x00, /* mtime */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x41, 0xff,
};
u_char bebox_image_data3[] = {
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x00, 0x00,
};
u_char bebox_image_data4[] = {
0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xde, 0xad, 0xbe, 0xef, /* mtime */
0xde, 0xad, 0xbe, 0xef, 0x00, 0x00, 0x00, 0x00, /* mtime */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x41, 0xff,
};
u_char bebox_image_data5[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
};
u_char bebox_image_data6[] = {
0x00, 0x72, 0x61, 0x73, 0x68, 0x00, 0x00, 0x00,
};
u_char bebox_image_data7[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xff,
};
u_char bebox_image_data8[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
};
u_char bebox_image_data9[] = {
0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x00, 0x00,
};
u_char bebox_image_data10[] = {
0x80, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x65,
0x00, 0x00, 0x00, 0x00, 0xde, 0xad, 0xbe, 0xef, /* mtime */
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, /* mtime/filesize */
0xde, 0xea, 0xbe, 0xef, 0x00, 0x00, 0x00, 0x00, /* filesize(aligned) */
0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x81, 0xb6,
};
u_char bebox_image_data11[] = {
0x00, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x00, 0x00,
};
u_char bebox_image_data12[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xff,
};
struct bebox_image_block {
int32_t offset;
u_char *data;
int32_t size;
};
#define BEBOX_IMG(x) __CONCAT(bebox_image_data,x)
#define BEBOX_IMG_DATA_SIZE(x) BEBOX_IMG(x), \
(sizeof (BEBOX_IMG(x)) / sizeof (BEBOX_IMG(x)[0]))
struct bebox_image_block bebox_image_block[] = {
{ 0x00000000, BEBOX_IMG_DATA_SIZE(0) },
{ 0x00000440, BEBOX_IMG_DATA_SIZE(1) },
{ 0x00000480, BEBOX_IMG_DATA_SIZE(2) },
{ 0x000004c0, BEBOX_IMG_DATA_SIZE(3) },
{ 0x00000500, BEBOX_IMG_DATA_SIZE(4) },
{ 0x00002400, BEBOX_IMG_DATA_SIZE(5) },
{ 0x00002440, BEBOX_IMG_DATA_SIZE(6) },
{ 0x000024a0, BEBOX_IMG_DATA_SIZE(7) },
{ 0x00004400, BEBOX_IMG_DATA_SIZE(8) },
{ 0x00004440, BEBOX_IMG_DATA_SIZE(9) },
{ 0x00004480, BEBOX_IMG_DATA_SIZE(10) },
{ 0x000044c0, BEBOX_IMG_DATA_SIZE(11) },
{ 0x00004520, BEBOX_IMG_DATA_SIZE(12) },
{ -1 }
};
int32_t bebox_mtime_offset[] = {
0x00000004,
0x0000048c,
0x00000490,
0x0000050c,
0x00000510,
0x0000448c,
0x00004490,
-1
};