lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | |
| 2 | |
| 3 | #ifndef _BOOT_IMAGE_H_ |
| 4 | #define _BOOT_IMAGE_H_ |
| 5 | |
| 6 | typedef struct boot_img_hdr boot_img_hdr; |
| 7 | |
| 8 | #define BOOT_MAGIC "ANDROID!" |
| 9 | #define BOOT_MAGIC_SIZE 8 |
| 10 | #define BOOT_NAME_SIZE 16 |
| 11 | #define BOOT_ARGS_SIZE 512 |
| 12 | |
| 13 | struct boot_img_hdr |
| 14 | { |
| 15 | unsigned char magic[BOOT_MAGIC_SIZE]; |
| 16 | |
| 17 | unsigned kernel_size; |
| 18 | unsigned kernel_addr; |
| 19 | |
| 20 | unsigned ramdisk_size; |
| 21 | unsigned ramdisk_addr; |
| 22 | |
| 23 | unsigned second_size; |
| 24 | unsigned second_addr; |
| 25 | |
| 26 | unsigned tags_addr; |
| 27 | unsigned page_size; |
| 28 | unsigned unused[2]; |
| 29 | |
| 30 | unsigned char name[BOOT_NAME_SIZE]; |
| 31 | |
| 32 | unsigned char cmdline[BOOT_ARGS_SIZE]; |
| 33 | |
| 34 | unsigned id[8]; |
| 35 | }; |
| 36 | |
| 37 | #if 0 |
| 38 | typedef struct ptentry ptentry; |
| 39 | |
| 40 | struct ptentry { |
| 41 | char name[16]; |
| 42 | unsigned start; |
| 43 | unsigned length; |
| 44 | unsigned flags; |
| 45 | }; |
| 46 | |
| 47 | |
| 48 | #endif |
| 49 | |
| 50 | #endif |