feat(bootloader): add an example that implements multiboot

Add a new example for the bootloader that shows how to override it to implement multiboot.
This commit is contained in:
Omar Chebib
2024-12-12 13:56:02 +08:00
parent 28f1b18675
commit 840eef31ce
11 changed files with 433 additions and 0 deletions
+5
View File
@@ -39,10 +39,12 @@ extern "C" {
#define LOG_ANSI_COLOR_STYLE_BOLD "1"
#define LOG_ANSI_COLOR_STYLE_ITALIC "3"
#define LOG_ANSI_COLOR_STYLE_UNDERLINE "4"
#define LOG_ANSI_COLOR_STYLE_REVERSE "7"
// Macros that form the starting sequence for setting the text color, background color, and reset all.
#define LOG_ANSI_COLOR(TEXT_COLOR) "\033[" TEXT_COLOR "m"
#define LOG_ANSI_COLOR_BG(BG_COLOR) "\033[" BG_COLOR "m"
#define LOG_ANSI_COLOR_RESET "\033[" LOG_ANSI_COLOR_STYLE_RESET "m"
#define LOG_ANSI_COLOR_REVERSE "\033[" LOG_ANSI_COLOR_STYLE_REVERSE "m"
// Macros that form the starting sequence for text color + style + background colors
#define LOG_ANSI_COLOR_REGULAR(COLOR) LOG_ANSI_COLOR(LOG_ANSI_COLOR_STYLE_RESET ";" COLOR)
#define LOG_ANSI_COLOR_BOLD(COLOR) LOG_ANSI_COLOR(LOG_ANSI_COLOR_STYLE_BOLD ";" COLOR)
@@ -54,6 +56,9 @@ extern "C" {
#define LOG_ANSI_COLOR_ITALIC_BACKGROUND(TEXT_COLOR, BG_COLOR) LOG_ANSI_COLOR_ITALIC(TEXT_COLOR ";" BG_COLOR)
#define LOG_ANSI_COLOR_UNDERLINE_BACKGROUND(TEXT_COLOR, BG_COLOR) LOG_ANSI_COLOR_UNDERLINE(TEXT_COLOR ";" BG_COLOR)
#define LOG_ANSI_COLOR_FORMAT(TEXT_STYLE, TEXT_COLOR, BG_COLOR) LOG_ANSI_COLOR(TEXT_STYLE ";" TEXT_COLOR ";" BG_COLOR)
// Miscellaneous macros for screen and cursor manipulation
#define LOG_ANSI_CLEAR_SCREEN "\033[2J"
#define LOG_ANSI_SET_CURSOR_HOME "\033[H"
/**
* Usage example of ANSI color for logs: