Struct android_bootimage::MagicHeader [] [src]

pub struct MagicHeader {
    pub magic: [u8; 8],
    pub kernel_size: u32,
    pub kernel_load_address: u32,
    pub ramdisk_size: u32,
    pub ramdisk_load_address: u32,
    pub second_size: u32,
    pub second_load_address: u32,
    pub device_tree_size: u32,
    pub kernel_tags_address: u32,
    pub page_size: u32,
    pub product_name: [u8; 24],
    pub boot_arguments: [[u8; 32]; 16],
    pub unique_id: [u8; 32],
    // some fields omitted
}

Contains a magic header.

Fields

Header magic. Used to make sure this is in fact a header.

Ramdisk size, in bytes.

Address the ramdisk should be loaded to.

Ramdisk size, in bytes.

Address the ramdisk should be loaded to.

Size of an optional second file.

Address the optional second file should be loaded to.

The size of the device tree, in bytes.

Physical address of the kernel tags.

The page size.

Name of the product. This is a null-terminated ASCII string.

Arguments to pass to the kernel during boot. This is a nested array, as rust does not allow us to have arrays larger than 32 in size.

Used to uniquely identify boot images.

Methods

impl MagicHeader
[src]

Reads a magic header from the supplied source.

Returns the size of a section, in bytes.

Returns the start location of a section, in bytes.

Do note that this function can fail because it cannot find a section other than the one that was requested. Sections depend on the other sections for their locations.

Returns the start and the end location of a section, in bytes.

Do note that this function can fail because it cannot find a section other than the one that was requested. Sections depend on the other sections for their locations.

Reads a section from the given readable resource.

Do note that this function can fail because it cannot find a section other than the one that was requested. Sections depend on the other sections for their locations.

Returns the sections in this boot image, in order. Zero-size sections are omitted.

Trait Implementations

impl Debug for MagicHeader
[src]

Formats the value using the given formatter.