WKern
Loading...
Searching...
No Matches
brules Namespace Reference

Functions

 compileasm ()
 Compiles all NASM assembly files in NASMSRCS.
 compile_file (file)
 Compile a single C file if out of date.
 compilec ()
 Compiles all C sources in parallel from SRCS.
 partial_link ()
 Performs partial linking on modules from MODULES.
 link ()
 Links the final kernel ELF binary from object files.
 iso ()
 Generates a bootable ISO using GRUB and kernel ELF.

Function Documentation

◆ compile_file()

brules.compile_file ( file)

Compile a single C file if out of date.

Parameters
fileThe .c file path to compile
Returns
Compilation result message

Definition at line 53 of file brules.py.

◆ compileasm()

brules.compileasm ( )

Compiles all NASM assembly files in NASMSRCS.

Skips files that are up to date (i.e. object file newer than source). Assembles using AS and ASFLAGS.

On error, exits the script with a non-zero status.

Definition at line 30 of file brules.py.

◆ compilec()

brules.compilec ( )

Compiles all C sources in parallel from SRCS.

Uses a thread pool to speed up compilation across multiple cores. Exits on the first compilation error.

Definition at line 73 of file brules.py.

◆ iso()

brules.iso ( )

Generates a bootable ISO using GRUB and kernel ELF.

Only updates the ISO if the kernel is newer than the ISO file. Copies kernel and GRUB config to target locations and invokes grub-mkrescue.

Definition at line 143 of file brules.py.

◆ link()

brules.link ( )

Links the final kernel ELF binary from object files.

Only performs linking if the output file is older than the inputs. On failure, exits with an error.

Definition at line 121 of file brules.py.

◆ partial_link()

brules.partial_link ( )

Performs partial linking on modules from MODULES.

Links grouped .o files into monolithic .o modules in objs/modules/. Skips linking if the output is newer than all inputs.

On failure, exits the script.

Definition at line 95 of file brules.py.