Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
Black_Spider

How to compile a driver from Source

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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

 

I need to convert a 32bits kext to 64bits, somebody can help me please?

 

Sorry to post here but i havn't permission to make new topic.

Share this post


Link to post
Share on other sites

I have the original kext.

I need the source code absolutly?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Ok I will do this, as kingoffright said it's a little bit complex but i will try to understand... sure, as far as i can.

 

Thanks

Share this post


Link to post
Share on other sites

Hi,

 

I read the Slice's guide, and it's for graphic driver, i can follow it nevertheless?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×