MGCORE sekarang dibentuk sebagai fondasi kernel x86_64 freestanding dengan boot GRUB Multiboot2, subsistem kernel modular, syscall ABI mirip Linux untuk subset awal, dan jalur build userspace ELF statis.
boot/: header Multiboot2, transisi long mode, linker script, dangrub.cfgsrc/kernel/: console, interrupt/timer, PMM/VMM, scheduler/task, VFS/tmpfs, ELF, signal, syscall archsrc/syscall/: nomor syscall Linux-like, dispatch table, dan implementasi syscallinclude/mgcore/: header publik kernel dan ABIlib/libc/: libc minimal untuk program userspace statislib/crt/: entry runtime_startuserspace/:init,shell, test program C, dan contoh script Pythonscripts/: pembuat initramfs dan helper rundocs/syscalls.md: daftar syscall yang sudah di-scaffold
docs/syscall.md: penjelasan lengkap syscall (apa, kenapa, cara kerja, analogi)docs/syscalls.md: daftar status syscall MGCORE (implemented/scaffold/placeholder)
Baseline yang diasumsikan:
clangld.lldnasmgrub-mkrescueqemu-system-x86_64python3
MSYS2 CLANG64 yang praktis:
pacman -S --needed mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-lld mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-nasm mingw-w64-clang-x86_64-qemu mingw-w64-clang-x86_64-grub mingw-w64-clang-x86_64-xorrisoJika nasm belum tersedia, konfigurasi source-only tetap bisa dijalankan dengan:
cmake -S . -B build-lite -G Ninja -DMGCORE_REQUIRE_NASM=OFFDi Windows/MSYS2, siapkan Limine binary release dulu:
./scripts/setup-limine.ps1Atau dari shell MSYS2:
./scripts/setup-limine.shcmake -S . -B build -G Ninja
cmake --build buildOutput utama yang diharapkan:
build/kernel.elfbuild/initramfs.cpiobuild/mgcore.iso
Catatan bootloader:
- Windows/MSYS2 default ke
Limine - host non-Windows default ke
GRUB - override manual bisa pakai
-DMGCORE_BOOTLOADER=LIMINEatau-DMGCORE_BOOTLOADER=GRUB
Shell:
./run.sh build guiPowerShell:
./scripts/run.ps1 -BuildDir buildUntuk mode terminal/serial:
./scripts/run.ps1 -BuildDir build -Mode stdioMode input:
guimemakai jendela QEMU dengan input keyboard PS/2 untuk CLIstdiotetap memakai serial-serial stdio
mgctl status: status ringkas sistem koneksimgctl net tools: daftar driver koneksi asli yang jadi target integrasi (e1000/e1000e,rtl8139,virtio-net,ne2k-pci)mgctl net adapters: daftar ethernet controller hasil deteksi PCImgctl net scan/mgctl net nearby: scan gateway ARP + tampilkan status stack jaringan nyatamgctl net connect <net0|default|up>: bring-up koneksinet0(resolve gateway)mgctl power safe status|reboot|shutdown: policy safe boot saat panic/memory leaknearby: shortcut scan + list koneksi terdekatconnect <net0|default|up>: shortcut bring-up koneksinet0ping <ipv4> [count]: ICMP ping nyata (contohping 8.8.8.8 4)shutdown: halt mesinreboot: reboot mesin
Yang sudah masuk ke repo:
- boot path
32-bit -> long mode - console serial + VGA text
- IDT, PIC remap, PIT 100 Hz, interrupt stubs
- PMM bitmap sederhana
- VMM/address-space scaffold
- task table + scheduler metadata round-robin
- syscall ABI
x86_64dengan 50+ nomor syscall yang dideklarasikan - VFS/tmpfs + mount initramfs
cpio newc - ELF64 parser/probe
- libc/crt minimal untuk binary userspace statis
Yang masih berupa scaffold atau placeholder:
- context switch penuh dan eksekusi ring-3 nyata
forkcopy-on-write sesungguhnyaexecveyang benar-benar mengganti image proses- signal delivery lengkap
- driver mouse nyata
- port MicroPython/CPython
Repo ini sekarang siap dilanjutkan ke fase bring-up berikutnya tanpa perlu merombak ulang struktur utama.
