Page 1 of 1
library for OS development
Posted: Mon Mar 10, 2008 7:19 am
by devel
Hi there,
months ago I was looking for some kind of libraries or header files that could
speed up my OS development process. To be more precise I expected code
that exposes cpu's and various controllers' capabilities (written in assembler
or high level language (like C/C++)) which I can use in my OS.
Well I did not find any.
You may say see other OSs how they do and copy but I do not think it is a good
approach.
For example I would like to use i/o ports, check whether CPU has cpuid capability,
setup GDT, ... . I think in general all these kind of hardware routines could be
written once and distributed in libraries and header files then everybody can
take advantage of it.
Therefore I've started development on this a few months ago and I've got some
base. But before I finish and release something I would like to know yours opinion.
What do you think does it make a sense to develop these kind of libraries (advantages,
disadvantages, obstacles, ...)?
Regards,
devel.
Posted: Mon Mar 10, 2008 7:25 am
by Solar
You mean something like
OSLib?
Posted: Mon Mar 10, 2008 7:39 am
by devel
yes. is this project still alive? seems to be dead project
Posted: Mon Mar 10, 2008 8:24 am
by Solar
Don't know really; I remembered it from back when I did research for my own OS project.
Posted: Mon Mar 10, 2008 8:37 am
by devel
thnx for link anyway ... I should RTFG properly next time
...but as far as I know myself I would never start investigating in
OS development in that case so maybe it is better I did not
find that project site
Ok but what do you think about the idea itself? Did you take
advantage of that library anyway?
regards,
devel.
Posted: Mon Mar 10, 2008 8:59 am
by Solar
No I didn't, for various reasons. I consider it a requirement to really understand what's happening at the low level (instead of using preboiled functions); and once you've understood things, implementing them is a breeze really.
Back then, I didn't like some of the stuff I found while browsing through the standard lib (shortcuts / incompleteness), and the license was a complete show-stopper for me.
As always, your mileage might vary.
Posted: Mon Mar 10, 2008 9:42 am
by Assembler
Mine too.
I'm working now on a sparc32 port.
Posted: Mon Mar 10, 2008 12:02 pm
by devel
maybe you can try your OS with mine library then
regards,
devel
Posted: Thu Mar 13, 2008 2:16 pm
by narke
I think that this kind of project is useful since it lets people to experiment ideas without reinventing the wheel. Moreover, I think that if a newbie can build his basic kernel with a kit he will be more motivated to investigate in the os devel.
Posted: Thu Mar 13, 2008 2:21 pm
by Alboin
narke wrote:I think that this kind of project is useful since it lets people to experiment ideas without reinventing the wheel. Moreover, I think that if a newbie can build his basic kernel with a kit he will be more motivated to investigate in the os devel.
Quite the opposite here. (In fact, I'm not much of a pro-noob person myself.) osdev will always be dirty, on every level of its construction. There is no 'pretty' osdev. It's all ugly, from the lowest level to the highest. You won't always have motivation, you won't want to do things, but you must. Where's your kit then? Kits are, IMHO, bad, because they do not teach perseverance.
Then again, we're off topic.
Posted: Thu Mar 13, 2008 3:28 pm
by narke
I think that your are right in some way but the plus of a kit is that it allows you to understand ideas without reinventing the wheel.
If you have not much time to code drivers you can use them from a kit (there is no much to invent because most of drivers are implemented from specs).
Posted: Thu Mar 13, 2008 3:36 pm
by jerryleecooper
If you make an operating system for the x86 hardware, your intention is to reinvent the wheel. There's no point in cheating about that, cutting corner to pretend possessing intellectual property about controlling a PC? No thank you.
My operating system is all mine, I made it.
Those who don't want to implement everytinig in the makiong of their operating system don't value their work (see the irony?) and don't value the sacred rights given as copyright to the holder of the IP of their OS. They are just POSERS.
Posted: Thu Mar 13, 2008 6:34 pm
by bewing
I am on the fence, myself. Yes, it is important that the code in your OS be your own. It is important to understand why the grubby details were done the way they were. Otherwise you will reinvent many mistakes, along with your wheel.
(and as an inventor myself -- reinventing wheels is a fairly good idea sometimes, and absolutely necessary other times)
HOWEVER, it really is just not good enough to start coding as fast as you can, and still know that your semi-functional OS goal is 2 to 10 years away (or more). It is not good enough to have to spend 2 months trying to get each of 50 drivers working. We need some tools, and we really need some better OS building tools than the ones we currently have.
A compiler is a tool. A text editor is a tool. The development OS that you are using is a tool. A wiki entry is a tool. And a software kit is a tool.
If you want to be a purist about how you created your OS all by your lonesome, then get rid of ALL your tools, and code your OS in machine language, by writing bytes onto a disk with a hand magnet.
As this site is built, and more info becomes easily available here, maybe this site will turn into that tool, that we need in order to create an OS in a humanly reasonable amount of time. But an OS software kit is not an incarnation of evil.