library for OS development

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
devel
Member
Member
Posts: 62
Joined: Wed Nov 28, 2007 4:15 am
Contact:

library for OS development

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

You mean something like OSLib?
Every good solution is obvious once you've found it.
User avatar
devel
Member
Member
Posts: 62
Joined: Wed Nov 28, 2007 4:15 am
Contact:

Post by devel »

yes. is this project still alive? seems to be dead project
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

Don't know really; I remembered it from back when I did research for my own OS project.
Every good solution is obvious once you've found it.
User avatar
devel
Member
Member
Posts: 62
Joined: Wed Nov 28, 2007 4:15 am
Contact:

Post by devel »

thnx for link anyway ... I should RTFG properly next time :D
...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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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.
Every good solution is obvious once you've found it.
User avatar
Assembler
Member
Member
Posts: 30
Joined: Fri Oct 27, 2006 5:26 am
Contact:

Post by Assembler »

Mine too.
I'm working now on a sparc32 port.
Systems and Computer Engineering Researcher
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
User avatar
devel
Member
Member
Posts: 62
Joined: Wed Nov 28, 2007 4:15 am
Contact:

Post by devel »

maybe you can try your OS with mine library then :D

regards,
devel
User avatar
narke
Member
Member
Posts: 119
Joined: Wed Dec 26, 2007 3:37 am
Location: France

Post 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.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post 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. ;)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
narke
Member
Member
Posts: 119
Joined: Wed Dec 26, 2007 3:37 am
Location: France

Post 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).
User avatar
jerryleecooper
Member
Member
Posts: 233
Joined: Mon Aug 06, 2007 6:32 pm
Location: Canada

Post 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. :evil: :evil: :evil:
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post 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.
Post Reply