Page 1 of 2
I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 12:50 pm
by Robbert
Hey,
I am quite new in the world of OS programming. I already started with VB 6.0 Proffesional but that is to easy for you guys I think
I already created something simmular like word, exel and powerpoint in VB 6.0, per programm it cost me over 5 months but hey they work ;D
Now I have all those things (an simmular MS Office, a notepad, a calculator and ofcourse 4 small games) I want to create my own OS. I wred the faq and I saw that it is quite a job to do. So I want to know were I have to start, if I know that I know what to do, for like 20 years
.
Thnx for reading.
Ps: I am dutch so don't mind the "broken" english.
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:12 pm
by x_man
your experience on writing an application program won't work good with os. it's far from the application programming. if u start with a boot loader, probably, you won't complete the os. so, start writing ur os from kernel (you can use GRUB as ur boot loader).
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:19 pm
by Robbert
thnx, I've already downloaded bootloader, so I started alright I think. But now I want to know in what kind of language I have to write my kernel,
maybe you know a website with a toturial ore some information about it. I already wred the whole FAQ @ mega-tokyo.com.
Ps: Very good FAQ ;D My compliments to the writers
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:33 pm
by x_man
To write ur kernel, use assembly and C.
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:35 pm
by BI lazy
ou ou ou mr. robbert, althou' I'm a real Austrian, I rather tend to threaten the language I use with care to avoid being misunderstood. In this context, being dutch or what ever is no excuse for words like "wred", which my internal defuscator (no, I don't say
legillimens, so no need for occlumency or similar stuff *gg*) translates to "read" - past perfect. Maybe your keyboard has the false settings so that you, whilst writing 'read' blindfold get 'wred'? But 'simmular' ... yeah, the nearest approach my internal defuscator brings up is 'similar'
. So, stick to the dictionary.
where to start? Some sort of printing functions and a set of list manipulating functions for data structures like linked lists and binary trees. After having these tested to some extent, go ahead and learn some assembler. You 'll need it for the lowlevel stuff, plenty of which you can read about at
www.osdever.net.
stay safe
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:38 pm
by Robbert
Ok thx I will check it out
Ps: I will follow an english course to write my OS manual
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 1:54 pm
by Pype.Clicker
and i would say the next step will be to search for a good book about OS theory (see the "book recommandation thread", Andrew Tannenbaum's one is quite a must ;D ), and another good book about PC hardware (i recommend Michael Tischer's "PC Bible")
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 2:12 pm
by Robbert
At least you guys don't react so wird like my friends on msn messenger. They say: You can't beat microsoft or Linux.
But they just do not understand that this is a learning process. It can learn me how to build a OS and later on when I have a job I can build for my boss an OS if he wants one, It will cost him ofcourse
But do you know if those books are avalible world wide? If they are I will buy them when I am not broke any more
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 2:19 pm
by Pype.Clicker
Robbert wrote:
At least you guys don't react so wird like my friends on msn messenger. They say: You can't beat microsoft or Linux.
They're quite right: you can't (in your actual situation) beat them. But i don't think it's necessary to be able to beat them in order to start an OS
But do you know if those books are avalible world wide?
They should be available worldwide, and you should be able to find a copy of Tannenbaum in Dutch as Andrew Tannenbaum
himself is Dutch (though he might be teaching in english ...
)
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 5:27 pm
by Ozguxxx
Hi, I am just not comfortable about people's attitude on grub. I mean, they surely can do in whichever way they want but, I think grub is just a very proffesional bootloader that is implemented as an open source and that is multiboot compliant, I think using it for loading basic kernels is like putting a supercharger on a very old automobile. people should not be discouraged to write their own bootloaders, at least they should try to do it, I think. Also for a beginner (like me) a very simple bootloader is enough, and a very simple one loading a kernel from a fat12 disk can be found on net, also I think a link is given to its source previously here. Anyway... When we try to write a bootloader, we can see how painful can os development can get but on the other hand a lot of basic questions about assembly programming can be answered while we are trying to do it. In my humble opinion, DEFINITELY start with trying to write your own bootloader and if you really get stuck and you think that you impossibly cannot go on I suggest you to move on gurb way because if you just start using grub, it is a too easy way and you might get exhausted in later stages. BTW, if you try really hard, you can get out of this bootloader thing with anything you wanted correctly accomplished. Also if you go in that way, dont ask questions about bootlader here, because people just dont like these, and usually dont discuss bootloader thingz here...
(which I dont really understand and dont really appreciate.)
Re:I want to build an OS, but were do I have to start???
Posted: Thu Sep 11, 2003 10:01 pm
by Solar
On the other hand: The stuff a bootloader can and must do is quite limited. How many ways are there to read the partition table, select a partition, boot that partitions bootsector, read the memory map, boot the kernel image, switch to protected mode, start the kernel image?
If you don't have the stamina to complete your project, it doesn't really matter where you fail, and with the bootloading process out of the way, you might actually learn some stuff that isn't related to the very low levels of early startup - which you wouldn't ever need again unless you return to write another bootloader.
But more important "pros" are: GRUB allows me to use plain ELF files instead of fiddling around with flat binaries, which I can just compile & drop into an arbitrary directory on my hard drive and boot from there (i.e., no running "lilo" or setting sector info in the bootloader); I can use GRUB to chain-load whatever other OS I have on the system; and when my OS is done I don't have to force people to install yet another bootloader.
It's a matter of taste. But I consider writing your own bootloader to be in the same department as writing your own language or compiler: Sure it might be fun and educational, but it's hardly efficient.
Re:I want to build an OS, but were do I have to start???
Posted: Fri Sep 12, 2003 1:23 am
by tom1000000
Grub is fine, but only if you want to limit yourself to pre-existing standards.
What if you want to create your own executable file format?
What if you want to create your own filesystem?
In both cases I'm guessing GRUB is useless. You will need to write your own bootloader.
Also, if you can't work your way through a bootloader, then you've got no chance of getting through all the hurdles writing an OS will throw at you.
Re:I want to build an OS, but were do I have to start???
Posted: Fri Sep 12, 2003 1:36 am
by Solar
tom1000000 wrote:
Grub is fine, but only if you want to limit yourself to pre-existing standards.
Standards are not in themselves evil...
What if you want to create your own executable file format?
GRUB can load it via the "a.out kludge", unless you go great lengths to make your format incompatible.
On the other hand, that means you are building your own assembler / compiler backend anyway...
What if you want to create your own filesystem?
Write a stage 1.5 for GRUB and all is fine.
In both cases I'm guessing GRUB is useless. You will need to write your own bootloader.
So you judge what you don't know, because GRUB would not be useless at all.
Also, if you can't work your way through a bootloader, then you've got no chance of getting through all the hurdles writing an OS will throw at you.
I am sure I could, but why should I bother if the work is already done for me? I stepped up to the plate because I thought existing OS are crap, not because I thought existing bootloaders are...
It's all a matter of taste. But using GRUBor not isn't a sign of weakness, it's a sign of different priorities.
But this isn't a thread on bootloaders, now is it?
Re:I want to build an OS, but were do I have to start???
Posted: Fri Sep 12, 2003 1:38 am
by Pype.Clicker
What if you want to create your own filesystem?
i wouldn't say GRUB is useless in that case. First because you can decide that your own filesystem will have a reserved area to put things for /boot and give the sectors list to GRUB, which it will handle fine.
Second, GRUB can be augmented with modules-like filesystem readers:
Code: Select all
/home/pype> l /boot/grub/
device.map jfs_stage1_5 pxegrub vstafs_stage1_5
device.map.old menu.lst reiserfs_stage1_5 xfs_stage1_5
e2fs_stage1_5 menu.lst.old stage1
fat_stage1_5 minix_stage1_5 stage2
ffs_stage1_5 nbgrub stage2.netboot
What if you want to have your own executable format ?
Grub doesn't prevent you from having your own format
for appliactions, or shared libraries or even kernel modules.It just allow you to use existing format for the kernel. If you don't need it, just use a flat binary for the kernel and GRUB will handle it fine ...
But what would a new format for kernel be useful for ?
Re:I want to build an OS, but were do I have to start???
Posted: Fri Sep 12, 2003 7:16 am
by Robbert
hmmz thnx for the extra information but I thing i will just use a NTFS 5 file system.
I want to build an OS which has the oppertunity to communicate with Windows, Linux(includes debian, unix, etc.), apple, etc. So that you can install a windows XP proffesional on an OS witch also has a Linux "word". It also has to be able to connect to a windows network and a Linux network.
So my OS has to be able to communicate with Windows and Lunix and all the other OS's in the world. In that way it maybe will be handy. But how should I do that, Windows uses FAT, FAT32, NTFS4/5 as far as I know. An Linux uses something else, or doesn't that really matter, do I have to build some wird patch who makes it possible to let Windows communicate with Linux??
Ps: I am done with the bootloader and with the whole kernel. But Now I have to know what I have to do to make all this possible