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.
Click to show internal directories.
Click to hide internal directories.