bootimage

command
v0.0.0-...-0effba1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Command bootimage turns the bootloader and kernel into a bootable disk image.

This has four responsibilities. Firstly, we parse the bootloader binary and check that stages 2 onward do not exceed 127 disk sectors, so that stage 1 can load them successfully. Secondly, we identify the addresses where the kernel size should be stored and the kernel should begin. Thirdly, we write the size of the kernel in bytes into the relevant part of the bootloader. Finally, we write the modified bootloader's segments and the entire kernel binary to the output file. Note that we strip the ELF headers from the bootloader, just writing the segments that are loaded into memory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL