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
https://en.wikipedia.org/wiki/Linux
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.
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
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!