mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Add a better boot message with version
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
#include "memory.h"
|
||||
#include "utility.h"
|
||||
|
||||
#ifndef GIT_VERSION
|
||||
#define GIT_VERSION L"no version"
|
||||
#ifndef GIT_VERSION_WIDE
|
||||
#define GIT_VERSION_WIDE L"no version"
|
||||
#endif
|
||||
|
||||
#define KERNEL_HEADER_MAGIC 0x600db007
|
||||
@@ -40,7 +40,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
|
||||
|
||||
// When checking console initialization, use CHECK_EFI_STATUS_OR_RETURN
|
||||
// because we can't be sure if the console was fully set up
|
||||
status = con_initialize(system_table, GIT_VERSION);
|
||||
status = con_initialize(system_table, GIT_VERSION_WIDE);
|
||||
CHECK_EFI_STATUS_OR_RETURN(status, "con_initialize");
|
||||
// From here on out, we can use CHECK_EFI_STATUS_OR_FAIL instead
|
||||
|
||||
|
||||
@@ -32,15 +32,10 @@ kernel_main(popcorn_data *header)
|
||||
{
|
||||
console cons = load_console(header);
|
||||
|
||||
const int times = 38;
|
||||
char message[] = " 000 Hello, I am text rendered by the kernel! :-D\n";
|
||||
for (int i = 0; i < times; ++i) {
|
||||
cons.set_color(i, 0);
|
||||
message[1] = '0' + ((i / 100) % 10);
|
||||
message[2] = '0' + ((i / 10) % 10);
|
||||
message[3] = '0' + (i % 10);
|
||||
cons.puts(message);
|
||||
}
|
||||
cons.set_color(0x21, 0x00);
|
||||
cons.puts("Popcorn OS ");
|
||||
cons.set_color(0x08, 0x00);
|
||||
cons.puts(GIT_VERSION " booting...\n");
|
||||
|
||||
do_the_set_registers(header);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user