Jump to content

How to compile a driver from Source


Rikad Rahman
 Share

16 posts in this topic

Recommended Posts

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.

Link to comment
Share on other sites

hi man,

it looks u are the man if u can build drivers :) 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

Link to comment
Share on other sites

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

xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
	   "%s: CP resume %d\n", __FUNCTION__, _ret);

MacOSX

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.

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Can anybody give me as smallest as possible sample of graphics driver? I need to make "dummy display driver" which will do nothing but will behave like normal driver for GPU allowing to use all resolutions when using VNC without monitor attached to host OSX machine.

 

Can anybody help? Apple docs are very small at this topic, I tried to subclass IOFramebuffer and IONDRVFramebuffer but with no success.

 

Thanks much in advance!

 

kexik

Link to comment
Share on other sites

  • 1 year later...

Yes of course. Without source code there is nothing to modify let alone compile.

 

Why don't you post what kernel extension it is, maybe there is another way.

 

Are you aware that OS X can run 64-bit apps and use up to 32GB RAM when running in 32-bit kernel and drivers mode?

The only real limitation compared to full 64-bit mode is that each process can only use up to 4GB RAM.

 

If your sig is accurate, you only have 4GB RAM, which means you will see no benefit from running in 64-bit kernel and drivers mode.

Link to comment
Share on other sites

Hi,

 

It's for a Genius graphic tablet, USBPenTablet.kext , then non-free driver, I can't find the source code.

 

I tried to boot in 32bits but my system don't start like this, AppleIntelCPUPM make a KP, and in 64bits the kext isn't loaded.

 

Do you think i can find a generic driver? Or maybe edit IOUSBfamilly or other for make it working?

With nothing installed the stylus work, I can open files with a stylus touch and right click open the contextual menu but it don't move. Also the tablet appear sometimes in System Profiler.

Link to comment
Share on other sites

it's true... I'm little scared because I never programmed (chinese should be easier for me...).

But I'm interested by try and learn... then as you said... I will jump in! :D

 

thanks

Link to comment
Share on other sites

 Share

×
×
  • Create New...