Linux mapped devices.

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
eL JeDi

Linux mapped devices.

Post by eL JeDi »

Hi everyone,

I would like to know if there is some web that explains how linux map all devices into files. I want to use something like that in my OS.

Thanks for all.
Tim

Re:Linux mapped devices.

Post by Tim »

Device drivers provide an implementation for the mmap function call, which maps memory as appropriate. For example, mmap on the memory device will manipulate page tables; mmap on the video frame buffer will map video memory; mmap on a file will create a file mapping.
surya4friends

Re:Linux mapped devices.

Post by surya4friends »

Yes, You are right! my question alligned to it, (hope it's not problem to ask on this thread is following!)

This means that it should be possible to run most of linux Driver on any custom operating system, which provides some interface. Anyway, I want to know is there any way so that I can run Linux Driver on OS that i develop?
This could help to have OS capability to run say USB driver, which may not be aim for someone to develop, who just wants driver to work!

Any links or resources will be big help!

Or else it may be start for other project! ;)
Tim

Re:Linux mapped devices.

Post by Tim »

Linux drivers are very hard to port to another kernel because they make a lot of assumptions about the kernel's internal structure. There's no clean interface going into the Linux kernel, and drivers tend to call whatever functions and use whatever variables they want.

You might find it easier to try implementing the UDI, Windows NT NDIS, or Windows NT SCSI or display miniport interfaces.
eL JeDi

Re:Linux mapped devices.

Post by eL JeDi »

Thanks for all Tim.

Can you, or anyone tell me any web site where there are something about mmap??
Tim

Re:Linux mapped devices.

Post by Tim »

Type man mmap on a Unix box. Alternatively, I bet a search for 'mmap' on Google would give you a lot of useful results.
elias

Re:Linux mapped devices.

Post by elias »

ive heard of some piece of software, that allows you to use all the linux drivers in your own OS. im sorry i cant tell you more, but unless you want to create your own drivers, maybe this si what your looking for
eL JeDi

Re:Linux mapped devices.

Post by eL JeDi »

Thanks Tim,

I've searched on google, and get some interesting info.

:)
surya4friends

Re:Linux mapped devices.

Post by surya4friends »

Elis,
Can you please mention me link to that site?
Thanks!
Regards,
Adi.
Post Reply