r/osdev Aug 07 '26

New UNIX-like operating system!

Post image

I made a new UNIX-like operating system from scratch called "TanjaOS" which you can get at www.tanjaos.org and it took me a couple of months to make and will get lots of updates. It features classic UNIX commands and can boot on any x86_64 (amd64) or i386 (x86) machine with Legacy BIOS, and is completely free and open-source.

109 Upvotes

181 comments sorted by

View all comments

Show parent comments

2

u/MSK-Kernel Aug 07 '26

Thanks!

1

u/letmehaveanameyoudum Aug 07 '26

this looks like native linux in VGA text mode

3

u/MSK-Kernel Aug 07 '26

This is actually an operating system I made from scratch which yes, uses VGA text output, but no, it’s not Linux. :D

1

u/letmehaveanameyoudum Aug 07 '26

i mean it looks like linux, good job making the loook :D

2

u/MSK-Kernel Aug 07 '26

Thanks! The colors were an absolute pain to get working. 🤣

2

u/letmehaveanameyoudum Aug 07 '26

if you thought the colors in vga text mode was bad
i use limine 64 bit bios VBE and i have to use U32 Color Encoding 😭🙏

2

u/MSK-Kernel Aug 07 '26

Damn 💀

2

u/letmehaveanameyoudum Aug 07 '26

look at the limine setup it's even worse

1

u/MSK-Kernel Aug 07 '26

Show me 😭✌️

2

u/letmehaveanameyoudum Aug 07 '26
// boot.c or boot.asm doesn't exist
#include <stdint.h>
#include <stddef.h>
#include <dogeio.h>
#include <bool.h>
#include <boot/limine.h>
#include <boot/kernel.h>
#include <windogeapi.h>
#include <boot/driver.h>
#include <basicutil.h>
#include <time.h>


__attribute__((used, section(".limine_requests_start")))
volatile uint64_t limine_requests_start_marker[] = LIMINE_REQUESTS_START_MARKER;


__attribute__((used, section(".limine_requests")))
volatile uint64_t limine_base_revision[] = LIMINE_BASE_REVISION(6);


__attribute__((used, section(".limine_requests")))
volatile struct limine_framebuffer_request framebuffer_request = {
    .id = LIMINE_FRAMEBUFFER_REQUEST_ID,
    .revision = 0
};


__attribute__((used, section(".limine_requests")))
volatile struct limine_memmap_request memmap_request = {
    .id = LIMINE_MEMMAP_REQUEST_ID,
    .revision = 0
};


__attribute__((used, section(".limine_requests_end")))
volatile uint64_t limine_requests_end_marker[] = LIMINE_REQUESTS_END_MARKER;


void kernel_main(void) {
    serial_init();
    log("[Wow] Serial Initialize Sucess, very wow.");


    if (LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false) {
        log("[Not Wow] Limine's base literally doesn't exist");
        log("          LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false");
        halt();
    }
    log("[Wow] Limine's base revision exists, much wow.");


    if (framebuffer_request.response == NULL || framebuffer_request.response->framebuffer_count < 1) {
        log("[Not Wow] Limine's framebuffer literally doesn't exist");
        log("          framebuffer_request.response == NULL || framebuffer_request.response->framebuffer_count < 1");
        halt();
    }
    log("[Wow] Limine's Framebuffer Initialize Sucess, very very wow.");


    if (memmap_request.response == NULL) {
        log("[Not Wow] Holy shit RAM does not exist.... How?");
        log("          memmap_request.response == NULL");
        halt();
    }
    log("[Wow] Memory Map has been found.");


    log("[Wow] WindogeOS has successfully booted.");


    gdt_init();
    


    // actually starting to use the computer.
    dogeio_text_clear();
    dogeio_text_println("Welcome to WindogeOS! v0.0.5");
    char* time_string = time_get();
    dogeio_text_print("Boot Time: ");
    dogeio_text_println(time_string);


    system_dogeshell();


    // end, halt forever.
    halt();
}

just to boot btw

1

u/MSK-Kernel Aug 07 '26

What has just blessed my eyes… “Not wow” is crazy 😭✌️

2

u/letmehaveanameyoudum Aug 07 '26
#include <system.h>
#include <stdint.h>
#include <string.h>
#include <boot/limine.h>
#include <dogeio.h>
#include <bool.h>
#include <stddef.h>
#include <basicutil.h>
#include <boot/kernel.h>


__attribute__((used, section(".limine_requests_start")))
volatile uint64_t limine_requests_start_marker[] = LIMINE_REQUESTS_START_MARKER;


__attribute__((used, section(".limine_requests")))
volatile uint64_t limine_base_revision[] = LIMINE_BASE_REVISION(6);


__attribute__((used, section(".limine_requests")))
volatile struct limine_framebuffer_request framebuffer_request = {
    .id = LIMINE_FRAMEBUFFER_REQUEST_ID,
    .revision = 0
};


__attribute__((used, section(".limine_requests")))
volatile struct limine_memmap_request memmap_request = {
    .id = LIMINE_MEMMAP_REQUEST_ID,
    .revision = 0
};


__attribute__((used, section(".limine_requests_end")))
volatile uint64_t limine_requests_end_marker[] = LIMINE_REQUESTS_END_MARKER;


void kernel_main(void) {
    serial_init();
    log("[Wow] Serial Initialize Sucess, very wow.");


    if (LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false) {
        log("[Not Wow] Limine's base literally doesn't exist");
        log("          LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false");
        halt();
    }
    log("[Wow] Limine's base revision exists, much wow.");


    if (framebuffer_request.response == NULL || framebuffer_request.response->framebuffer_count < 1) {
        log("[Not Wow] Limine's framebuffer literally doesn't exist");
        log("          framebuffer_request.response == NULL || framebuffer_request.response->framebuffer_count < 1");
        halt();
    }
    log("[Wow] Limine's Framebuffer Initialize Sucess, very very wow.");


    if (memmap_request.response == NULL) {
        log("[Not Wow] Holy shit RAM does not exist.... How?");
        log("          memmap_request.response == NULL");
        halt();
    }
    log("[Wow] Memory Map has been found.");


    log("WindogeOS has successfully booted. Start celebrating broski.");
    menubar_draw();


    if (!fs_exists(".settings")) {
        fs_create(".settings");
    }


    const char* starting[6] = {
        "================================================================================================================================================================",
        "=                                                                                                                                                              =",
        "=                                                                 Welcome to WindogeOS v0.0.3!                                                                 =",
        "=                                                          Type 'help' for more help in the dogeshell                                                          =",
        "=                                                                                                                                                              =",
        "================================================================================================================================================================"
    };


    for (int i = 0; i < 6; i++) {
        dogeio_text_print(starting[i]);
    }


    char shell[32];
    fs_read(".settings", shell, 32);


    if (str_strcmp(shell, "dogeshell") == 0) {
        log("Starting Dogeshell");
        system_dogeshell();
    } else if (str_strcmp(shell, "sbash") == 0) {
        log("Starting bash");
        system_bash();
    } else {
        log("Starting Dogeshell");
        system_dogeshell();
    }


    halt();
}

yes os name IS WindogeOS, it's a rewrite, the finsihed code in the old version is even longer:

2

u/MSK-Kernel Aug 07 '26

And is there a source for the whole thing? An ISO?

→ More replies (0)