compile_stub.sh¶
Assembles the low-level boot stub and splash screen objects.
Overview¶
compile_stub.sh uses NASM to assemble two assembly source files into ELF object files. These objects contain the initial boot entry point and an embedded splash-screen TGA image, both of which are linked into the final kernel binary.
Prerequisites¶
nasmmust be available on the PATH.- The source files
src/arch/x86/boot/stub.asmandsrc/boot/splash_tga.asmmust exist. - The
lib/output directory must exist (created bycompile.shwhich clears it beforehand).
Inputs¶
| File | Description |
|---|---|
src/arch/x86/boot/stub.asm |
x86 boot stub -- the kernel entry point before Pascal code takes over. |
src/boot/splash_tga.asm |
Embeds a TGA splash screen image as a binary blob. |
Outputs¶
| File | Description |
|---|---|
lib/stub.o |
ELF object for the boot stub. |
lib/splash_tga.o |
ELF object for the splash screen data. |
Behavior¶
- Assembles
stub.asmintolib/stub.ousing NASM with the ELF output format (-f elf). - Assembles
splash_tga.asmintolib/splash_tga.ousing the same format.
Notes¶
- Both files are assembled as 32-bit ELF objects, consistent with the i386 target architecture.
stub.ois treated specially during linking:compile_link.shplaces it first in the link order so that the boot entry point appears at the expected address.