Jump to content

AMD Mojave Kernel Development and Testing


Shaneee
 Share

263 posts in this topic

Recommended Posts

1 hour ago, Micheldiz said:

I got through the installer (now I'm in the "boot installer"). To get here I had to update some kexts, modify Clover settings to make them look more like those that already work with H.Sierra  and removed AppleATIATA. However, I have this new problem "com.apple.osinstall error -29".

BTW I'm using the latest version of Clover.

 

image.thumb.png.532373a886afb65361703150b1b809c2.png

 

What we've seen before is this image is the result of not modifying the install plist. Either run this in Terminal from the installer replacing VOLUME NAME with the disk Mojave is installed to,

 

sed -i '' 's/auth-//g' /Volumes/"VOLUME NAME"/macOS\ Install\ Data/Locked\ Files/Boot\ Files/com.apple.Boot.plist

 

Or modifying the plist file manually and just remove the auth- part your self.

Link to comment
Share on other sites

45 minutes ago, Shaneee said:

 

 Either run this in Terminal from the installer replacing VOLUME NAME with the disk Mojave is installed to,

hmmm, I did it but in my H.Sierra installation... I'll try this right away

 

UPDATE: No luck

Edited by Micheldiz
Link to comment
Share on other sites

I'm getting the panic message on the very initial installation step. This is happening on the USB drive. I wonder what am I doing wrong since there is no 'macOS Install Data' folder in there... Can't even get to the installer. Any ideas?

 

I'm using FX-4300 with GTX 760

IMG_20190106_011928.jpg

Edited by vintr
Link to comment
Share on other sites

Success! My problem now is the Nvidia Web Driver.

 

I think my problem was the file system. I was installing Mojave on an SSD with APFS. I formatted the entire disk to standard HFS disk utility.

With the SSD completely clean, I started the installation from scratch. It was in just a shot. Very fast.

And last I was having problems with "The installer resources were not found" - This was solved by switching from APFS to HFS.

PS. The installer will convert back to APFS in the right way.

 

My next step now is to solve the video driver and better analyze other Kernels. The boot log had many errors.

 

UPDATE: "About this Mac" don't wanna work

 

Cheers!

 

My system:

 

System Software Overview:

 

      System Version: macOS 10.14.1 (18B75)

      Kernel Version: Darwin 18.2.0

      Boot Volume: macOS

      Boot Mode: Normal

      Secure Virtual Memory: Enabled

      System Integrity Protection: Disabled


Nvidia GTX 1050ti (dammm apple! ;-; https://www.forbes.com/sites/marcochiappetta/2018/12/11/apple-turns-its-back-on-customers-and-nvidia-with-macos-mojave/#dbe9ebd37e9f)

Ryzen 2 2700x

32GB DDR4

 

Captura de Tela 2019-01-05 às 23.00.26.png

Edited by Micheldiz
Link to comment
Share on other sites

 

testing both kernels, all good so far.

Is there a way to ignore kext errors and generate a valid prelinkedkernel ?

 

got missing symbols in AppleMobileFileIntegrity.kext

so i hacked 10.14.1 shanee source and rebuild for 10.14.2

this version rebuilds the prelinked kernel without errors

 

i've made a prelinkedkernel using the basesystem kexts (from the installer media)

might help if u cant use the os x installer (just replace the prelinkedkernel in your usb install media) 

 

System.zip

prelinkedkernel.zip

@jalavoui
good for fx 8350, arrival at the customization, but I always have this error and then restart, same thing by applying the ssepatch patch

 

camphoto_1804928587.jpg

IMG_5501.jpg

Link to comment
Share on other sites

 

No way, I've tested several combinations. And All get stuck in the same error.

PS. I'm using the latest version of Clover.

 

my kexts

1953974104_CapturadeTela2019-01-04as12_52_30.thumb.png.8c57eb0b388cdd29b7d73321db8249fc.png

 

Your Kext folder is a total mess.

 

1. NvidiaGraphicsFixup is an ancient version of Whatevergreen

2. Why do you have so many network drivers (Athereos*, Realtek*, SmallTreeIntel*, nForceLAN)?!? Delete them and only install the one you need

3. You need to chose between Voodoo and AppleALC. AppleALC is much better, but won't work with AppleHDADisabler

4. Why do you have all the ATA kexts??

 

Probably more things are totally wrong. Less is more when it comes to kexts, more kexts just create problems.

Edited by newsguytor
Link to comment
Share on other sites

void
mach_msg_destroy_from_kernel_proper(
    mach_msg_header_t    *msg)

{
  char v1;
  mach_msg_type_number_t j;
  ipc_object_t objects; 
  mach_msg_bits_t i; 
  mach_msg_descriptor_t *daddr; 
  mach_port_t object; 
  struct ipc_object *objecta; 
  signed int mbits; 

  mbits = msg->msgh_bits;
  object = msg->msgh_remote_port;
  if ( object && object != (mach_port_t)-1LL )
    ipc_object_destroy(&object->ip_object, msg->msgh_bits & 0x1F);
  v1 = 0;
  if ( msg->msgh_voucher_port )
    v1 = (int)msg->msgh_voucher_port != -1;
  if ( !(~v1 & 1) )
    return;
  if ( mbits < 0 )
  {
    daddr = (mach_msg_descriptor_t *)&msg[1].msgh_size;
    i = 0;
    while ( i < msg[1].msgh_bits )
    {
      switch ( *((unsigned int*)&daddr->type + 2) >> 24 )
      {
        case 0:
          if ( daddr->port.name )
          {
            if ( daddr->port.name != (mach_port_t)-1LL )
              ipc_object_destroy(&daddr->port.name->ip_object, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
          }
          break;
        case 1:
        case 3:
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            vm_map_copy_discard((vm_map_copy_t)daddr->port.name);
          }
          else if ( daddr->port.name )
          {
            break;
          }
          break;
        case 2:
          objects = &daddr->port.name->ip_object;
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            if ( !objects )
              break;
            for ( j = 0; j < *((unsigned int*)&daddr->type + 3); ++j )
            {
              objecta = (struct ipc_object*)*((unsigned int*)&objects->io_bits + j);
              if ( objecta && objecta != (struct ipc_object*)-1LL )
                ipc_object_destroy(objecta, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
            }
            kfree(daddr->port.name, 8LL * *((unsigned int *)&daddr->type + 3));
          }
          break;
        default:
          break;
      }
      ++i;
      ++daddr;
    }
  }
}

 

i've added this code to shanee kernel for testing on 10.14.2 (ipc_mig.c - missing symbols in AppleMobileFileIntegrity prevent prelinkedkernel build)

to test move it to S/L/Kernels and do in terminal kextcache -invalidate / to rebuild the prelinkedkernel

only do it if u have a stable system.

 

also sharing my clover files for those who still get installer/boot issues (be sure to use latest clover)

 

i'm forced to boot in legacy mode (non uefi) due to appleacpi timeouts

need to figure out why this is happening. Anyway u guys can try a non uefi boot to check if those boot errors go away (enter bios menu and check uefi/legacy mode).

atm i only use 1 kext to boot (AppleSMC)

 

xlnc - the patch is a simple jump on AppleSSE::start() 

u'll need to check the code for 10.14.1

check this in code and play with it

LABEL_11:
  *((_BYTE *)v2 + 4324) = 1;
LABEL_12:
  if ( *((_BYTE *)v2 + 8476) )

 

kernel

 

clover.zip

Edited by jalavoui
  • Like 4
Link to comment
Share on other sites

 

void
mach_msg_destroy_from_kernel_proper(
    mach_msg_header_t    *msg)

{
  char v1;
  mach_msg_type_number_t j;
  ipc_object_t objects; 
  mach_msg_bits_t i; 
  mach_msg_descriptor_t *daddr; 
  mach_port_t object; 
  struct ipc_object *objecta; 
  signed int mbits; 

  mbits = msg->msgh_bits;
  object = msg->msgh_remote_port;
  if ( object && object != (mach_port_t)-1LL )
    ipc_object_destroy(&object->ip_object, msg->msgh_bits & 0x1F);
  v1 = 0;
  if ( msg->msgh_voucher_port )
    v1 = (int)msg->msgh_voucher_port != -1;
  if ( !(~v1 & 1) )
    return;
  if ( mbits < 0 )
  {
    daddr = (mach_msg_descriptor_t *)&msg[1].msgh_size;
    i = 0;
    while ( i < msg[1].msgh_bits )
    {
      switch ( *((unsigned int*)&daddr->type + 2) >> 24 )
      {
        case 0:
          if ( daddr->port.name )
          {
            if ( daddr->port.name != (mach_port_t)-1LL )
              ipc_object_destroy(&daddr->port.name->ip_object, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
          }
          break;
        case 1:
        case 3:
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            vm_map_copy_discard((vm_map_copy_t)daddr->port.name);
          }
          else if ( daddr->port.name )
          {
            break;
          }
          break;
        case 2:
          objects = &daddr->port.name->ip_object;
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            if ( !objects )
              break;
            for ( j = 0; j < *((unsigned int*)&daddr->type + 3); ++j )
            {
              objecta = (struct ipc_object*)*((unsigned int*)&objects->io_bits + j);
              if ( objecta && objecta != (struct ipc_object*)-1LL )
                ipc_object_destroy(objecta, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
            }
            kfree(daddr->port.name, 8LL * *((unsigned int *)&daddr->type + 3));
          }
          break;
        default:
          break;
      }
      ++i;
      ++daddr;
    }
  }
}

 

i've added this code to shanee kernel for testing on 14.12

to test move it to S/L/Kernels and do in terminal kextcache -invalidate / to rebuild the prelinkedkernel

only do it if u have a stable system.

 

also sharing my clover files for those who still get installer/boot issues (be sure to use latest clover)

 

i'm forced to boot in legacy mode (non uefi) due to appleacpi timeouts

need to figure out why this is happening. Anyway u guys can try a non uefi boot to check if those boot errors go away (enter bios menu and check uefi/legacy mode).

atm i only use 1 kext to boot (AppleSMC)

 

xlnc - the patch is a simple jump on AppleSSE::start() 

u'll need to check the code for 10.14.1

check this in code and play with it

LABEL_11:
  *((_BYTE *)v2 + 4324) = 1;
LABEL_12:
  if ( *((_BYTE *)v2 + 8476) )

 

kernel

 

clover.zip

 

The code that you added to shaneee kernel . What does it do ?

EDIT :  ok i see ! but thats on 10.14.2 right coz on 10.14.1 AMFI links fine !

Edited by XLNC
Link to comment
Share on other sites

Also the mojave always reboots after data and privacy setup screen for some reason.

 

929008B4-F1FD-48DC-9EAC-65451740BFC1.jpeg



It shows this message while reboot 

my guess is its due to gpu coz i dont have amd gpu .

 

8271F8C4-FF32-42CE-8591-A58D4DC45474.jpeg

here is the system.log if anyone want to take a look .
system.log

Edited by XLNC
Link to comment
Share on other sites

 

void
mach_msg_destroy_from_kernel_proper(
    mach_msg_header_t    *msg)

{
  char v1;
  mach_msg_type_number_t j;
  ipc_object_t objects; 
  mach_msg_bits_t i; 
  mach_msg_descriptor_t *daddr; 
  mach_port_t object; 
  struct ipc_object *objecta; 
  signed int mbits; 

  mbits = msg->msgh_bits;
  object = msg->msgh_remote_port;
  if ( object && object != (mach_port_t)-1LL )
    ipc_object_destroy(&object->ip_object, msg->msgh_bits & 0x1F);
  v1 = 0;
  if ( msg->msgh_voucher_port )
    v1 = (int)msg->msgh_voucher_port != -1;
  if ( !(~v1 & 1) )
    return;
  if ( mbits < 0 )
  {
    daddr = (mach_msg_descriptor_t *)&msg[1].msgh_size;
    i = 0;
    while ( i < msg[1].msgh_bits )
    {
      switch ( *((unsigned int*)&daddr->type + 2) >> 24 )
      {
        case 0:
          if ( daddr->port.name )
          {
            if ( daddr->port.name != (mach_port_t)-1LL )
              ipc_object_destroy(&daddr->port.name->ip_object, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
          }
          break;
        case 1:
        case 3:
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            vm_map_copy_discard((vm_map_copy_t)daddr->port.name);
          }
          else if ( daddr->port.name )
          {
            break;
          }
          break;
        case 2:
          objects = &daddr->port.name->ip_object;
          if ( *((unsigned int*)&daddr->type + 3) )
          {
            if ( !objects )
              break;
            for ( j = 0; j < *((unsigned int*)&daddr->type + 3); ++j )
            {
              objecta = (struct ipc_object*)*((unsigned int*)&objects->io_bits + j);
              if ( objecta && objecta != (struct ipc_object*)-1LL )
                ipc_object_destroy(objecta, (*((unsigned int*)&daddr->type + 2) >> 16) & 0xFF);
            }
            kfree(daddr->port.name, 8LL * *((unsigned int *)&daddr->type + 3));
          }
          break;
        default:
          break;
      }
      ++i;
      ++daddr;
    }
  }
}

 

i've added this code to shanee kernel for testing on 10.14.2 (ipc_mig.c - missing symbols in AppleMobileFileIntegrity prevent prelinkedkernel build)

to test move it to S/L/Kernels and do in terminal kextcache -invalidate / to rebuild the prelinkedkernel

only do it if u have a stable system.

 

also sharing my clover files for those who still get installer/boot issues (be sure to use latest clover)

 

i'm forced to boot in legacy mode (non uefi) due to appleacpi timeouts

need to figure out why this is happening. Anyway u guys can try a non uefi boot to check if those boot errors go away (enter bios menu and check uefi/legacy mode).

atm i only use 1 kext to boot (AppleSMC)

 

xlnc - the patch is a simple jump on AppleSSE::start() 

u'll need to check the code for 10.14.1

check this in code and play with it

LABEL_11:
  *((_BYTE *)v2 + 4324) = 1;
LABEL_12:
  if ( *((_BYTE *)v2 + 8476) )

 

kernel

 

clover.zip

@jalavoui

Thanks for these files which worked at 10.14.2 in Ryzen 1700X hackintosh.

It can login desktop without kcsuffix=xxxxx for the first time.

Video play in Safari is very fine and App Store works too.

HDMI audio from 7950 GPU and Power management such as shutdown or reboot working faster than other kernels/prelinkedkernels, but wake up / sleep issues occured .

Only cpu-x, EFI Mount V3, and some other apps crashed.

Edited by jsl2000
Link to comment
Share on other sites

 

 

Your Kext folder is a total mess.

 

1. NvidiaGraphicsFixup is an ancient version of Whatevergreen

2. Why do you have so many network drivers (Athereos*, Realtek*, SmallTreeIntel*, nForceLAN)?!? Delete them and only install the one you need

3. You need to chose between Voodoo and AppleALC. AppleALC is much better, but won't work with AppleHDADisabler

4. Why do you have all the ATA kexts??

 

Probably more things are totally wrong. Less is more when it comes to kexts, more kexts just create problems.

 

Duuude, all is working. Besides this I have this mess cuz I was testing and testing and testing. And had some "diff combinations" cuz I have more than one m.board to test.
So just let it over there cuz in a Team that is winning you don't touch! :P 

I'll clean up soon, but for now. Whatever. But thanks for point out.

Edited by Micheldiz
Link to comment
Share on other sites

 

Success! My problem now is the Nvidia Web Driver.

 

I think my problem was the file system. I was installing Mojave on an SSD with APFS. I formatted the entire disk to standard HFS disk utility.

With the SSD completely clean, I started the installation from scratch. It was in just a shot. Very fast.

And last I was having problems with "The installer resources were not found" - This was solved by switching from APFS to HFS.

PS. The installer will convert back to APFS in the right way.

 

My next step now is to solve the video driver and better analyze other Kernels. The boot log had many errors.

 

UPDATE: "About this Mac" don't wanna work

 

Cheers!

 

My system:

 

System Software Overview:

 

      System Version: macOS 10.14.1 (18B75)

      Kernel Version: Darwin 18.2.0

      Boot Volume: macOS

      Boot Mode: Normal

      Secure Virtual Memory: Enabled

      System Integrity Protection: Disabled


Nvidia GTX 1050ti (dammm apple! ;-; https://www.forbes.com/sites/marcochiappetta/2018/12/11/apple-turns-its-back-on-customers-and-nvidia-with-macos-mojave/#dbe9ebd37e9f)

Ryzen 2 2700x

32GB DDR4

 

Captura de Tela 2019-01-05 às 23.00.26.png

How did you get past the apple logo screen? I tried booting with my gtx1080 but the mojave does not start.
Don’t enter in password screen.

Link to comment
Share on other sites

 

Success! My problem now is the Nvidia Web Driver.

 

I think my problem was the file system. I was installing Mojave on an SSD with APFS. I formatted the entire disk to standard HFS disk utility.

With the SSD completely clean, I started the installation from scratch. It was in just a shot. Very fast.

And last I was having problems with "The installer resources were not found" - This was solved by switching from APFS to HFS.

PS. The installer will convert back to APFS in the right way.

 

My next step now is to solve the video driver and better analyze other Kernels. The boot log had many errors.

 

UPDATE: "About this Mac" don't wanna work

 

Cheers!

 

My system:

 

System Software Overview:

 

      System Version: macOS 10.14.1 (18B75)

      Kernel Version: Darwin 18.2.0

      Boot Volume: macOS

      Boot Mode: Normal

      Secure Virtual Memory: Enabled

      System Integrity Protection: Disabled


Nvidia GTX 1050ti (dammm apple! ;-; https://www.forbes.com/sites/marcochiappetta/2018/12/11/apple-turns-its-back-on-customers-and-nvidia-with-macos-mojave/#dbe9ebd37e9f)

Ryzen 2 2700x

32GB DDR4

 

Captura de Tela 2019-01-05 às 23.00.26.png

How did you get past the apple logo screen? I tried booting with my gtx1080 but the mojave does not start.
Don’t enter in password screen.

Link to comment
Share on other sites

 

How did you get past the apple logo screen? I tried booting with my gtx1080 but the mojave does not start.
Don’t enter in password screen.

Well I do not know exactly what point you're talking about.

But overall it was very simple. I followed what Shanee recommends in his Gist. I tested different PKs.

In Clover I used -v npci=0x3000 debug=0x100 nvda_drv=1 keepsyms=1 slide=176

I unchecked all "fixes" from ACPI - and re-marked only "Fix Shutdown". Plist is attached

I did nothing special.

configRyzen.plist

Edited by Micheldiz
Link to comment
Share on other sites

My mac ryzen 1700 msi B350 mortor success run 10.14.1 with kernel 

My gpu is r9 270 without x

But when I try to sleep 

My machine wake up immediately

this is logs for wake reason:  AppleACPIPlatformPower Wake reason: GPP1 GPP3 GPP4 GPP5 GPP6 GPP7 GPP9 GPPA GPPB GPPC GPPD GPPE GPPF PTXH

what should I do to fix it

50928E33-6FD7-4946-A850-1192778FAF7C.png

Edited by sherylynn
Link to comment
Share on other sites

7 hours ago, XLNC said:

 

i got this error (10.14.2) on missing function while doing a kextcache -invalidate /

kxld[com.apple.driver.AppleMobileFileIntegrity]: The following symbols are unresolved for this kext:
kxld[com.apple.driver.AppleMobileFileIntegrity]: 	_mach_msg_destroy_from_kernel_proper
Link failed (error code 5).
Prelink failed for com.apple.driver.AppleMobileFileIntegrity; omitting from prelinked kernel.
Can't use AppleMobileFileIntegrity.kext - not linked.
Prelink failed for com.apple.security.sandbox; omitting from prelinked kernel.
Can't use Sandbox.kext - not linked.
Prelink failed for com.apple.security.quarantine; omitting from prelinked kernel.
Can't use AppleMobileFileIntegrity.kext - not linked.
Prelink failed for com.apple.iokit.IONVMeFamily; aborting prelink.
Failed to generate prelinked kernel.
Child process /usr/sbin/kextcache[575] exited with status 71.
Error 107 rebuilding /System/Library/PrelinkedKernels/prelinkedkernel

can u rebuild with the missing function i posted above?

Edited by jalavoui
Link to comment
Share on other sites

7 minutes ago, jalavoui said:

 

i got this error on missing function trying a kextcache -invalidate /


kxld[com.apple.driver.AppleMobileFileIntegrity]: The following symbols are unresolved for this kext:
kxld[com.apple.driver.AppleMobileFileIntegrity]: 	_mach_msg_destroy_from_kernel_proper
Link failed (error code 5).
Prelink failed for com.apple.driver.AppleMobileFileIntegrity; omitting from prelinked kernel.
Can't use AppleMobileFileIntegrity.kext - not linked.
Prelink failed for com.apple.security.sandbox; omitting from prelinked kernel.
Can't use Sandbox.kext - not linked.
Prelink failed for com.apple.security.quarantine; omitting from prelinked kernel.
Can't use AppleMobileFileIntegrity.kext - not linked.
Prelink failed for com.apple.iokit.IONVMeFamily; aborting prelink.
Failed to generate prelinked kernel.
Child process /usr/sbin/kextcache[575] exited with status 71.
Error 107 rebuilding /System/Library/PrelinkedKernels/prelinkedkernel

can u rebuild with the missing function i posted above?


are you doing this on 10.14.2 ?

and yes i can rebuild kextcache fine on 10.14.1 .

Edited by XLNC
Link to comment
Share on other sites

 Share

×
×
  • Create New...