I think porting linux device drivers to my os would be a nice solution and would probably reduce the process of understanding each and every hardware.
So, is it possible to port the linux driver code? I know i would need to understand the different functions provided by the driver interface of linux. I have read linux device drivers. But what i need is a brief list of all functions called by linux drivers and how each function behaves. Could anyone suggest of such a resource?
Linux drivers
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
According to me drivers are there just to support the hardware... What matters is how well your kernel manages itself and the drivers and how efficiently it does it.
I wouldnt be writing a driver interface linke that of linux... But to reboot your pc it's always outb(0x64, 0xfe) no matter which operating system it is. I guess managing the same functions and facilities that the hardware provides in a different way than any other existing os does is what writing a new os is all about...
I wouldnt be writing a driver interface linke that of linux... But to reboot your pc it's always outb(0x64, 0xfe) no matter which operating system it is. I guess managing the same functions and facilities that the hardware provides in a different way than any other existing os does is what writing a new os is all about...
The catch with the Linux driver model is that there isn't any. They don't define any clear kernel - driver interface, and they do so on purpose.
They claim that this is done so they can "adapt". (Read /usr/src/linux/Documentation/stable_api_nonsense.txt.)
I claim they do it so that anyone with a plan similar to yours has to aim at a constantly moving target, ensuring that the OS duopoly stays the way it is. As a "nice" side effect, any driver not GPL'ed and merged into the main kernel source suffers from incompatibility whenever the kernel maintainers feel like it.
They claim that this is done so they can "adapt". (Read /usr/src/linux/Documentation/stable_api_nonsense.txt.)
I claim they do it so that anyone with a plan similar to yours has to aim at a constantly moving target, ensuring that the OS duopoly stays the way it is. As a "nice" side effect, any driver not GPL'ed and merged into the main kernel source suffers from incompatibility whenever the kernel maintainers feel like it.
Every good solution is obvious once you've found it.
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
So if that is what linux people aim at then there is no alternative to understanding each and every hardware of a pc...
But i really think it's a useless thing to do. Writing drivers is a very time consuming part. With that you leave aside the main part of writing a kernel that will manage the drivers and userspace in a nice way...
It's really hard to keep up with the changing hardware in pcs. But once you think of a kernel design and work hard on the implementation it's eternal. The same design can be implemented on all machines...
But i really think it's a useless thing to do. Writing drivers is a very time consuming part. With that you leave aside the main part of writing a kernel that will manage the drivers and userspace in a nice way...
It's really hard to keep up with the changing hardware in pcs. But once you think of a kernel design and work hard on the implementation it's eternal. The same design can be implemented on all machines...
@Candy- Thanks for the book info which is also useful for my current development stage. The link for anyone else who's interested is http://www.xml.com/ldd/chapter/book/ - seems useful at first impressions.
My aim is to read all about the linux drivers and any others I can get my hands on just to see how others do it - not for binary compatibility.
Cheers,
Adam
My aim is to read all about the linux drivers and any others I can get my hands on just to see how others do it - not for binary compatibility.
Cheers,
Adam