Jump to content

How to start developing ATI kexts for Hackintosh?


Crna Brada
 Share

5 posts in this topic

Recommended Posts

Polite request for the guys who are modifying kexts for us: there are numerous guides for beginners how to install Mac OSX - or OSx86 better to say. Is there any guide for the beginners how to setup environment and make / modify / test kexts or debug problems on Hackintosh?

 

I have working knowledge of C/C++/C#/Java, good knowledge of operating systems, and decent knowledge of UNIX - but no hands on development experience on Mac OSX. I have a problem with ATI video card Sapphire 5870 and Apple Cinema Display 27" that I would like to try to solve but where you start?

 

I know, there are thousands of pages of official Apple development guides but it would take weeks to go through that and I wouldn't expect they would provide help in developing / testing /debuging for Hackintosh!

 

Is there anything written that would be a quick start for people coming from other environments to Hackintosh development?

 

Any hint would be greatly appreciated.

Link to comment
Share on other sites

To modify kexts, you better start from posts in "Graphic cards" section. PPL have done a lot research on Apple's ATIFramebuffer for their own cards. You will get some clue there. If you want to dig deeply, you will need to do a lot reverse engineering to get the idea how ATIFramebuffer works.

 

To make kexts from scratch, the only possible way is to port linux open source driver since otherwise we won't know what to do with the hardware. You can only get the framebuffer funtion to work because Apple does not open the interface for acceleration. Even to program the framebuffer driver, you need to read the documents and source code of Apple's IOFramebuffer and IONDRVFramebuffer throughly to understand how the operating system talk with the driver.

 

Dong

Link to comment
Share on other sites

Thank you very much for the guidance Dong!

 

Could you please help me with a more basic question too: how do you setup the development and debug environment to do the changes. So, is there any guide that would explain (step-by-step would be great) to setup the development tools, make a small change ("Hello driver" type), compile it, deploy, and finally debug it.

 

Kind regards

Link to comment
Share on other sites

XCode (can be freely downloaded from Apple) is the tool to program and compile kext driver. When you start a new project, it has an option for this. As above post said, a simple hello kext is just several clicks.

For your purpose, you better start from Apple's open source project "IOGraphicsFamily". It's the source code for IOGraphicsFamily.kext and IONDRVSupport.kext. For some reason, the project downloaded is lacking some header files, so directly compilation will lead to a lot of errors and warnings. You will have to provide the missing header files and definitions. Some errors can only be solved by modify the source code. Once you get it done, you can get a feeling how all these works.

My RadeonHD.kext main class RadeonHD is inherited from IONDRVFramebuffer (a basic framebuffer driver that does work) in that project. What I did is trying to provide missing functions by using linux driver code. So you can check RadeonHD code linked in my topic to see what can be done by us.

 

Dong

Link to comment
Share on other sites

 Share

×
×
  • Create New...