Discussion in 'General Linux' started by vishnu joshi, Mar 15, 2017.
i need to program an operating system....where should i start and what should i start with?
This isn't a trivial thing that you are asking and there is no simple answer.
Can you provide any more specific information about the operating system you claim that you NEED to program?
What kind of hardware is it going to run on?
Is it a general OS for PC's/laptops? Or phones/tablets? Or is it an embedded OS for a device - e.g. a washing machine, a car, a home-made device based on an Arduino board? Or a Raspberry Pi? Or your own custom circuitry?
What types of processors/architectures should it support?
Do you plan to write your own bootloader, kernel, userspace etc? or do you want to use existing ones?
Without a clear idea of what you aim to achieve, there is no simple answer.
The simplest way of creating your own OS would be to perhaps look at building your own Linux distro from scratch using the 'Linux from scratch' project:
Or perhaps consider installing and modifying a version of some other pre-existing Linux or BSD based OS. There are many Linux and BSD distros available for many specialised purposes.
Otherwise, if you want to do something involving a bit more coding - you might want to take a look at MikeOS - which is a very simple, complete 16-bit OS written completely in assembly language. It has a very simple architecture - a simple bootloader and a very bare-bones kernel and userspace, but it does require you to either know, or learn assembly.
MikeOS itself isn't particularly useful as an operating system, it's really only useful for educational purposes. But if you study the source-code and download and read the extensive documentation it will help you to understand how an operating system is constructed. So building and installing MikeOS should hopefully give you an idea of things that you will need to consider when creating your OS. The MikeOS website has links to some other similar projects and tutorials that can help when trying to create your own OS.
There are tons of books and tutorials all over the web, aimed at OS development. But again, without knowing what kind of OS you want to build, it's hard to make any solid recommendations.
Whatever happens - if you intend to create your own OS completely from scratch and without basing it on an existing OS, you will need to reference a LOT of different material and have a very wide skill-set. There are lots of things to bear in mind.
Alongside a good understanding of basic computer science, you'll need:
- Full technical documentation/specs for whatever processors you intend to support.
- Technical specs for any other hardware devices that will be used in the object you are creating an OS for, because you are eventually going to need drivers for those devices.
- If you don't have documentation available for a particular device, you may also need to do some reverse engineering in order to determine how things work. So some knowledge/skill with reverse engineering would also help.
- You should also be aware that most technical documentation will be in English, so you will need to ensure that you have a very good understanding of the English language.
- Before even attempting to create an OS, you should be familiar enough with the programming languages you will be using that you can create and debug complex programs.
- You will also need to be inimately familiar with the compiler you will be using to build your OS and be able to understand any errors/warnings it might throw.
- You may also need to use a cross-compiler in order to build binaries for the target hardware, so knowledge of cross-compilation will also help.
There are probably other considerations, but that was just off the top of my head.
Perhaps take a look at the osdev.org website?
Whatever you decide to do, good luck!
I'm still a rookie in programming....I hav an arduino uno and 2 psoc boards(3 and 5)...
Separate names with a comma.