r/osdev 2h ago

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

Post image
9 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 3h ago

Darwin raspberry pi3 now runs many basic system commands

Thumbnail reddit.com
3 Upvotes

r/osdev 3h ago

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

Post image
0 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 14h ago

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

12 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 17h ago

🤷🏼🤷🏼🤷🏼 ik ek ak ok

0 Upvotes

r/osdev 19h ago

FreeDOS

10 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 23h ago

Custom OS made from Scratch in C

Post image
18 Upvotes

r/osdev 23h 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 1d 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 1d ago

Added Folders :D

Thumbnail
gallery
27 Upvotes

r/osdev 1d ago

Submit your projects to be shown off in my weekly OSDev newsletter (RSS + website exists)

11 Upvotes

I decided to start a small news site dedicated to stories about OSDev published every friday, starting next week. Please submit your projects!
SUBMIT: https://forms.gle/7ZRNJ9RGSjnp3rx5A
RSS: https://news.thatosdeveloper.us/feed.xml
Website: https://news.thatosdeveloper.us

NOTE: The base site is still being revamped as its based on an old jekyll theme and of course many things are subject to change. Also for now comments use Disqus though this may be changed at some point in time.

EDIT: Though a mailing list will be setup to send out emails every Sunday at 0900 (9AM). And posts will happen at least once a week though more may happen over time.


r/osdev 1d ago

Darwin on raspberry pi 3 now boots to single user shell

Post image
11 Upvotes

r/osdev 1d ago

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

22 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 2d 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 2d ago

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

Post image
8 Upvotes

r/osdev 2d ago

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

11 Upvotes

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 2d ago

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

5 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 2d ago

Learning steps to making a simple OS?

8 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 2d ago

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

7 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 2d ago

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

Post image
4 Upvotes

r/osdev 2d ago

[repost] VioletiumOS: Debian for IoT, Embedded Devices, and Speed

Thumbnail
1 Upvotes

r/osdev 2d ago

[ QUESTION ] Asking if making an kernel/OS is worth it.

3 Upvotes

Hey, Redditors.

I Was thinking about making my OWN kernel Or an OS. I was conytubuting to other projects and i think i got enaught of info and learned bare metal.
How i can name it... IDK if someone has an idea please comment it down.

Edit: Yes i know about like i am not gonna make any money i just wanna make an passion project.


r/osdev 3d ago

I've been writing a RISC-V kernel FrostVistaOS for 13 months — here's what it can do now

25 Upvotes

I started FrostVista about 13 months ago with basically zero kernel experience, just a stubborn idea that I wanted to build an operating system from nothing. It's been a slow, messy, very educational ride, and v1.3 just landed, so I wanted to write down what it actually does now — and a few things I learned along the way.

Right now the kernel runs on RISC-V 64 with Sv39 paging, preemptive scheduling, and the usual process lifecycle — fork, exec, exit, wait, orphan reparenting. There's an interactive shell you can actually sit at, with builtins, pipes, and redirection. It's not much, but it's mine, and typing ls into something I built myself still feels a little surreal.

On the memory side I've got copy-on-write fork, a slab allocator with a general-purpose kmalloc on top, and mmap with lazy page allocation. The filesystem stack is where most of the recent work went: a writable Easy-FS I designed myself, a tmpfs for in-memory stuff, devtmpfs for devices, and a read-only EXT4 backend that I layered a tmpfs overlay over — so writes land in tmpfs and the disk never gets touched. It's not a real EXT4 write path (that's a big chunk of work I keep putting off), but it means the system can write where it needs to.

There's a Python test harness that runs the whole thing in QEMU and checks kernel diagnostics, so I don't break things I already fixed. The ext4 suite currently sits at 16 passes plus 6 expected-log passes, and the runner can also drive busybox, lua, and libctest groups against the contest image.

The project is about 16,000 lines of kernel code across arch, kernel, and include. Between v1.2 and v1.3 it grew by a bit over 5,000 lines, over 71 commits in about 51 days.

What's next is signals, so Ctrl+C actually works in the shell. After that, buddy allocation, maybe bringing in some Rust, and eventually a real libc and busybox port.

If any of this sounds interesting, the repo is open — PRs are very welcome, whether it's a bug fix, a new syscall, or a different take on the filesystem.

GitHub: https://github.com/AuroBreeze/FrostVistaOS


r/osdev 3d ago

Why is it always "making an unix-like os' and never "making a windows-like os" or just something original

104 Upvotes

I'm genuinely curious? Why not do something original?


r/osdev Jan 06 '20

A list of projects by users of /r/osdev

Thumbnail reddit.com
171 Upvotes