Jump to content
4,261 posts in this topic

Recommended Posts

8 hours ago, ellaosx said:

what changed in v2922?

Update: oh my bad.. APFS :D

 

APFS is not (yet) inside the official build: I am still cleaning the code, so I told ErmaC to wait until I give him the green light.

However, if you are interested, you can follow the specific topic where the "unstable" Enoch versions with APFS support are posted.

Thanks for Enoch r2921, booting macOS 10.14.1 Beta just fine on my Asus laptop with 2nd Gen CPU + Nvidia GF119.

Oh yeah, I just realized it has embedded FakeSMC already.. so I previously got kernel panic when by mistake; placed VirtualSMC.kext on /E/E (I think).

Enoch-r2921.png

Edited by Badruzeus
  • Like 1
15 minutes ago, theconnactic said:

It’s great to see good old Chameleon’s still raging on!

Anyway, I lost my 2 preinstalled OSes upon Enoch boot; they are Ubuntu & Android x86 (UEFI). But strange is Windows (UEFI) is still there, uhmmb.. do I need to place "grubx64.efi" on USB's ESP (I was booting from this disk) for Linux based, and or do I need specific *.efi driver? Or, Enoch is currently still has no support for UEFI yet. No longer using Chameleon for long time, so.. I hope my quetions are still normal due to my ignorance. 

Edited by Badruzeus
6 hours ago, Badruzeus said:

Anyway, I lost my 2 preinstalled OSes upon Enoch boot; they are Ubuntu & Android x86 (UEFI). But strange is Windows (UEFI) is still there, uhmmb.. do I need to place "grubx64.efi" on USB's ESP (I was booting from this disk) for Linux based, and or do I need specific *.efi driver? Or, Enoch is currently still has no support for UEFI yet. No longer using Chameleon for long time, so.. I hope my quetions are still normal due to my ignorance. 

 

They are not "lost": It is just that Enoch does not recognize them.

I have to look inside the source code, but I would assume that there is support for at least Linux OSes...

 

Keep in mind that Enoch is completely different from Clover in its behavior:

- Clover uses the EFI binaries to boot an OS (That's why Clover got APFS from scratch, w/o any modification)

- Enoch is faking EFI structures, and does not "understand" .efi files

 

So, adding .efi files is a "no-op".

 

  • 8 months later...
On 6/29/2019 at 7:56 PM, Badruzeus said:

Will Chameleon or Enoch support booting Catalina? Thanks.


Porting from Clover r4979 with new EXT, SIP, HP Lapic-Error kernel patch method.

Compile the Enoch boot based on Enoch r2921, with patched kernel_patcher_internal.c.

Works fine here on 10.11, 10.12, 10.13, 10.14, 10.15 MBR HFS+ partition, not test for HP Lapic-Error.

 

@ErmaC FYI.

 

 

v2. fix typo.

Enoch-2922-10_15.thumb.jpg.0f51c8e97b160530874d54f56ff2b06b.jpg

Edited by crazybirdy
  • Like 4
  • Thanks 1
On 7/1/2019 at 7:50 AM, crazybirdy said:


Porting from Clover r4979 with new EXT, SIP, HP Lapic-Error kernel patch method.

Compile the Enoch boot based on Enoch r2921, with patched kernel_patcher_internal.c.

Works fine here on 10.12, 10.13, 10.14, 10.15 MBR HFS+ partition, not test for HP Lapic-Error.

 

@ErmaC FYI.

 

Enoch-r2922-10.15-code-v2.zip

v2. fix typo.

Enoch-2922-10_15.thumb.jpg.0f51c8e97b160530874d54f56ff2b06b.jpg

Thx crazybirdy.

 

Here the pkg builded with the modification...

 

I just add icon boot volume the name is like device_hfsplus_cat.png and device_hfsplus_cat_o.png

removed

No time to other thing sorry

Cordially

ErmaC

  • Like 3
  • Thanks 1
On 7/2/2019 at 3:54 AM, ErmaC said:

Thx crazybirdy.

 

Here the pkg builded with the modification...

Enoch-rev.2922.zip

I just add icon boot volume the name is like device_hfsplus_cat.png and device_hfsplus_cat_o.png

 

No time to other thing sorry

Cordially

ErmaC

 

Great, the pkg works fine here on on 10.11, 10.12, 10.13, 10.14, 10.15.:thumbsup_anim:

 

@ErmaC

update v3, works fine here on on 10.11, 10.12, 10.13, 10.14, 10.15.

1.fix typo,

2.remove KernelLapicVersion, we need KernelLapicError for HP BIOS only, never need KernelLapicVersion.

 

@ErmaC

Again, Clean up code to remove KernelLapicVersion.

V4 works fine here on on 10.11, 10.12, 10.13, 10.14, 10.15.

 

Edited by crazybirdy
clean up code to remove KernelLapicVersion.
  • Like 3
  • Thanks 2
On 7/2/2019 at 1:06 AM, crazybirdy said:

 

@ErmaC

update v3, works fine here on on 10.11, 10.12, 10.13, 10.14, 10.15.

1.fix typo,

2.remove KernelLapicVersion, we need KernelLapicError for HP BIOS only, never need KernelLapicVersion.

Enoch-r2922-10.15-v3.zip 

 

Thx again :)-

Upped here --> 

 

  • Like 4
  • Thanks 1

Succeeded boot 10.15 on my Asus A43SJ with Enoch r2922 (Legacy, HFS+ partition). Got KP several times previously after placing FakeSMC / VirtualSMC kext on /Extra/Extensions till I realized that Enoch already embedded FakeSMC lol.. Many thanks.

Catalina-Enoch-r2922.png

  • Like 3
On 7/6/2019 at 2:07 AM, ErmaC said:

 

Thx again :)-

Upped here --> 

 

 

Hi ErmaC,

 

The KernelPatches on kernel.plist, and KextsPatches on kexts.plist didn't work well.

Do you know how to solve it?

It seems "Unable to find the _PrelinkInfoDictionary" issue.

 

I can patch it manually, but on the fly didn't work.

 

01.thumb.gif.e6236275b7a550c83f503a770c612104.gif

[ KERNEL PATCHER START ]

	Will patch for 18.6.0 kernel version compatible.

	KernelBooter_kexts state:  enabled!
	KernelPm           state:  enabled!
	KernelLapicError   state:  enabled!
	KernelHaswell      state: disabled!
	KernelcpuFamily    state: disabled!
	KernelSSE3         state: disabled!
	- Searching for booter extensions pattern:
	Found EXT pattern (10.8 - recent macOS): patched!
	Found SIP pattern (10.11 - 10.14): patched!
	2 substitution(s) made.
	- Looking for Lapic panic call Start
	Found Lapic panic (10.10 - recent macOS) at 0x002E374F
	Patched Lapic panic (10.10 - recent macOS)
	Found Lapic panic master (10.10 - recent macOS) at 0x002E3737
	Patched Lapic panic master (10.10 - recent macOS)
	Lapic Error call removed.
	- Patching kernel power management...
	Kernel power management patch 10.1x(data2) found and patched
	Kernel power management patch 10.12 DP1 found and patched
	Power Managment patch applied.
	Patching kernel [Item 0] (Disable panic loaded kexts list A) MatchOS[ 10.13.x,10.14.4,10.14.5,10.14.6,10.15.x ] MatchBuild[ not set ]: 
			User Error, Find is bigger than the hole data, patch skipped
Kernel patcher: end!

[ KEXTS PATCHER START ]
Unable to find the _PrelinkInfoDictionary, kexts patcher skipped.Kexts patcher: end!




	Patching AppleAHCIPort (orange icon fix): 3 substitutions made!
	Patching AppleAHCIPort [Item 0] (Fix ICH10 Hot-plug issue) MatchOS[ 10.13.x,1014.x,10.15.x ] MatchBuild[ not set ]: 0 substitutions made!
	Patching AppleAHCIPort [Item 1] (Fix ICH10 disk I/O error issue) MatchOS[ 10.13.x ] MatchBuild[ not set ]: 0 substitutions made!
	Patching AppleIntelCPUPowerManagement (locked msr):
	1 wrmsr patched at 0x90E7
	2 wrmsr patched at 0x919A
	3 wrmsr patched at 0x91B0
	4 wrmsr patched at 0x92CE
	5 wrmsr patched at 0x9BEF
	6 wrmsr patched at 0xA634
	7 wrmsr patched at 0xAA42
	8 wrmsr patched at 0x102DC
	9 wrmsr patched at 0x11723
	10 wrmsr patched at 0x12808
	  10 substitutions made!
	Patching AppleRTC: 0 substitutions made!
	Patching IOAHCIBlockStorage (trim enabler SATA): 1 substitutions made!

kernel+kexts.plist.zip

 

It seems the _PrelinkInfoDictionary issue on /i386/boot2/kernel_patcher_internal.c.

Do you know how to fix it?

    verbose("[ KEXTS PATCHER START ]\n");
    //int lessBytes = (int)((uncompressed_size/3)*2); // speedup, the _PrelinkInfoDictionary should not be 1/3 of entire cache!
    for (Index = 0/*lessBytes*/; Index < uncompressed_size; ++Index)
    {
        //scan for _PrelinkInfoDictionary
        if (Bytes[Index]         == 0x3C
            && Bytes[Index + 1]  == 0x64
            && Bytes[Index + 2]  == 0x69
            && Bytes[Index + 3]  == 0x63
            && Bytes[Index + 4]  == 0x74
            && Bytes[Index + 5]  == 0x3E
            && Bytes[Index + 6]  == 0x3C
            && Bytes[Index + 7]  == 0x6B
            && Bytes[Index + 8]  == 0x65
            && Bytes[Index + 9]  == 0x79
            && Bytes[Index + 10] == 0x3E
            && Bytes[Index + 11] == 0x5F
            && Bytes[Index + 12] == 0x50
            && Bytes[Index + 13] == 0x72
            && Bytes[Index + 14] == 0x65
            && Bytes[Index + 15] == 0x6C
            && Bytes[Index + 16] == 0x69
            && Bytes[Index + 17] == 0x6E
            && Bytes[Index + 18] == 0x6B
            && Bytes[Index + 19] == 0x49
            && Bytes[Index + 20] == 0x6E
            && Bytes[Index + 21] == 0x66
            && Bytes[Index + 22] == 0x6F
            && Bytes[Index + 23] == 0x44
            && Bytes[Index + 24] == 0x69
            && Bytes[Index + 25] == 0x63
            && Bytes[Index + 26] == 0x74
            && Bytes[Index + 27] == 0x69
            && Bytes[Index + 28] == 0x6F
            && Bytes[Index + 29] == 0x6E
            && Bytes[Index + 30] == 0x61
            && Bytes[Index + 31] == 0x72
            && Bytes[Index + 32] == 0x79
            && Bytes[Index + 33] == 0x3C
            && Bytes[Index + 34] == 0x2F
            && Bytes[Index + 35] == 0x6B
            && Bytes[Index + 36] == 0x65
            && Bytes[Index + 37] == 0x79
            && Bytes[Index + 38] == 0x3E)
        {
            Count++;
            prelinkDictStartLocation = Index;
            DBG("\tFound _PrelinkInfoDictionary at 0x%08X index = %d\n", (unsigned int)prelinkDictStartLocation, Index);
            canPatchKexts = true;
            break;
        }
    }

    if (prelinkDictStartLocation)
    {
        for (Index = prelinkDictStartLocation; Index < uncompressed_size; ++Index)
        {
            // end of prelink ( <> plus some zeros)
            if (Bytes[Index]         == 0x3C
                && Bytes[Index + 1]  == 0x2F
                && Bytes[Index + 2]  == 0x64
                && Bytes[Index + 3]  == 0x69
                && Bytes[Index + 4]  == 0x63
                && Bytes[Index + 5]  == 0x74
                && Bytes[Index + 6]  == 0x3E
                && Bytes[Index + 7]  == 0x00
                && Bytes[Index + 8]  == 0x00
                && Bytes[Index + 9]  == 0x00
                && Bytes[Index + 10] == 0x00
                && Bytes[Index + 11] == 0x00
                && Bytes[Index + 12] == 0x00
                && Bytes[Index + 13] == 0x00)
            {
                Count++;

                if ((Count = 2))
                {
                    canPatchKexts = true;
                    prelinkDictEndLocation = Index + 7 ;
                    DBG("\tFound _PrelinkInfoDictionary end location at 0x%08X index = %d\n", (unsigned int)prelinkDictEndLocation, Index);
                }
                break;
            }
        }
    }

 

 

 

Edited by crazybirdy
15 hours ago, crazybirdy said:

 

Hi ErmaC,

 

The KernelPatches on kernel.plist, and KextsPatches on kexts.plist didn't work well.

Do you know how to solve it?

It seems "Unable to find the _PrelinkInfoDictionary" issue.

 

I can patch it manually, but on the fly didn't work

....

 

It seems the _PrelinkInfoDictionary issue on /i386/boot2/kernel_patcher_internal.c.

Do you know how to fix it?

 

Hi crazybird.

This occur on the new 10.15 (Catalina?) or also occur in previus macOS version like mojave or hSierra?

 

Not sure but probably the part on boot2/drivers.c (start from line1558) need to be update too... latest info are for HSierra!!! missed Mojave and Catalina (I think also the latest kernel info for HSierra is not completly correct)

 

ErmaC

 

On 7/9/2019 at 3:48 AM, ErmaC said:

 

Hi crazybird.

This occur on the new 10.15 (Catalina?) or also occur in previus macOS version like mojave or hSierra?

 

Not sure but probably the part on boot2/drivers.c (start from line1558) need to be update too... latest info are for HSierra!!! missed Mojave and Catalina (I think also the latest kernel info for HSierra is not completly correct)

 

ErmaC

 

 

It still didn't work after update /i386/boot2/drivers.c

Enoch-r2922-10.15-v5.zip

 

I never use KernelPatches on kernel.plist, and KextsPatches on kexts.plist before.

This is the first time I use it.

 

And test with Enoch r2872, r2911 on 10.12 with KextsPatches on kexts.plist.

No lucky too.

Maybe it never work before.:)

 

 

Edited by crazybirdy
update Enoch-r2922-10.15-v5
  • Like 1
On 7/9/2019 at 3:24 AM, crazybirdy said:

And test with Enoch r2872, r2911 on 10.12 with KextsPatches on kexts.plist.

No lucky too.

Maybe it never work before.:)

 

Sorry...

As soon I can the latest changes&diff will be merged on the svn

Maybe someone can give a light... 

 

Cordially

 

ErmaC

I can suggest to load the entire file until the end instead of searching for the last tag?

if (prelinkDictStartLocation)
{
	prelinkDictEndLocation = uncompressed_size;
}

or whatever is the end of the entire prelinkedkernel.

11 hours ago, vector sigma said:

I can suggest to load the entire file until the end instead of searching for the last tag?


if (prelinkDictStartLocation)
{
	prelinkDictEndLocation = uncompressed_size;
}

or whatever is the end of the entire prelinkedkernel.

 

My bad, it's not i386/boot2/kernel_patcher_internal.c issue.

"Unable to find the _PrelinkInfoDictionary" is always happened with -f.

 

It seems to be i386/libsaio/binaryPatcher.c issue.

TagPtr FindPtr    = XMLGetProperty(index, (const char*)"Find");
TagPtr ReplacePtr = XMLGetProperty(index, (const char*)"Replace");

It seems can't patch with correct "Find" and "Replace".

01.gif.e6b102cf70c3df295053b46dc5282d6d.gif

 

10126-bdmesg.zip

Need your help to fix it.:)

 

FYI.

i386/boot2/kernel_patcher_internal.c

unsigned int patch_AppleAHCIPort_OrangeFix(void *data, UInt32 DriverSize, UInt32 StartLocation)
{
    // as far as I know this works from lion onward
    UInt8   Find[]    = { 0x45, 0x78, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C };
    UInt8   Replace[] = { 0x49, 0x6E, 0x74, 0x65, 0x72, 0x6E, 0x61, 0x6C };
    unsigned int count = FindAndReplace(data,
                                        DriverSize,
                                        StartLocation,
                                        Find,
                                        sizeof(Find),
                                        Replace,
                                        0);
    
    return count;
}

 

Edited by crazybirdy
  • Like 1
Just now, crazybirdy said:

boot with -f, load kernel and kexts.

boot without -f, load prelinkedkernel.

You just found out why cannot found '_PrelinkInfoDictionary'. If you run the kernel '_PrelinkInfoDictionary' surely can't be there. So I suppose is just a cosmetics issue and you should just silent the message when -f is given. I guess.

1 hour ago, vector sigma said:

You just found out why cannot found '_PrelinkInfoDictionary'. If you run the kernel '_PrelinkInfoDictionary' surely can't be there. So I suppose is just a cosmetics issue and you should just silent the message when -f is given. I guess.

No,

boot without -f, load prelinkedkernel, it found _PrelinkInfoDictionary as normal, and run the kexts patcher.

boot with -f, load kernel and kexts, it "Unable to find the _PrelinkInfoDictionary, kexts patcher skipped.Kexts patcher: end!.", but still run the kexts patcher after load /System/Library/Extensions.

 

I mean, "Unable to find the _PrelinkInfoDictionary, kexts patcher skipped.Kexts patcher: end!." is not the issue.

 

The problem is i386/libsaio/binaryPatcher.c issue as above.

It can't patch with correct "Find" and "Replace".

 

5 minutes ago, vector sigma said:

Can I take a look at this file?

 

divers.c

for boot with -f, load kernel and kexts,

run the kexts patcher (line 1027) pach_binaryUsingDictionary(executableAddr, (UInt32)length, 0, fileName, KextsPatches);

after load /System/Library/Extensions (line 316).

 

kernel_patcher_internal.c

for boot without -f, load prelinkedkernel,

run the kexts patcher pach_binaryUsingDictionary (line 1958)

 

binaryPatcher.c

pach_binaryUsingDictionary

TagPtr FindPtr    = XMLGetProperty(index, (const char*)"Find");
TagPtr ReplacePtr = XMLGetProperty(index, (const char*)"Replace");

 

10126-bdmesg+code.zip :)

 

http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/ErmaC/Enoch/i386/boot2/kernel_patcher_internal.c

http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/ErmaC/Enoch/i386/boot2/drivers.c

http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/ErmaC/Enoch/i386/libsaio/binaryPatcher.c

46 minutes ago, crazybirdy said:

boot with -f, load kernel and kexts, it "Unable to find the _PrelinkInfoDictionary, kexts patcher skipped.Kexts patcher: end!.", but still run the kexts patcher after load /System/Library/Extensions.

It's clear that with -f it patch loaded kexts from SLE, why I said it's normal that cannot found the _PrelinkInfoDictionary.

About this error instead:  

User Error, Find is bigger than the hole data, patch skipped

I'm worried about "sizeof(FindPtr->data)" and comparing to dataLen. I suspect sizeof(FindPtr->data) produces different result you expected.

5 minutes ago, vector sigma said:

It's clear that with -f it patch loaded kexts from SLE, why I said it's normal that cannot found the _PrelinkInfoDictionary.

About this error instead:  


User Error, Find is bigger than the hole data, patch skipped

I'm worried about "sizeof(FindPtr->data)" and comparing to dataLen. I suspect sizeof(FindPtr->data) produces different result you expected.

That's maybe the issue, but we should focus on only one condition.

 

boot without -f, load prelinkedkernel,

 

The kext patcher didn't work right.

But I don't know how to fix it.:(

×
×
  • Create New...