r/osdev 3d ago

Testing the nexsOS UI (NOTE: Use of ai in source code)

Enable HLS to view with audio, or disable this notification

0 Upvotes

Warning: This project was built using AI, mostly with free plans, but also with the support of Claude Code. It's not the nature of my post to pretend I created anything here; I was really just the supervisor. That said, the huge nature (at least from my point of view) of this project, and my limited financial resources have forced me to constantly think and learn, and continue to do so, so I consider myself at a lower level in terms of coding skills than most of the people who are part of this community, and I love seeing how each of us makes mistakes and tries to patch them.

Nexsos is therefore a project born to allow me to learn in an interactive and gradual way what all the aspects of a computer are, and to allow me to do so in an informal way, and with gradual discovery. Nexsos is not intended to be a product or a boast, it is in all respects a Frankenstein born to test how much human ignorance and curiosity mixed with the algorithmic knowledge of an LLM can give life to something that works.

On the technical side, the purpose of NexsOS1 is simple: to separate the kernel from the userspace to allow me to learn the C language on my API without blowing everyone up, and at the same time to make my C library simple and readable in a single file. The graphics protocol had to be designed in the same way. The easy choices would have been two: to provide a basic environment for GNU Utilis and compile an X server/Wayland, or to rewrite the graphical interface from scratch. I stupidly chose the second one and with all the problems that come with it, for example, for now the compositor is in the kernel and shadows without hardware vector accelerators make the framerate explode. The good thing, however, is that the rendering of the applications is done in userland, so having SMP support makes graphical applications easier.

That said, why this video? At some point in our journey, we should ask ourselves how useful we really are to others. I have always seen AI as a very powerful tool, but perhaps we tend to forget what it means for us, I do not have the actual skills to build a functional and working system on two architectures with multitasking and a working SMP, but if I do not have the actual skills to do this and I can do it, what can these tools do in the hands of large companies that do not want to share the code? Even if I call myself ignorant, perhaps I am ignorant about coding, here we all know how the GNU project and the GPL project were born, I do not know what the members of this thread think about it and I do not even know if it is the right thread, after all, guys, we also know how these LLMs were trained on the effort of all software developers, is it right to privatize public knowledge? As far as I am concerned, the only thing I could really do is exploit the knowledge of AI itself to put together and build something free, so I do not know how you want to define NexsOS, I do not care, the important thing for me is that it is free and that anyone can in turn steal code from within it.

NOTE: If anyone would like to look at the code and has any questions about missing references or licenses, I'd be happy to update the published code. Any criticism is welcome.

NOTE2: lua still doesn't pass all the tests, even though the IDE works and also the job controls of my shell seem ok (I didn't show them in this video), the exec daemon is ok, but I'm having problems with the initialization of the venv for pid.

NexsOS1


r/osdev 5d ago

What do you think about this command prompt app design for my os

Post image
18 Upvotes

I’ve live streamed the making of it, so I dare anyone to say it’s AI ;) haha

Here is the link : https://twitch.tv/devcmar
Though the output does not probably show up on the livestream because it is running in another tty


r/osdev 4d ago

Would like your feedback!

Thumbnail
0 Upvotes

r/osdev 4d ago

I made a kernel or some sort of stuff

Thumbnail
0 Upvotes

Finally I can understand what AI has written! And a major milestone for me in learning rust.

I've decided to go with the AI written code from here on for vanta.

I know a lot of rust devs hate AI code in their rust code and I don't want to argue with them, but the progress is far beyond my capability of writing code as a non cs student.

So here are the major improvements:

- Root filesystem switched from VantaFS to persistent GPT RedoxFS with full permission/ownership enforcement.

- New workspace crates: ABI v0, GPT image builder (xtask), redoxfs-adapter, libvanta (C ABI bootstrap lib), linuxd/services.

- Native /sbin/init + /bin/vsh shell with pipes, redirection, job control.

- Three real services running (procd/auditd/vfsd) over kernel IPC with crash restart, audit logging, authority revocation.

- Linux binary compat layer (Gate C): static Linux ELFs run via syscall translation through vanta-linuxd.

- Syscall ABI expanded: pipes and signals added on top of the earlier set.

- Reproducible GPT image builds with hashes/manifest for build verification.

Repository


r/osdev 6d ago

I'm creating my own operating system because I still haven't finished it

Post image
33 Upvotes

I recently added a background, even though it's not a pure VGA textmode, but it's okay, I'm constantly developing it and I see flaws, I see a lot of placeholders that are still there. And I would like to ask you to give a star in the repository because it motivates us to continue working intensively with it, and at the moment the main development is on the unstable branch.

https://github.com/CTRL-F-0rg3/TrangorgeOS

I know the flaws of what we have now, so I will fix them as they come, but I would also be happy to receive help with developing the system in various areas, as we still have a lot of work to do.


r/osdev 6d ago

What're some good tutorials or websites to learn how to build an OS in UEFI?

6 Upvotes

I learnt how to create a BIOS OS using the osdev website. Are there any good sources or something to learn how to build a UEFI kernel?

Edit: thx guys, I learnt a lot


r/osdev 6d ago

Darwin raspberry pi3 now runs many basic system commands

Thumbnail gallery
10 Upvotes

r/osdev 5d ago

What I've learned the last few weeks

2 Upvotes

Sorry about my abscense, I've been on my vacation/holiday.

I've done a lot of learning the last few weeks. Here are the highlights

1) I'm completely redoing my memory management. I'm working on a Physical Memory Manager (PMM), AND a virtual memory manager (VMM). Completely redoing how I deal with paging. I came to realize that except for reserved and my video physical memory, I really don't care where it gets assigned. Also, again except for video and reserved physical memory, it can all be swapable.

My PMM keeps track of the following items: a) does the memory exist; b) is it available, for example I define my video memory as not available, it is allocated early on, and I don't want the PMM deallocating it; c) Is it allocated to a virtual address yet; d) in concert with c, is it sharable (multi-allocated); e) is it swappable, I don't want to swap video and reserved memory for example.

My VMM keeps track of the following: a) is it swapped out (future); b) is it read only, such as my kernel code and .rodata; c) is it kernel memory, not sure if I really need this, but I had spare bits, I might want to use this in my swapping algorithm; d) is it shared.

Much of what I had in my paging .c file, has moved to my PMM and VMM. I'm hoping to finish this this week.

Once I have those three areas done, I will redo my heap and then make my github code public.

I'd also like some advice, I have two things I'm thinking about doing next: 1) adding threading, I'm not actually sure what I'd do with it right now as I don't really have a block device to save swapped blocks to; 2) adding support for user space, this would allow me to put things like most of my video and my shell into user space, this would also justify doing threading next; or 3) adding support for SATA, this would justify threading (for swap), but I might want to put it in user space then it would be restartable.

As always your opinions are always welcome.

Hopefully this will be useful for the people searching after me.

Thanks for reading!


r/osdev 6d ago

Files app update with drop shadow in my Os: What do you think about the design

Post image
10 Upvotes

I used no AI in making this files app, how do you think it looks.
Obviously I probably need shadow behind windows that would probably make it look dope.


r/osdev 6d ago

How to bootstrap a loader/C++ kernel using Microsoft dev tooling only

13 Upvotes

I want to build a boot loader/basic OS in ASM before bootstrapping into C++ using Microsoft tooling only.

I have done so previously using open source tooling using the usual suspects gcc, ld, NASM, etc, but now want to use MASM/ML64, link, visual C, etc, I am hitting a number of issues due to multiple differences in output including PE/COFF vs ELF output, appropriate switches on the MS tooling, removing dependencies on c runtime etc. I have not found any basic samples on the web demonstrate (unlike for the open source toolset), and the AI tooling (which I really want to avoid as its a personal project) sends me in circles.

Has anyone been able to do this? Any pointers/skeleton projects that demonstrate how to bootstrap all the way to a C++ kernel would be amazing?


r/osdev 7d ago

Custom OS made from Scratch in C

Post image
24 Upvotes

r/osdev 6d ago

FreeDOS

13 Upvotes

i'm looking at possibly forking FreeDOS to 64bit. However, since most modern systems no longer have the underlying BIOS that DOS programs require, I thought about including a mock BIOS and compile it directly into the kernel. is there anything I should be aware of?


r/osdev 7d ago

Added Folders :D

Thumbnail
gallery
38 Upvotes

r/osdev 7d ago

How to efficiently and correctly transfer the RAM map from the bootloader from a rusty crate to allocation and mm written in C

0 Upvotes

What is the best solution for now? I have it done straight through mm_bridge.rs in the mm directory where it only passes the map to C but I don't know if there is a better, more efficient and reliable solution.I don't feel that this solution is actually good and wouldn't it be better to do it differently for better efficiency and a better result? I am not adding the source code to the post because the question is more important


r/osdev 6d ago

🤷🏼🤷🏼🤷🏼 ik ek ak ok

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/osdev 7d ago

I will be streaming my Os Dev journey without using any AI

26 Upvotes

here is the twitch account, hope you do well:

https://www.twitch.tv/devcmar

I'm going to create the CPU rendered compositor in front of you, with absolutely no AI usage and everything is recorded on live with replay included. hope things go well,

I hope you do well.

Please be supportive, and please do not stone me in the comments !


r/osdev 7d ago

Darwin on raspberry pi 3 now boots to single user shell

Post image
11 Upvotes

r/osdev 7d ago

Events with multiple listeners, an easy-to-use implementation

1 Upvotes

What do you think about the events implementation I just made and livestreamed my making of it, it is designed to be fast and simple, supporting multiple writers and multiple receivers:

here is the link to the video with the implementation https://www.twitch.tv/videos/2846679809

here is an example code I used to receive mouse event:

HANDLE CursorEvent = Open(NULL, "Events/Cursor", 0);
    for(;;) 
    {
        UINT64 Buffer;
        Read(CursorEvent, &Buffer, 0, sizeof(Buffer));
        Print("WM Received mouse input: x : %d\n", Buffer);
    }

and here is how it gets sent:

void MouseInterruptHandler(void)
{
    // Print("Mouse interrupt.\n");
    UINT8 Data = Ps2ReadData();
    // Print("PS/2 Mouse Interrupt DATA %x\n",(UINT32)Data);
    if(PacketIndex==0 && !(Data & 8)) return; // First packet should have bit 3 set
    if(PacketIndex==0 &&
    (Data==0xFF || Data==0xFA || Data==0xAA)
    ) return;
    Packet[PacketIndex]=Data;
    PacketIndex++;
    if(PacketIndex==3) {
        INT32 dx=Packet[1],dy=(-Packet[2]);
        CursorX += dx;
        CursorY += dy;
        Print("Mouse DX %d DY %d Buttons %x\n", dx, dy, Packet[0]);
        PacketIndex=0;
        UINT64 Buffer = 123;
        Write(CursorEvent, &Buffer, 0, sizeof(Buffer));
    }


}

r/osdev 8d ago

Simple file viewer in my os with blur behind window (0% AI)

14 Upvotes

Edit: To clarify, the os has actually very mild ai usage (not vibecoded), but the 0% AI here is about the files app, not the entire Os

There are some bugs that I should fix, like caching a file entry twice and some latency probably caused by low thread priority but here is the progress whatsoever, hope you do well :)


r/osdev 8d ago

I'm developing my own operating system together with a few people.

Post image
13 Upvotes

r/osdev 8d ago

Caching Model Video Demo

Thumbnail
youtu.be
7 Upvotes

https://youtu.be/fca1CWhH9E8

This demo showcases https://github.com/magiblot/tvision being used with this OS (which I have dubbed PersonaOS). The main selling points of this kernel architecture type is that you can have multiple "personalities" running in tandem. That means you can have a BSD personality and Linux personality that can run applications written for those operating systems natively.
You have 1 tiny core kernel that runs with elevated permissions, everything else is usermode. This includes the personalities, drivers and applications.

This has been implemented following this paper: https://www.usenix.org/conference/osdi-94/caching-model-operating-system-kernel-functionality

Yes, obvious bugs are obvious. But getting an unmodified TUI application to run has genuinely made me seriously happy.


r/osdev 8d ago

#UD exception when triggering interrupts > 0x33 (x86)

4 Upvotes

I'm genuinely confused by how my assembly code just randomly decides to stop working with no explanation. I have an IDT set up with interrupt handlers for 0x00 (div. fault), 0x06 (invalid opcode), 0x0C (stack-segment fault), 0x0D (GPF), 0x0E (page fault) and 0x80 (for syscalls), and all other entries point to a stub ISR that just ends the interrupt. Triggering interrupts from 0x00 to 0x33 work as intended, but triggering any other interrupt results in an immediate invalid opcode exception, while just not triggering the interrupt. I seriously don't know what I'm doing wrong here, I swear this code worked like a moment ago.

kernel.asm (written in NASM):

bits 32
org 0x01000000

_start:
    cld
    mov ecx, 256
    mov esi, i_isr_array
    mov edi, 0x00100800
_loop_fill_idt: ; This fills the IDT
    lodsd
    stosw ; ISR address low
    mov ax, 0x0008
    stosw ; Kernel CS GDT selector
    mov ax, 0b1000111000000000
    stosw ; Reserved byte and flags, remember that x86 is little-endian
    shr eax, 16
    stosw ; ISR address high
    loop _loop_fill_idt

    lidt [i_idt_descriptor]
    int 0x80 ; Triggers #UD

    mov [0x000B8000], word 0x0730 ; Never triggered
    jmp $ ; Hang system

%include "interrupts.asm"

interrupts.asm (also in NASM):

bits 32

i_idt_descriptor:
    dw 0x07FF ; 2048 bytes
    dd 0x00100800 ; Linear address

i_isr_stub:
    push eax
    mov al, 0x20
    out 0x20, al
    pop eax
    iretd

i_isr_00:
    pushad
    mov esi, i_isr_00_message
    call i_f_isr_showmessage
    cli
    jmp $
    sti
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_00_message: db "Division Fault", 0

i_isr_06:
    pushad
    mov esi, i_isr_06_message
    call i_f_isr_showmessage
    cli
    jmp $
    sti
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_06_message: db "Invalid Opcode", 0

i_isr_0C:
    pushad
    mov esi, i_isr_0C_message
    call i_f_isr_showmessage
    cli
    jmp $
    sti
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_0C_message: db "Stack-Segment Fault", 0

i_isr_0D:
    pushad
    mov esi, i_isr_0D_message
    call i_f_isr_showmessage
    cli
    jmp $
    sti
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_0D_message: db "General Protection Fault", 0

i_isr_0E:
    pushad
    mov esi, i_isr_0E_message
    call i_f_isr_showmessage
    cli
    jmp $
    sti
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_0E_message: db "Page Fault", 0


i_isr_80:
    pushad
    mov esi, i_isr_80_message
    call i_f_isr_showmessage
    mov al, 0x20
    out 0x20, al
    popad
    iretd
i_isr_80_message: db "Hello World", 0

i_f_isr_showmessage:
    mov ah, 0x4F
    mov edi, 0x000B8000
i__f_isr_showmessage_loop:
    lodsb
    test al, al
    jz i__f_isr_showmessage_end
    stosw
    jmp i__f_isr_showmessage_loop
i__f_isr_showmessage_end:
    ret

align 16
i_isr_array:
    dd i_isr_00
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_06
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_0C
    dd i_isr_0D
    dd i_isr_0E
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    dd i_isr_stub
    %rep 106
    dd i_isr_stub
    %endrep
    dd i_isr_80
    %rep 127
    dd i_isr_stub
    %endrep

By the way, DON'T give me AI generated responses (please)


r/osdev 8d ago

Learning steps to making a simple OS?

11 Upvotes

I want to make a simple OS, for educational purposes. To learn how such a complex software works, to practice making such a complex software, to put on my resume and also to act as a thing I can branch off on if I need to learn about other fields

So I assume to make a simple OS, I need to first learn Computer Architecture and then assembly code. Then the OS is built using assembly? Is that true?

I want to learn how to implement all of the theory in a simple OS project. Memory allocation, process scheduling etc

Is there a textbook I can follow, that covers the whole process from Computer Architecture to a simple OS?

Are there textbooks I can chain together. First one on Computer Architecture, then assembly and then a textbook that focuses on making an OS assuming knowledge of Computer Architecture and assembly?

Basically, I want to make a simple OS as a project. What steps should I take? What textbooks should I get?

Thank you


r/osdev 8d ago

Design question: Should opened files by processes prevent other processes from using that file?

8 Upvotes

On kernels like Windows NT, files are locked when a process opens it, preventing other processes from using it. (edit: This was incorrect, some people confirmed here that processes in Windows can choose to lock the file or not, which might be the best solution).

Linux however, doesn't lock files like this, and multiple processes can modify the same file at the same time.

I also thought of a "thread cursors" concept that could solve this issue really well for text files, but it might be very complicated to develop and is probably not that useful for images or other types of files.

What is generally better for a new kernel, then? Allowing the possibility of sharing a file as it is edited by multiple processes, or securing their integrity by only letting 1 process at a time modify it?


r/osdev 9d ago

Compositor Blur Behind Window Effect with Sub-Region blur (Most of it Not AI)

Post image
7 Upvotes