Jump to content

AMD Lion Kernel

AMD Lion Kernel

  • Please log in to reply
97 replies to this topic

#81
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
It just has come to my mind: we have patches for AMD, made by bronzovka and rawx86. Using some text tool, can't we just separate the specific AMD instructions by comparing with the vanilla source and then apply them to the Mountain Lion source? Or even better, following and useful advice from Meklort, apply them as a binary patch to the Mountain Lion binary? It would be possible to test it?

If yes, i'm willing to do it and make the experiment. Can someone point me to some text tool that make possible to compare and extract the differences between two texts (these would be the patched kernel and the vanilla kernel) saving me the time to do it by eye, so i can re-patch it and compile it for mountain lion instead?

Can someone explain me what tools and procedures do i use to apply a binary patch to the binary kernel?

#82
shawnanastasio

shawnanastasio

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts
I thought the same thing theconnactic, however I soon realized that Mountain Lion is 100% 64-bit ONLY, so if this did work, only those with AMD Bulldozer cpus with SSSE3 would be able to actually start the OS. :P We need those SSSE3 > SSE3 Translations! (But no rush, i'm fine on ubuntu until i can get a modern version of OS X on this computer)

#83
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
I'm running Lion 10.7.4 and, as i said, it runs just fine on my PC. But 32-bit only, so no Finder and other 64-bit apps (even my CPU being a 64-bit capable CPU; ssse3 is crucial for Lion to support 64-bit apps on 32-bit mode).

With Mountain-Lion, as you said, we'll definitely need a ssse3 emulator for non-FX CPUs, but even that won't be enough: until now, we couldn't get a Lion 64-bit kernel to work on AMD CPUs, even Buldozer ones; the maximum we got was 64-bit app support, only on Buldozer CPUs. To run Mountain Lion, we've got to do better than that: we'll need a 64-bit kernel and the ssse3 emulator (a static one, easier than the previous on the fly sse3 emulator, but still no easy a task) for the non-FX CPUs. So the road ahead has a lot of pitfalls.

#84
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male

Haha actually there are good Assembly guides out there; it's not the most complex language! :D


Could you give me the directions to one that's available on the internet for free download?


Yeah, nawcom healthwise is doing great, haven't seen any activity on his blog in a while though. He's still on irc.osx86.hu, which is a good sign. :)


Glad to hear that! So he abandoned AMD hackintoshing altogether?


Very close. Basically in the kernel source there are a bunch of C headers and C files, along with Assembly files for certain kernel instructions. So basically one goes into the source, modifies the Assembly files as needed, and compiles. :)


Do you have an idea of what have i to look for in order to adapt the XNU kernel to run on AMD machines? As for the ssse3 emulator, has it to be written in assembly? Do you have, or do you know where do i find a copy of the source of the old sse3 emulator (which would serve as a good example of how to start an emulator for ssse3)?

#85
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,462 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D

Could you give me the directions to one that's available on the internet for free download?

Try a few of the following:

1. http://www.drpaulcarter.com/pcasm/
2. http://www.friedspac...embly/intro.php
3. http://savannah.nong...ojects/pgubook/ (hit the Downloads link to download it)

Glad to hear that! So he abandoned AMD hackintoshing altogether?

No, it's just that his AMD machine broke and he didn't have the money for a new one; last I heard he was trying to scrape enough together for a cheap AMD build...

Do you have an idea of what have i to look for in order to adapt the XNU kernel to run on AMD machines? As for the ssse3 emulator, has it to be written in assembly? Do you have, or do you know where do i find a copy of the source of the old sse3 emulator (which would serve as a good example of how to start an emulator for ssse3)?

Yes; all you have to do is edit the assembly files in the source, which are labeled with a .s extension. One example is bcopy.s. Just look for .s files in the XNU source.

And, I believe I said this before, but you do not need to write an SSSE3 emulator! All you need to do is edit all the .s files, change SSSE3 calls to SSE3, and that should do the trick. :) An emulator is not necessary at all; it would be extra and unneeded work. Just translate the SSSE3 calls to SSE3 and see how it rolls. ;)

#86
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
Thank you, Pooky! This is quite valuable information!

So this ssse3 calls are found always inside the assembly code, right? Or could some of them have been written in c? If it's the case, do you know the appearance that a ssse3 call statement would have in c?

I'm planning to make some experiences with the latest Mountain Lion and the Lion XNU kernel, keeping in mind your suggestions about simply changing ssse3 calls to sse3 calls, as soon as i gain some fluence in assembly coding. Or, if it's possible to be done in c, i can do it tonight. :)

#87
PookyMacMan

PookyMacMan

    InsanelyMac Legend

  • Moderators
  • 1,462 posts
  • Gender:Male
  • Location:Earth–Western Hemisphere, specifically
  • Interests:Computer science, engineering, trumpet performance, and a host of others. :D
It's only in Assembly. :) No C files contain it.

#88
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
So it's time to learn (assembly), then to play. ;)

#89
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
Tried to get lion running on my AMD laptop using v6 kernel
But system never manages to boot
I get errors that IOStorageFamily.kext is not found, followed by Still waiting for root device

CPU is AMD Athlon X2 QL-65
SB is AMD SB700

#90
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
You must set your SATA mode as AHCI in the BIOS. Did you do that?

In addition, you should try RAW's kernel (http://osx86.co/f100...7687/page1.html), since it's the most stable yet for AMD machines, specially if you plan to run the latest iteration of Lion, 10.7.4.

#91
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
SATA is set as AHCI, can't change that in this crippled InsydeH2O setup utility anyway. Copied that linked kernel into root now and testing that

EDIT: Put in new kernel and IOStorageFamily.kext from 10.7.3

This got me rid of lots of errors, but Still waiting for root device still persists

#92
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
Are you sure SATA is set to AHCI?

Which method did you use to install OSX?

#93
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
I copied my existing OS X 10.7.4 installation to the laptop harddrive using CCC.
Yes I'm sure. I can't check in BIOS because these options are not available but I checked under windows with device manager

I also installed AppleATIATA.kext

#94
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
Is your SATA controller an ATI one? If not, it won't work.

You said you used CCC, huh? I have my doubts about the capability of CCC to make a bootable hackintosh HD clone. Maybe you solve this issue by reinstalling chameleon (use the one from Mountain Lion installation topics).

#95
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
I did reinstall Chameleon (latest version).
Laptop HDDs are attached to and ATI SB700 southbridge

#96
theconnactic

theconnactic

    Stubborn AMD user

  • Local Moderators
  • 2,907 posts
  • Gender:Male
My best advice is that you wipe your installation out and start all over again, using devout's method ([AMD] 10.7.3 Guide - Experimental Only - InsanelyMac Forum), that worked like a charm for me. Since you already have an OSX installation, you won't lose anything: when everything is up and running, you connect your other HD, the one from which you made your cloning in the first place, then you use OSX's Migration Tools to import your settings, programs etc. (but after use it, don't forget to check if it don't messed with your kernel before you restart your machine.)

If you don't want to resort to such drastic measures, i think some of this solutions are a bit outdated, but maybe you want to try (one of) them:

http://www.ihackinto...or-root-device/

http://apple2pc.blog...oot-device.html

http://osx86.co/f85/...1467/page3.html

Please report back, for us to know what worked in the end.

#97
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
I just noticed that AppleATIATA.kext does not contain device ID of my laptops SATA controller. Patching that now and then trying out if helped

Edit: Didn't work. Found out that AppleATIATA.kext requires SATA ports to be in IDE mode. Which is impossible because my BIOS setup lacks that option

#98
Lordadmiral Drake

Lordadmiral Drake

    InsanelyMac Sage

  • Members
  • PipPipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Austria
Here's what I tried in the meantime:

Downloaded Niresh v2 10.7.3 and burned iso to disc: Doesn't even load Chameleon bootloader, stuck at blinking underscore

Install ATI and AHCI packages from Niresh iso to laptop HDD using existing hackintosh and USB 3.0 to SATA adapter: Didn't do anything

Install SuperVIAATA package from Niresh iso (also contains my SATA-controllers ID (0x43911002)) to laptop HDD:



localhost kernel[0]: kxld[com.c0rk007hck.SuperVIAATA]: The Mach-O file is malformed: Invalid magic number: 0xfeedfacf.
localhost kernel[0]: Can't load kext com.c0rk007hck.SuperVIAATA - link failed.
localhost kernel[0]: Failed to load executable for kext com.c0rk007hck.SuperVIAATA.
localhost kernel[0]: Kext com.c0rk007hck.SuperVIAATA failed to load (0xdc008016).
localhost kernel[0]: Failed to load kext com.c0rk007hck.Super





Also tagged with one or more of these keywords: AMD Lion, Kernel


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy