Espresso 0.0.1b

This commit is contained in:
2025-06-27 14:48:06 -05:00
parent fca025a9bf
commit c336584114
39 changed files with 2676 additions and 936 deletions

View File

@ -53,17 +53,16 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
const char* espresso_kernel_version = "0.0.0f";
/* We need to initialize the terminal so that any error/debuging messages show. */
/* We need to initialize the terminal so that any error/debugging messages show. */
terminal_initialize();
printf("Loading Espresso %s...\n", espresso_kernel_version);
terminal_setcolor(VGA_COLOR_RED);
/* Make sure the magic number matches for memory mapping*/
/* Make sure the magic number matches for memory mapping */
if(magic != MULTIBOOT_BOOTLOADER_MAGIC)
{
printf("[ ERROR ] invalid magic number!\n");
_hang_asm();
}
@ -79,7 +78,6 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
pic_remap();
idt_init();
/*pit_init(1000); 1000 Hz = 1ms tick */
_sti_asm();
terminal_setcolor(VGA_COLOR_GREEN);
@ -121,14 +119,14 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
printd("AHCI initialized\n");
*/
printd("Initializing VFS...\n");
vfs_init();
printd("VFS initialized.\n");
printd("Initializing IDE system...\n");
ide_initialize();
printd("IDE initialized\n");
/*printd("Initializing fat16...\n");
fat16_init(0);
printd("fat16 initialized.\n");*/
/*printd("Initializing DuckFS...\n");
duckfs_init();
printd("DuckFS initialized\n");*/
@ -147,43 +145,9 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
/*pit_sleep(4000);
begin_anim(espresso_kernel_version);*/
printf("Creating file via VFS...\n");
FILE file = create_file("test.txt", 't', 'n', -128);
printf("file = %d\n", file);
char buf[32] = "Hello from VFS";
char bufr[32] = { 0 };
write_file(file, buf, strlen(buf));
read_file(file, bufr, sizeof(bufr));
printf("Read data: %s\n", bufr);
/*printf("Creating file...\n");
ramfs_file_header_t* fil = ramfs_create_file("text", "txt", 't', 'n', ramfs_get_root());
if (!fil)
{
printf("File creation failed!\n");
return;
}
printf("File created\n");
char buf[32] = "hello from RAMFS";
char bufr[32] = { 0 };
ramfs_write_file(fil, buf, strlen(buf));
ramfs_read_file(fil, bufr, sizeof(bufr));
printf("Read data: %s\n", bufr);*/
printf("Guten tag and welcome to Espresso\n");
while (true)
{