18#ifndef __LIBARCH_BOOTIMAGE_H
19#define __LIBARCH_BOOTIMAGE_H
30#define BOOTIMAGE_MAGIC0 ('F') + ('r' << 8) + ('e' << 16) + ('e' << 24)
33#define BOOTIMAGE_MAGIC1 ('N') + ('O' << 8) + ('S' << 16) + (0x1 << 24)
36#define BOOTIMAGE_REVISION 2
39#define BOOTIMAGE_NAMELEN 32
#define BOOTIMAGE_NAMELEN
Maximum length of BootSymbol names.
BootSymbolType
Boot symbol types.
@ BootFilesystem
Embedded filesystem.
@ BootProgram
Executable program.
@ BootPrivProgram
Privileged executable program.
unsigned int u32
Unsigned 32-bit number.
unsigned short u16
Unsigned 16-bit number.
unsigned char u8
Unsigned 8-bit number.
BootImage contains executable programs to be loaded at system bootup.
u32 magic[2]
Magic numbers to detect a valid boot image.
u16 symbolTableCount
Number of entries in the symbols table.
u32 segmentsTableOffset
Offset of the segments table.
u16 segmentsTableCount
Number of entries in the segments table.
u32 symbolTableOffset
Offset of the symbol table.
u8 layoutRevision
Version of the boot image layout.
u32 bootImageSize
Total size of the boot image in bytes.
u32 size
Total size of the segment.
u32 virtualAddress
Virtual memory address to load the segment.
u32 offset
Offset in the boot image of the segment contents.
Program embedded in the BootImage.
u32 segmentsTotalSize
Total size of the BootSymbol segments.
u16 segmentsCount
Number of contiguous entries in the segment table.
u32 entry
Program entry point (only valid for BootProgram symbols).
u32 segmentsOffset
Offset in the segments table.
BootSymbolType type
Type of boot symbol.
char name[BOOTIMAGE_NAMELEN]
Name of the boot symbol.