Help - Search - Members - Calendar
Full Version: How to compile a driver from Source
InsanelyMac Forum > InsanelyMac Lounge > The X Labs
Black_Spider
Is there any soft to compile mac driver from linux source?

If ans is not then plz tell me the easiest way to make driver from source.

I need to build a driver for my chrome9 integrated agp.

I have driver of all version of linux and the source.
guruk
hi man,
it looks u are the man if u can build drivers smile.gif i am looking for to have driver for a alc889 sound that works in xp also now several linux users posted success. can u help to make that driver run for a acer 6920g .. the funny thing.. the usual alc889 are not working.. and i dont know how and whom i can ask.

thanks
chris
Slice
OK! If you are programmer I can get you small guide.
HOW TO CREATE GRAPHICS DRIVER FOR MACOSX USING LINUX SOURCES.
1. Linux sources written in C. Rewrite it to C++ and create new class MyDriver with all Linux sources.
2. Some Linux system procedure must be rewritten to MacOSX system calls. Consult Apple or opensources.
For example
Linux
CODE
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
           "%s: CP resume %d\n", __FUNCTION__, _ret);

MacOSX
CODE
IOLog("ERROR: %s: CP resume %d\n", __FUNCTION__, _ret);

3. You must change access to PCI bus, to BIOS and to GPU registers.
How to you can find in project RadeonPCI
4. Take IOGraphics project.
You can find classes
IONDRV - base superclass
IOBootNDRV - small subclass with fixed settings
IOPEFNDRV - supposing that graphics driver located in ROM
You need to use your class MyDriver instead of them. Main member is doDriverIO(...).
Then create your own kext with subclass of IONDRVFramebuffer that override it's member doDriverIO to use your class. How to - for example OpenATI at http://sf.net.
In this way you can get switch resolution.
5. What about QE/CI and hardwareOpenGL?
You may subclass of IOAccelerator in the project IOGraphics but I still don't know details. If you would work I am ready to speak.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.