Espresso 0.0.1a
This commit is contained in:
@ -25,12 +25,13 @@
|
||||
#include <stdio.h>
|
||||
#include <drivers/pci.h>
|
||||
#include <drivers/ps2_keyboard.h>
|
||||
#include <drivers/pit.h>
|
||||
/*#include <drivers/ahci.h>*/
|
||||
#include <drivers/ide.h>
|
||||
#include <mm/mm.h>
|
||||
#include <fs/ramfs.h>
|
||||
#include <fs/fat32.h>
|
||||
#include <fs/duckfs.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#include <vector_extentions/sse.h>
|
||||
|
||||
@ -106,6 +107,10 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
printd("SSE test succeeded\n");
|
||||
}
|
||||
|
||||
printd("Initializing the PIT...\n");
|
||||
pit_init();
|
||||
printd("PIT initialized\n");
|
||||
|
||||
printd("Initializing the PS/2 keyboard...\n");
|
||||
keyboard_init();
|
||||
printd("PS/2 Keyboard initialized\n");
|
||||
@ -116,33 +121,66 @@ void kernel_main(multiboot_info_t* mbd, unsigned int magic)
|
||||
printd("AHCI initialized\n");
|
||||
*/
|
||||
|
||||
/*printd("Initializing RAMFS...\n");
|
||||
ramfs_init();
|
||||
printd("RAMFS 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 DuckFS...\n");
|
||||
int32_t duckfs_init_rv = duckfs_init(0);
|
||||
printf("[ DEBUG ] DuckFS initialized with RV %d\n", duckfs_init_rv);*/
|
||||
duckfs_init();
|
||||
printd("DuckFS initialized\n");*/
|
||||
|
||||
/*printd("Initializing FAT32...\n");
|
||||
fat32_init(0);
|
||||
printd("FAT32 initialized\n");*/
|
||||
|
||||
/*printd("Initializing the PIT...\n");
|
||||
pit_init(1000);
|
||||
printd("PIT initialized\n");*/
|
||||
|
||||
|
||||
/* --- END INITIALIZATION SECTION --- */
|
||||
|
||||
terminal_setcolor(VGA_COLOR_LIGHT_GREEN);
|
||||
|
||||
/*sleep(1000);*/
|
||||
|
||||
//begin_anim(espresso_kernel_version);
|
||||
/*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");
|
||||
|
||||
|
Reference in New Issue
Block a user