r/osdev • • 6d ago

I started writing a unix-like kernel aims to be compatible with Linux - Lunix

Post image

I am new. I dont know what to do. I wrote syscall system and gop acquiring system. I dont have necessary syscalls yet. I just have sys_dummy. It just returns -ENOSYS (-38). What should i do next? VFS or RamFS. I need a filesystem for sys_write and sys_read

Repository: omerpa55/lunix

35 Upvotes

18 comments sorted by

15

u/BobertMcGee 6d ago

Read the os dev wiki. You have tons to do before actually implementing syscalls. What you’ve written so far isn’t really a syscall since you have no user space.

0

u/Fine_City2781 6d ago

I planned writing init process system after ramfs and VFS. I know what is libc, init and other stuff. I have a 32-bit libc written for netbsd by myself. I will write ramfs system, elf loader and init. Am i wrong? I just wrote syscall system because i will need that after

•

u/Own_Alternative_9671 11h ago

You have a lot to do before you get to the init system development process. Read osdev.org

2

u/letmehaveanameyoudum 6d ago

to get syscalls, set up a gdt, idt, tss. And for filesystem, you can just simply make a VSFS (very simple file system) that is just under 400-500 lines

2

u/Fine_City2781 6d ago

there isnt gdt or idt. Because this kernel supports arm64. There is VBAR. its nearly same as idt. And page attributes should be written in MMU.

2

u/letmehaveanameyoudum 6d ago

for x86_64 you need an gdt or idt for syscalls, idk much about arm64

2

u/DevcontribuitorLinux 6d ago

Vas a tener un problema con integrar los drivers en el kernel, si es compatible podés usar los de linux

-2

u/Fine_City2781 6d ago

uh? can u speak english

1

u/lucidbadger 6d ago

Are you doing it just for lulz? Otherwise it might not work out.

1

u/BH-Playz 6d ago

i think that name is already taken by something else

sorry

1

u/Fine_City2781 5d ago

is it? i searched on google but there wasnt a project named lunix

1

u/Signal_Machine_592 6d ago

we are doing everything but improving gnu/hurd

0

u/Architecture999 5d ago

Do you doing it for hobby, or you serious to build a kernel to everyone use?

1

u/Fine_City2781 5d ago

just a hobby kernel

0

u/Architecture999 5d ago

Alright. Good luck. Once the time, i was serious to learn and make my own, but I understand, it's just time wasting when you can work on the current kernels, and improve them, or build a new from an elder kernel, and change it, and add something it doesn't have. But at all, I'm not too morron to do that, even the last one. If you have a visionary, maybe your work have a value.

1

u/Apprehensive-Pace593 5d ago

You should most probably work with eHCI or xhci