diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index 1535bed2..7592b85f 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -4,14 +4,18 @@ #include "arch/Serial.h" #include "arch/Timer.h" #include "boot/Init.h" +#include "boot/bootboot.h" #include "config.h" #include "memory/Heap.h" #include "memory/KernelVM.h" #include "memory/MemoryManager.h" #include "thread/Scheduler.h" #include +#include #include +extern const BOOTBOOT bootboot; + void async_thread() { while (true) @@ -49,6 +53,15 @@ Result init() kinfoln("Used memory: %s", to_dynamic_unit(MemoryManager::used()).release_value().chars()); kinfoln("Reserved memory: %s", to_dynamic_unit(MemoryManager::reserved()).release_value().chars()); + TarStream stream((void*)bootboot.initrd_ptr, bootboot.initrd_size); + TarStream::Entry entry; + while (TRY(stream.read_next_entry().try_set_value_with_specific_error(entry, 0))) + { + if (entry.type == TarStream::EntryType::RegularFile) + kinfoln("Found file %s in initial ramdisk, of size %s", entry.name, + to_dynamic_unit(entry.size).release_value().chars()); + } + Thread::init(); Scheduler::init();