Jump to content
30960 posts in this topic

Recommended Posts

Clover4052_-t XCODE8.

Compiling with -t XCODE8  and loading OS X_10.12.5b legacy and uefi mode was successful.

 

Boot7

 

 

0:100  0:100  MemLog inited, TSC freq: 3403347753
0:100  0:000  LegacyRegion2: Chipset/proc: 0x01008086
0:100  0:000   Next Generation Core processors (PAM 0x80-0x86)
0:100  0:000   Test PAM1=(0x41=90, 0x5a=00, 0x81=11, 0x91=00) at chipset 01008086
0:100  0:000  , Install = Success
0:110  0:010  BiosVideoDriverBindingStart!
0:110  0:000  BiosVideoCheckForVbe
0:110  0:000  EdidOverride not found
0:139  0:028   Edid1+
0:139  0:000   found Detail Timing 1280x1024
0:168  0:028   Edid0+
0:168  0:000   found Detail Timing 1280x1024
0:168  0:000  ... already present
0:172  0:004     0 1152x864 attr=BB - ok, edid+, working, highest, pref=0
0:172  0:000     1 1280x960 attr=BB - ok, edid-
0:173  0:000     2 640x480 attr=BB - ok, edid+, 640x480, working
0:173  0:000     3 800x600 attr=BB - ok, edid+, 800x600, working
0:173  0:000     4 1024x768 attr=BB - ok, edid+, 1024x768, working
0:173  0:000     5 1280x1024 attr=BB - ok, edid+, working, highest, pref=5
0:176  0:003  BV new mode: 5 1280x1024
0:326  0:149   SetMode pref 5 (5) = Success
0:503  0:176  Found supported controller for BiosBlockIO class=010601
0:503  0:000  Int13Extensions: INT 13 41 DL=80 : CF=0 BX=AA55 CX=0001
0:503  0:000  GetDriveParameters: INT 13 48 DL=80 : CF=0 AH=00
0:503  0:000  BlockSize = 512  LastBlock = 1953525167
1:545  1:041  
1:545  0:000  Now is 3.4.2017,  2:21:35 (GMT)
1:549  0:004  Starting Clover revision: 4052 on CLOVER EFI
1:554  0:005  Build with: [Args: -mc -D NO_GRUB_DRIVERS_EMBEDDED -D DEBUG_ON_SERIAL_PORT -t XCODE8 | -D NO_GRUB_DRIVERS_EMBEDDED -D DEBUG_ON_SERIAL_PORT -D USE_BIOS_BLOCKIO -D USE_LOW_EBDA -a X64 -b RELEASE -t XCODE8 -n 9 | OS: 10.12.5]

 

 

 

Boot6.

 

 

0:100  0:100  MemLog inited, TSC freq: 3403349793
0:100  0:000  LegacyRegion2: Chipset/proc: 0x01008086
0:100  0:000   Next Generation Core processors (PAM 0x80-0x86)
0:100  0:000   Test PAM1=(0x41=90, 0x5a=00, 0x81=11, 0x91=00) at chipset 01008086
0:100  0:000  , Install = Success
0:110  0:010  BiosVideoDriverBindingStart!
0:110  0:000  BiosVideoCheckForVbe
0:110  0:000  EdidOverride not found
0:139  0:028   Edid1+
0:139  0:000   found Detail Timing 1280x1024
0:168  0:028   Edid0+
0:168  0:000   found Detail Timing 1280x1024
0:168  0:000  ... already present
0:172  0:004     0 1152x864 attr=BB - ok, edid+, working, highest, pref=0
0:173  0:000     1 1280x960 attr=BB - ok, edid-
0:173  0:000     2 640x480 attr=BB - ok, edid+, 640x480, working
0:173  0:000     3 800x600 attr=BB - ok, edid+, 800x600, working
0:173  0:000     4 1024x768 attr=BB - ok, edid+, 1024x768, working
0:173  0:000     5 1280x1024 attr=BB - ok, edid+, working, highest, pref=5
0:177  0:003  BV new mode: 5 1280x1024
0:331  0:154   SetMode pref 5 (5) = Success
1:735  1:403  
1:735  0:000  Now is 3.4.2017,  2:32:34 (GMT)
1:739  0:004  Starting Clover revision: 4052 on CLOVER EFI
1:745  0:005  Build with: [Args: -mc -D NO_GRUB_DRIVERS_EMBEDDED -D DEBUG_ON_SERIAL_PORT -t XCODE8 | -D NO_GRUB_DRIVERS_EMBEDDED -D DEBUG_ON_SERIAL_PORT -D USE_BIOS_BLOCKIO -D USE_LOW_EBDA -a X64 -b RELEASE -t XCODE8 -n 9 | OS: 10.12.5]
1:765  0:020  SelfDevicePath=PcieRoot(0x0)\Pci(0x1F,0x2)\Sata(0x2,0x0,0x0)\HD(1,GPT,FBA19309-7C18-433A-9A9C-33D50952839D,0x28,0x64000) @DD463A18
1:779  0:013  SelfDirPath = \EFI\CLOVER 

 

 

  • Like 1

@mickey1979

 

hello mickey. i remember you fixed matchos and matchbuild code.

 

i report this issue.

if MatchBuild and MatchOS have a blank. So the clover recognizes the part as disabled and the patch does not work

b7ce8464f76446b980ac94500e7ceae139564e5c

 

here is prove in clover log
4:483 0:000 - [06]: com.apple.driver.AppleBacklight (change F%uP%04x to F%uPxxxx for AppleBacklightInjector.kext (credit RehabMan)) :: BinPatch :: [OS: 10.12.5 | MatchOS: All | MatchBuild: All] ==> allowed
4:483 0:000 - [07]: com.apple.driver.AppleBacklight (change F%uP%04x to F%uPxxxx for AppleBacklightInjector.kext (credit RehabMan)) :: BinPatch :: [OS: 10.12.5 | MatchOS: | MatchBuild: ] ==> not allowed

 

if MatchBuild and MatchOS have a blank, can those active all?

 

thanks in advance

Hi guys,

 

I have a real noob question:

 

I usually use all configuration within the OEM sub-dir, so I can use one clover for all the computer here.  Now has does clover prioritise the dirs? For example I usually put the kexts also in the main kexts/10.12 dir, but also in OEM/computer/kexts/10.12.   So my questions are:

 

- Will it work if I put all kexts only into the OEM structure?

 

- Can I mix the placements, for example putting fakesmc in the main kexts/10.12, but others into OEM/computer/kexts/10.12 dir?

 

- If a kext exists in both locations, which one will be used?

Sure (asked because I did not know anyone which is patching boot.efi yet) :)

 

I did some useless experiments month ago, I believe it could be useful someday for hardcore users.

 

@mickey1979

 

hello mickey. i remember you fixed matchos and matchbuild code.

 

i report this issue.

 

Also check for string length?

BOOLEAN
IsPatchEnabled (CHAR8 *MatchOSEntry, CHAR8 *CurrOS)
{
  INTN i;
  BOOLEAN ret = FALSE;
  struct MatchOSes *mos; // = AllocatePool(sizeof(struct MatchOSes));

  //if (!MatchOSEntry || !CurrOS) {
  if (!MatchOSEntry || !AsciiStrLen (MatchOSEntry) || !CurrOS || !AsciiStrLen (CurrOS)) {
    return TRUE; //undefined matched corresponds to old behavior
  }
Now has does clover prioritise the dirs?

 

According to source, Clover will start to scan OEM dir first, then Main(root) as a fallback if they dont exists.

 

- Will it work if I put all kexts only into the OEM structure?

 

Yes, it should work.

 

- Can I mix the placements, for example putting fakesmc in the main kexts/10.12, but others into OEM/computer/kexts/10.12 dir?

 

How about this way:

 

1. OEM/computer/kexts/10.12 (for specific os version, should delete 'Other' dir).

2. Main(root)/kexts/Other (for generic/common kexts, like fakesmc).

 

- If a kext exists in both locations, which one will be used?

 

OEM first.

  • Like 2

 

Also check for string length?

BOOLEAN
IsPatchEnabled (CHAR8 *MatchOSEntry, CHAR8 *CurrOS)
{
  INTN i;
  BOOLEAN ret = FALSE;
  struct MatchOSes *mos; // = AllocatePool(sizeof(struct MatchOSes));

  //if (!MatchOSEntry || !CurrOS) {
  if (!MatchOSEntry || !AsciiStrLen (MatchOSEntry) || !CurrOS || !AsciiStrLen (CurrOS)) {
    return TRUE; //undefined matched corresponds to old behavior
  }

 

 

solved case if MatchOS and MatchBuild have blank.


3:479  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
3:479  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build

1:377  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:377  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build

solved case if MatchOS and MatchBuild have blank.

3:479  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
3:479  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build

1:377  0:000   - [00]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:377  0:000   - [01]: HDMI-audio, port 0105, 0x19160000 :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build

Hi Sherlocks. MatchOS should return yes only if a match exist, but doing like you said, IMHO the log should be at least like this:

inform if no key present

:: [OS: 10.12.5 | MatchOS: not set | MatchBuild: not set ] ==> allowed 

or inform if empty

:: [OS: 10.12.5 | MatchOS: empty​ | MatchBuild: empty​ ] ==> allowed 

(or something similar)

 

and ..can you please try this improved (simplified and more robust)  version of GetStrArraySeparatedByChar() function?

struct
MatchOSes *GetStrArraySeparatedByChar(CHAR8 *str, CHAR8 sep)
{
  struct MatchOSes *mo;  
  INTN len = 0, i = 0, inc = 1;
  CHAR8 doubleSep[2];
  
  mo = AllocatePool(sizeof(struct MatchOSes));
  if (!mo) {
    return NULL;
  }
  mo->count = countOccurrences( str, sep ) + 1;
//  DBG("found %d %c in %s\n", mo->count, sep, str);
  len = (INTN)AsciiStrLen(str);
  doubleSep[0] = sep; doubleSep[1] = sep;
  
  if(AsciiStrStr(str, doubleSep) || !len || str[0] == sep || str[len -1] == sep) {
    mo->count = 0;
    mo->array[0] = NULL;
//    DBG("emtpy string\n");
    return mo;
  }
  
  if (mo->count > 1) {
    //INTN indexes[mo->count + 1];
    INTN *indexes = (INTN *) AllocatePool(mo->count + 1);
    
    for (i = 0; i < len; ++i) {
      CHAR8 c = str[i];
      if (c == sep) {
        indexes[inc]=i;
//        DBG("index %d = %d\n", inc, i);
        inc++;
      }
    }
    // manually add first index
    indexes[0] = 0;
    // manually add last index
    indexes[mo->count] = len;
    
    INTN startLocation = 0, endLocation = 0;
      
    for (i = 0; i < mo->count; ++i) {
      UINTN newLen = 0;
      startLocation = i ? indexes[i] + 1 : indexes[0];
      endLocation = (i == mo->count - 1) ? len : indexes[i + 1];
//      DBG("start %d, end %d\n", startLocation, endLocation);
      newLen = (endLocation - startLocation);
      mo->array[i] = AllocateCopyPool(newLen, str + startLocation);
      mo->array[i][newLen] = '\0';
      if (endLocation == len) break;
    }

    FreePool(indexes);
  }
  else {
//    DBG("str contains only one component and it is our string %s!\n", str);
    mo->array[0] = AllocateCopyPool(AsciiStrLen(str)+1, str);
  }
  return mo;
} 

here works well

  • Like 2

Hi Sherlocks. MatchOS should return yes only if a match exist, but doing like you said, IMHO the log should be at least like this:

inform if no key present

:: [OS: 10.12.5 | MatchOS: not set | MatchBuild: not set ] ==> allowed 

or inform if empty

:: [OS: 10.12.5 | MatchOS: empty​ | MatchBuild: empty​ ] ==> allowed 

(or something similar)

 

and ..can you please try this improved (simplified and more robust)  version of GetStrArraySeparatedByChar() function?

struct
MatchOSes *GetStrArraySeparatedByChar(CHAR8 *str, CHAR8 sep)
{
  struct MatchOSes *mo;  
  INTN len = 0, i = 0, inc = 1;
  CHAR8 doubleSep[2];
  
  mo = AllocatePool(sizeof(struct MatchOSes));
  if (!mo) {
    return NULL;
  }
  mo->count = countOccurrences( str, sep ) + 1;
//  DBG("found %d %c in %s\n", mo->count, sep, str);
  len = (INTN)AsciiStrLen(str);
  doubleSep[0] = sep; doubleSep[1] = sep;
  
  if(AsciiStrStr(str, doubleSep) || !len || str[0] == sep || str[len -1] == sep) {
    mo->count = 0;
    mo->array[0] = NULL;
//    DBG("emtpy string\n");
    return mo;
  }
  
  if (mo->count > 1) {
    //INTN indexes[mo->count + 1];
    INTN *indexes = (INTN *) AllocatePool(mo->count + 1);
    
    for (i = 0; i < len; ++i) {
      CHAR8 c = str[i];
      if (c == sep) {
        indexes[inc]=i;
//        DBG("index %d = %d\n", inc, i);
        inc++;
      }
    }
    // manually add first index
    indexes[0] = 0;
    // manually add last index
    indexes[mo->count] = len;
    
    INTN startLocation = 0, endLocation = 0;
      
    for (i = 0; i < mo->count; ++i) {
      UINTN newLen = 0;
      startLocation = i ? indexes[i] + 1 : indexes[0];
      endLocation = (i == mo->count - 1) ? len : indexes[i + 1];
//      DBG("start %d, end %d\n", startLocation, endLocation);
      newLen = (endLocation - startLocation);
      mo->array[i] = AllocateCopyPool(newLen, str + startLocation);
      mo->array[i][newLen] = '\0';
      if (endLocation == len) break;
    }

    FreePool(indexes);
  }
  else {
//    DBG("str contains only one component and it is our string %s!\n", str);
    mo->array[0] = AllocateCopyPool(AsciiStrLen(str)+1, str);
  }
  return mo;
} 

here works well

 

here is report

0:114  0:000  KernelToPatch: 2 requested
0:114  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS: 10.12.x :: data len: 8 (don't have MatchBuild entry, have only MatchOS)
0:114  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS:  :: MatchBuild:  :: data len: 8 

only your code. not work.

2:508  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
2:508  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build

cecekpawon + your code

1:667  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:667  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build

right. if log show "not set" or "emty", it will be useful.

  • Like 1

here is report

0:114  0:000  KernelToPatch: 2 requested
0:114  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS: 10.12.x :: data len: 8 (don't have MatchBuild entry, have only MatchOS)
0:114  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: MatchOS:  :: MatchBuild:  :: data len: 8 
only your code. not work.

2:508  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
2:508  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> not allowed by build
cecekpawon + your code

1:667  0:000   - [00]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS: 10.12.x | MatchBuild: no] ==> allowed by OS
1:667  0:000   - [01]: MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha :: [OS: 10.12.5 | MatchOS:  | MatchBuild: ] ==> allowed by build
right. if log show "not set" or "emty", it will be useful.

 

Yep, the part I modded has nothing to do with empty strings. What I modified is the core of these/those set of functions and you confirm working as expected.

 

@Slice can you commit this code? this is my last request.

 

Farewell, keep up the good work Guys!  :wink_anim:

  • Like 2

Another bunch noob questions:

 

- What do those newly, since r4049, added patches do:

Fix EFIAPI in CloverEFI/CpuDxe

 

Is this somehow important?

 

- Tried to build an clover boot stick for a friend, he has a MS7707 mainboard and the bios seems to support UEFI. Now the problem is that 1. clover only loads in uefi mode  2. the recovery image usb stick of sierra will not be shown in the devices list. 

The recover was made from installesd.dmg converted to iso, and clover stick only has one fat32 partition (no efi partition afaik). hfsplus.efi and partition.efi are located in both, drivers64uefi and drivers64. vboxhfs was removed.

 

Any idea how to fix those two problems?

- What do those newly, since r4049, added patches do:

Fix EFIAPI in CloverEFI/CpuDxe

Revs 4050-4052 are for building using -t XCODE8. -t XCODE5 and -t GCC53 continue to work without them because they use ms_abi on all functions. It's explained in "Clover change explanations"

Yep, the part I modded has nothing to do with empty strings. What I modified is the core of these/those set of functions and you confirm working as expected.

 

@Slice can you commit this code? this is my last request.

 

Farewell, keep up the good work Guys!  :wink_anim:

Why you are retired? The codes need to be carefully tested and rectified.

Anyway, if MatchOS present but empty it can be logically interpreted as "nothing matches" and so disabled.

  • Like 1

2) ???

InstallESD.dmg hasn't contained necessary stuffs (boot.efi/kernel/kernel cache/com.apple.Boot.plist, etc) anymore since 10.9. (Or according to @DF it should be 10.8? Sorry, can't remember it clearly.)

 

Also, hope everything will be just fine with Micky... Build_Clover is an amazing repo, AppleHDA Patcher is too, although I prefer VoodooHDA...

  • Like 2

I have no task to install each new system on new clean computer. Usually I just press "Update" or start Install.app.

 

I must try that next time, too :)  Dunno why I always go the complicated way.

 

 

I have a small question:  My usb drives appear as internal drives and I want them to appear as yellow usb drives... Somehow I remember there was an option for that in clover?

 

EDIT: Also I now also have a drive entry in clover without a name... How to hide that?

I must try that next time, too :)  Dunno why I always go the complicated way.

 

 

I have a small question:  My usb drives appear as internal drives and I want them to appear as yellow usb drives... Somehow I remember there was an option for that in clover?

 

EDIT: Also I now also have a drive entry in clover without a name... How to hide that?

Clover has no special options for internal and orange drives. 

There is kext patch for this purpose exists.

To hide some entry look into config-sample.plist and compare with your boot.log.

  • Like 2

Clover has no special options for internal and orange drives. 

There is kext patch for this purpose exists.

To hide some entry look into config-sample.plist and compare with your boot.log.

Pity I only can find such patches for the opposite: Making usb drives appearing as internal... 

 

EDIT: Ok, it turns out that a USB-SATA bridge will appear as internal drive, but not an usb stick.

USB-SATA Bridge:

  Produkt-ID:	0x2773
  Hersteller-ID:	0x067b  (Prolific Technology, Inc.)

Ok sorry off topic then.

×
×
  • Create New...