Custom operating system

If this is not allowed here please tell me as some of the rules are vague
So, what if everybody here worked together to make an operating system.I will edit this with the info we put together
Name:
Contributors: Link327,
Software:
Download link:
Based off of:
Notes:

Comments

  • edited March 2020

    I know Linux is a thing. It will be using the Linux kernel, but the UI will be new. Or we could make a new everything completely from scratch

  • I understand the sentiment, but making a new operating system from scratch is a monumental undertaking and there are already so many great alternatives that it's just not worth it unless you want to do it as a learning exercise.

    If you want to make an OS, I'd recommend starting by targeting a specific hardware platform, like a Raspberry Pi.

  • I mean, there is a (quite old) tutorial on git-hub. This can be used to start. I mean, you have to be running a unix based system to do this, because you'd be at a loss on what to do since the instructions are for MacOS or Linux. Anyways, you need to make the bootsector, which should be 512 bytes at the last two bytes, the bios looks for a specific address (55aa). This will tell the bios that this drive is bootable, and will execute the code there. If you are interested in doing what I just said in C, don't. Up untill the point of the kernel, you are using ASM.

  • I really don't mean to sound like an elitist, especially since I do bare metal programming myself, but making an actually usable modern OS from scratch is like building a skyscraper by yourself. It is extremely time consuming. At most, hobbyist OSs usually reach the level of DOS, but anything more is a real challenge. Things like SerenityOS (or the more usual example, GNU/Linux) involved thousands of volunteers, and others that were in fact designed by one person entirely like TempleOS took nearly 10 years to be completed. If you're willing to take that challenge, more power to you. Actually, the truth is writing an x86 bootloader and subsequent minikernel isn't hard, anyone who knows basic x86 assembly and C/C++ (or hell, any other language that has low level flexibility like Pascal) could do it. What's hard is then taking that, and building the subsequent enviroment to build your OS off. Things like a libc, interrupt routines, signal system, system calls, graphical interface, permissions, a filesystem (unless its something relatively simple like FAT), etc. A team with enough time and effort can pull this off. For a single person, it requires some serious dedication.

    One resource I heavily recommend if you're going into anything relating to bare metal x86 programming is the osdev wiki and forums:
    https://forum.osdev.org/
    https://wiki.osdev.org

    To write an x86 bootloader, you should first be familiar with the 16 bit API that all standard-compliant x86 BIOSs have, and how to use that to create a 512 bytes or less large bootloader which then can load in a kernel in 32 or 64 bit protected mode. Or, you could go the DOS route and stay in 16 bit real mode (or unreal mode, which is the same thing but with 4gb of extra RAM) and still have relatively free access to the 16 bit BIOS interrupts so that you don't have to write your own. But if you want to take full advantage of the hardware then, yeah, go 32 or 64 bit. Once the bootloader can jump to kernel code, you can then make the kernel routines which are called in a kmain() usually and then pretty much just do everything else in something like C/C++ (although with some inline asm at certain instances).

    Ralf Brown's interrupt list
    https://www.cs.cmu.edu/~ralf/files.html

    https://wiki.osdev.org/Real_Mode

    https://wiki.osdev.org/BIOS
  • It would be interesting seeing a custom OS. You guys could also make a DOS-type OS, or other kind of OSes for Vintage computing too.
  • edited March 2021
    As a programmer myself, I found Cosmos useful. It handles the bootloader for you, and you can write a console os pretty easily (if you know c#)

    Here is a piece of code you can base commands off of:

    using System; /* allows you to make things in terminal (works without a terminal app too) */
    using System.Diagnostics; /* can be used for starting files (Process.Start("exename.exe);)
    using System.IO; /* can be used to display hdd info (storage, drive letter) */
    using System.Threading; /* can be used for pausing a command for a certain amount of time (in ms) */
    class MainClass {
    public static void Main() {
    string userInput;
    userInput = Console.ReadLine();
    *if (userInput == "command name")
    {
    Console.WriteLine("this is a command");
    Thread.Sleep(1000);
    Main();
    *}
    }
    }

    just copy the stuff in the stars, change the command name, give it some functions, and you're good to go!
  • If your goal is to change the UI then you should not work on an operating system. Writing an operating system is mostley about writing drivers not fancy graphics.
  • Hello, I think it is a good idea to use the Linux Kernel, You could also use a distribution that I know, Ubuntu or Kali or others that exist, if it is still standing that I would like to do, I have 2 drawbacks 1. I don't speak English Very fluid 2. I don't know C, only Java although it would be good to learn.
Sign In or Register to comment.