How much time would it take to make an OS from scratch?

  • Thread starter Deleted User
  • Start date
  • Views 1,595
  • Replies 9
  • Likes 1
D

Deleted User

Guest
OP
i dont mean something fully featured like windows or linux, just something crude that will boot, even if after doing so it has little to no practical aplication
 
  • Like
Reactions: Subtle Demise

depaul

Well-Known Member
Member
Joined
May 21, 2014
Messages
1,293
Trophies
0
XP
2,952
Country
France
Most custom OSs are based on Linux Kernel. It's open source and documentation is available everywhere.

There are some recovery software like Hiren that can boot into a Windows like OS. I don't know how they do it maybe it's some version of Linux or Windows PE.
 
Last edited by depaul,
D

Deleted User

Guest
OP
you probably could get something rudimentary in like a day, if you're looking at something like a commandline based os like dos or something, something with a gui would probably take much longer
nice to hear
Most custom OSs are based on Linux Kernel. It's open source and documentation is available everywhere.

There are some recovery software like Hiren that can boot into a Windows like OS. I don't know how they do it maybe it's some version of Linux or Windows PE.
i meant it as something more of a self imposed challenge than something i'd actually use, the linux kernel would defeat the idea of being entirely from scratch though
 
  • Like
Reactions: depaul

tech3475

Well-Known Member
Member
Joined
Jun 12, 2009
Messages
3,659
Trophies
2
XP
6,046
Country
You can never really say how long it will take, especially if you’re new to it, the target platform, languages, etc.

I thought writing a basic Arudino project would be easy, but it quickly became more difficult, but doable. So a 1 day project became a few days.

One option may be to look at a device which is tailored to this like an RPi, etc. Perhaps using Linux as a reference to initialising, etc.
 

E1ite007

wierd avatar guy
Member
Joined
Nov 19, 2016
Messages
1,028
Trophies
1
Location
Itchy & Scratchy Land
XP
2,742
Country
Mexico
I'm guessing you could do something pretty basic with an already created boot loader like all of these, and creating your own kernel... it could even boot to a text string that reads the classic "hello world", and this would take to make even one day if you have experience creating code.
Now, if we're talking about creating a CLI OS (command-line interface operating system), it would take years since you would have to understand the inner working of I/O functions, processes, datastructures, hash tables and hash maps, memory management, app development, and so on.
In any case, you could use OSDev.org to have a guide on how to do it.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Will have to vary with what features you want.

The time tends to be taken

Supporting weird and wonderful hardware that might be plugged into a given system. If your system does not have anything and is all soldered as one (quite possible -- see most "embedded systems" ever) then you dodge that bullet.

Providing means of accessing things so the program authors for your system. Having Johnny just about fumbled through Java school having to write an entire TCP-IP stack to have a little application upload the results to a website is not going to end well. Don't have TCPIP or are willing to say "you do it" to your devs... makes life easier.

Supporting multiple programs. In X86 world this would be real vs protected modes, though there are quirks like TSR aka terminate and stay resident and the option to chain things together by writing to storage between things. Virtual memory, isolated memory, kernel vs user space, and the like, especially if the base hardware does not support it, then making things fun.

Possibly extending functionality of the system. For instance if the system does not support floating point you then do a software implementation of it. Normally in embedded systems this is the job of the BIOS or maybe a firmware but if playing OS dev this is also within your purview.

Supporting some of the more exotic program formats.
Microsoft's PE format (hence tools like PE explorer that pull apart Windows programs and dlls) normally seen in exe and dll, though stuff like xex and xbe for the various members of the xbox family might be familiar if you have knocked around this sort of site for a while is probably what most use. In Linux world and other aspects of homebrew world then ELF is what most would be looking at. https://linuxhint.com/understanding_elf_file_format/

Making a robust API to allow programs to do their job. Kick it all to the program dev and you spare yourself some hassle.

Linux or BSD is where most would look to do anything practical, though I could see some of the Windows kernel stuff in the various reimplementations of it (see ReactOS for but one example https://reactos.org/). If you are doing it to understand something more then might instead be worth looking at minix https://www.minix3.org/ )

More generally if you have ever played ROM hacker for a system and are used to pulling data from various memory addresses, or have otherwise coded in assembly you could probably get some useful experience in something by playing around. If you have not done any of that you might want to start out playing with some assembly ( https://www.plantation-productions.com/Webster/ https://stuff.pypt.lt/ggt80x86a/asm1.htm ).
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,077
Country
United States
Most custom OSs are based on Linux Kernel.
That's not a custom OS, then. It's still Linux. You're thinking of a distribution, which is a collection of packages that run around the Linux kernel. Think Android ROMs. They're custom, but they're all still Android.

@OP, how well do you know machine code? Sparrow/TempleOS is probably the best example of a truly independent OS written by a crazy dude from his bedroom. It's the only 64bit OS that can run entirely from RAM, and the dev worked on it for several years before he died.
 
D

Deleted User

Guest
OP
That's not a custom OS, then. It's still Linux. You're thinking of a distribution, which is a collection of packages that run around the Linux kernel. Think Android ROMs. They're custom, but they're all still Android.

@OP, how well do you know machine code? Sparrow/TempleOS is probably the best example of a truly independent OS written by a crazy dude from his bedroom. It's the only 64bit OS that can run entirely from RAM, and the dev worked on it for several years before he died.
oh, i have 0 experience in assembly, i meant it more as a "hey, here is this random thing not many have asked, might as well post it"
 
  • Like
Reactions: Joom

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Least they got head in the end