Jump to content

6 posts in this topic

Recommended Posts

Hello Everyone,
 
For those of you interested in taking a look at the KernelPatcher module, source code for an upcoming version of the module has been opened into public xZenue svn repository here: http://public.xzenue.com/websvn/listing.php?repname=KernelPatcher
 
If you have any bugs or patches that you'd like to make, we can handle it here and then send to https://public.xzenue.com/bugzilla/
 
Do note that the source code has the same license as the previous KernelPatcher module releases: KernelPatcher is licensed under the Attribution-NonCommercial 3.0 Unported license. A copy of the license file is included in the svn repository.
 
We'd also like to request that forks are not made of the KernelPatcher module, instead, we'd like to integrate any good and useful changes into the official release.

 


 

Here the source code. I just adapt it to compile fine with latest Chameleon from the voodoo SVN.

KernelPatcher.zip

download it and move the KernelPatcher folder into the trunk/i386/modules/KernelPatcher (remove the existing one)

 

And here the compiled version of that module.

KernelPatcher.dylib.zip

 

 


 

I hope we can improve that module!

 

Cordially

 

ErmaC

Share this post


Link to post
Share on other sites
Advertisement

For those wodnering, there are two methods to extend the kernel patcher without modifying the source code:

 

(1) Create a module that registers for the "Kernel Patched" hook. This will pass the kernel address, as well a symbol information to your module, allowing for your code to lookup function addresses and perform patches

 

-- or --

 

(2) Create a new kext in Xcode, write your function in C, and compile it. If the kext is located in a special location and has a few properties in it, it'll result in the functions you wrote being used instead of ones in kernel. Currently it's only written for 32bit kernels (I need to update it for 64bit), but it does allow for easy and nice patches to be written. If you'd like an example of  a patch or two, let me know. 

 

EDIT: actually, I just added in the LAPIC patch to the examples/ folder in svn. Take a look at it for an example on how to write the patches in C. You may want to compare the source to the original xnu source to see what changed.

Share this post


Link to post
Share on other sites
Hi meklort,
 
now Chameleon is able to boot Yosemite using the kernelcache lzvn compressed (thanks to AnV for deconding it, and MinusZwei to porting it in C)
...but using kernelpatcher module the system reboot after some seconds, the screen become gray, and the only "verbose" I can see are:
lapic panic removed...
lapic interrup removed...

KLDBootstrap:...... call injected into ....

Seem to do some..

 

Can you hypothesize possible remedies to be taken? 
thanks

 

Micky

 

Share this post


Link to post
Share on other sites

Hello Everyone,

 

For those of you interested in taking a look at the KernelPatcher module, source code for an upcoming version of the module has been opened into public xZenue svn repository here: http://public.xzenue.com/websvn/listing.php?repname=KernelPatcher

 

If you have any bugs or patches that you'd like to make, we can handle it here and then send to https://public.xzenue.com/bugzilla/

 

Do note that the source code has the same license as the previous KernelPatcher module releases: KernelPatcher is licensed under the Attribution-NonCommercial 3.0 Unported license. A copy of the license file is included in the svn repository.

 

We'd also like to request that forks are not made of the KernelPatcher module, instead, we'd like to integrate any good and useful changes into the official release.

 


 

Here the source code. I just adapt it to compile fine with latest Chameleon from the voodoo SVN.

attachicon.gifKernelPatcher.zip

download it and move the KernelPatcher folder into the trunk/i386/modules/KernelPatcher (remove the existing one)

 

And here the compiled version of that module.

attachicon.gifKernelPatcher.dylib.zip

 

 


 

I hope we can improve that module!

 

Cordially

 

ErmaC

@ErmaC

 

Hello again Mate :)

It seems that compling the source from chameleon does not work anymore.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By kylon
      Cloud Clover Editor is an open source application that allows you to manage the configuration of various Hackintosh Bootloaders.

      Open Cloud Clover Editor
       
      Cloud Clover Editor Wiki
      Cloud Clover Editor Sources
       
       
      Features
      Supports Clover EFI, Ozmosis, Chameleon, OpenCore GUI and Text Editor Mode CCE Bank Mobile friendly and more...  
      Officially supported browsers
      Chrome 42+ Microsoft Edge 14+ Firefox 39+ Safari 10+ Opera 29+ Opera Mobile 12+ Chrome for Android 75+ Firefox for Android 67+  
       
      Credits
      mackie100 - took some ideas from his app Clover EFI dev team Eric Slivka - new serial number Virtual1 - new serial number cecekpawon - PHP 5.3.3 patch, , help with the ACPI Loader Mode flag and more Micky1979 - Clover flying editor  (Discontinued) crusher. - Help with the ACPI Loader Mode flag Download-Fritz - Help with the ACPI Loader Mode flag Pavo - Ozmosis fields and values stehor - Ozmosis fields and values Sherlocks - General help and support gujiangjiang - General help and support  
      Please let me know if i forgot you!
    • By ciriousjoker
      TLDR:
      I'm trying to boot MacOS on a Chromebook without UEFI. I'm stuck at getting the bootloader (Chameleon/Clover) to work.  
      My setup / context:
      I have an Acer Chromebook Spin 13.
      Available ports:
      2 x USB-C 1 x USB-A 3.0 MicroSD Slot No USB A 2.0 (I've read that Clover has problems with USB 3.0) Firmware:
      There's no UEFI firmware available and by default, it doesn't even allow booting anything other than ChromeOS. Thanks to MrChromebox (big shoutouts!), I flashed a custom legacy bios that allows me to boot anything linux related. This bios is flashed into the RW_LEGACY section of the existing bootloader (coreboot afaik) and doesn't have any configuration options. If I have to change a setting, I could try compiling his bios payload myself with the specific setting enabled.  
      What I've tried so far:
      Chameleon attempts:
      Only selected setting was "Install chameleon on the chosen path", rest was unselected.
       
      1 - Install chameleon first without restoring the basesystem:
      Output:
      > boot0: GPT
      > boot0: done
      (hangs; pressing power button once shuts down
      Chameleon installation log is attached as "Chameleon_Installer_Log_BEFORE".
       
      2 - Install Chameleon after restoring the base system:
      Output:
      > boot0: GPT
      > boot0: GPT
      > boot0: doneboot1: /boot       <- Exactly like that, no line break in between
      (hangs; pressing power button once shuts down)
       
      I haven't been able to reproduce #2 after wiping the drive and doing the same thing again. Subsequent attempts have resulted in either #1 of either Chameleon or Clover.
      Chameleon installation log is attached as "Chameleon_Installer_Log_AFTER".
       
      Clover attempts:
      I tried multiple settings and configurations, but all of them boiled down to either one of these.
       
      1 - Doesn't do anything, just hangs at "Booting from usb..."
      2 - Boots into the blue/grey mode as shown in the attached images.
      According to MrChromebox, this could be an old Tianocore DUET It doesn't detect anything (cpu frequency, ram, partitions or disks)  
      I've read pretty much every article, github readme and other types of documentation for coreboot, tianocore, clover, chameleon and MrChromebox' rw_legacy payloads and right now, I'm totally clueless as to what to try next...
       
      A few questions that came up:
      Why does chameleon hang? What is it looking for, /boot was clearly written to the disk by the Chameleon installer? What exactly is the blue/grey image? According to MrChromebox, it could be Tianocore DUET Where does it come from? Clover? The mainboard itself? Why does the blue/grey thing not detect my processor frequency or any partitions/drives? Can I use some sort of DUET bootloader to chainload Clover?  
      If you guys could answer any of them or if you have any other guesses or information as to what's happening, I'd be really happy!
      Chameleon_Installer_Log_BEFORE.txt
      Chameleon_Installer_Log_AFTER.txt





    • By bradipi15
      Ciao ragazzi ho un problema strano... 
      Praticamente quando avvio il pc usando il dsdt, appena connetto la tavoletta grafica huion h640p, il pc si riavvia... 
      Se invece tolgo il dsdt, funziona tutto perfettamente... 
    • By Fede1132
      Hi guys i have a problem install macOs Mojave on my PC, I have this configuration:

      CPU: Ryzen 7 2700X;
      GPU1: GTX 970 Strix(For game rendering and 144Hz Monitor);
      GPU2: GTX 750ti Strix(For 2nd monitor rendering to get 100% performances from 1st 144Hz Monitor);
      MotherBoard: MSI x470 GAMING PLUS
      Hard Disk 1 (Windows 10): Samsung EVO M.2;
      Hard Disk 2 (For Storage): RAID (1) between two hard disks;
      Hard Disk 3 (For Mojave): Kingston SSD 120GB;

      I have created my USB with this:
       
      Create Bootable USB Code: sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USB -- /Applications/Install\ macOS\ Mojave.app -- nointeract && say Done. Clover Settings: Boot: Verbose; dart=0; nv_disable=0; kext-dev-mode=1; GraphicsEnabler=No; XMPDetection = No. Cpu: C6. Devices: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Inject (Full Enabled); Add ClockID (Full Enabled); FixOwnership (Full Enabled); Gui: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Enabled (Full Enabled); Screen Resolution: 1920x1080; Kernel and Kext Patches: (Not Enabled = [ ] - Enabled = [-] - Full Enabled [✓]) Apple RTC (Full Enabled); KernelPm (Full Enabled); SMBIOS: iMac(18,3); System Parameters: Inject Kexts = Yes; Inject System ID; Used Kexts: FakeSMC FakePCIID NVIDIA WEB LILU BIOS: VT-d = Disabled; XHCI Hand-Off = Enabled; Legacy USB Support: Enabled; Hard Disk: AHCI Mode; Selection Mode: Legacy + EUFI; Clover Install Log:
      Full Error Log:
       
    • By Slickademo
      I got a Hackintosh I use for music production. 
      Gigabyte z370 Gaming 7
      I7 8700k
      64 GB RAM
      Sapphire Vega 64
       
       
      I can't get through mixing a song or working on a song without my computer randomly crashing. I already tried replacing the RAM and it did nothing. 
      Here's a crash report :
       
       
      Anonymous UUID:       E1AFFE16-EE3F-B507-9C69-7C0ECA36C3A2
      Fri Dec 28 15:18:09 2018
      *** Panic Report ***
      panic(cpu 0 caller 0xffffff80032bc002): "Possible memory corruption: pmap_pv_remove(0xffffff80a21a12e0,0x13a65f000,0xed1827, 0x8000000ed1827066, 0xfffffe93b7fd22f8): empty hash, priors: 0"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.231.4/osfmk/i386/pmap_internal.h:842
      Backtrace (CPU 0), Frame : Return Address
      0xffffffa762b0b930 : 0xffffff80031aeafd 
      0xffffffa762b0b980 : 0xffffff80032e85a3 
      0xffffffa762b0b9c0 : 0xffffff80032d9fca 
      0xffffffa762b0ba30 : 0xffffff800315bca0 
      0xffffffa762b0ba50 : 0xffffff80031ae517 
      0xffffffa762b0bb70 : 0xffffff80031ae363 
      0xffffffa762b0bbe0 : 0xffffff80032bc002 
      0xffffffa762b0bcd0 : 0xffffff80032bcaf7 
      0xffffffa762b0bd30 : 0xffffff8003243cec 
      0xffffffa762b0be80 : 0xffffff800324b3d2 
      0xffffffa762b0bec0 : 0xffffff80031a1833 
      0xffffffa762b0bef0 : 0xffffff80032c170b 
      0xffffffa762b0bfa0 : 0xffffff800315c486 
      BSD process name corresponding to current thread: Reason
      Boot args: dart=0 
      Mac OS version:
      18C54
      Kernel version:
      Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64
      Kernel UUID: 56B30885-F9BA-30E8-AD1C-5D59EC243BA9
      Kernel slide:     0x0000000002e00000
      Kernel text base: 0xffffff8003000000
      __HIB  text base: 0xffffff8002f00000
      System model name: iMac18,3 (Mac-BE088AF8C5EB4FA2)
      System uptime in nanoseconds: 541467231994
      last loaded kext at 256510804912: com.apple.filesystems.msdosfs    1.10 (addr 0xffffff7f87b32000, size 69632)
      last unloaded kext at 317416840242: com.apple.filesystems.msdosfs    1.10 (addr 0xffffff7f87b32000, size 61440)
      loaded kexts:
      com.apogeedigital.kextElementEnsemble    0.8.2
      com.insanelymac.AtherosE2200Ethernet    2.2.2
      com.insanelymac.IntelMausiEthernet    2.4.0
      as.vit9696.AppleALC    1.3.3
      as.vit9696.WhateverGreen    1.2.4
      as.vit9696.Lilu    1.2.8
      org.netkas.driver.FakeSMC    1800
      com.apple.filesystems.smbfs    3.3.1
      com.apple.driver.AudioAUUC    1.70
      com.apple.fileutil    18.306.12
      com.apple.filesystems.autofs    3.0
      com.apple.driver.AppleUpstreamUserClient    3.6.5
      com.apple.driver.AppleMCCSControl    1.5.6
      com.apple.kext.AMDFramebuffer    2.0.4
      com.apple.kext.AMDRadeonX5000    2.0.4
      com.apple.AGDCPluginDisplayMetrics    3.28.4
      com.apple.driver.AppleHV    1
      com.apple.iokit.IOUserEthernet    1.0.1
      com.apple.iokit.IOBluetoothSerialManager    6.0.9f2
      com.apple.driver.pmtelemetry    1
      com.apple.Dont_Steal_Mac_OS_X    7.0.0
      com.apple.kext.AMD10000Controller    2.0.4
      com.apple.driver.AppleOSXWatchdog    1
      com.apple.driver.ACPI_SMC_PlatformPlugin    1.0.0
      com.apple.driver.AppleGFXHDA    100.1.40
      com.apple.driver.AppleIntelPCHPMC    2.0.1
      com.apple.driver.AppleIntelSlowAdaptiveClocking    4.0.0
      com.apple.driver.AppleVirtIO    2.1.2
      com.apple.filesystems.hfs.kext    407.200.4
      com.apple.AppleFSCompression.AppleFSCompressionTypeDataless    1.0.0d1
      com.apple.BootCache    40
      com.apple.AppleFSCompression.AppleFSCompressionTypeZlib    1.0.0
      com.apple.AppleSystemPolicy    1.0
      com.apple.filesystems.apfs    945.230.6
      com.apple.driver.AppleAHCIPort    329.200.2
      com.apple.private.KextAudit    1.0
      com.apple.driver.AppleACPIButtons    6.1
      com.apple.driver.AppleRTC    2.0
      com.apple.driver.AppleHPET    1.8
      com.apple.driver.AppleSMBIOS    2.1
      com.apple.driver.AppleAPIC    1.7
      com.apple.nke.applicationfirewall    190
      com.apple.security.TMSafetyNet    8
      com.apple.kext.triggers    1.0
      com.apple.driver.AppleSMBusController    1.0.18d1
      com.apple.iokit.IOSMBusFamily    1.1
      com.apple.kext.AMDRadeonX5000HWLibs    1.0
      com.apple.iokit.IOAcceleratorFamily2    404.2.2
      com.apple.kext.AMDRadeonX5000HWServices    2.0.4
      com.apple.iokit.IOAVBFamily    710.1
      com.apple.plugin.IOgPTPPlugin    700.7
      com.apple.iokit.IOEthernetAVBController    1.1.0
      com.apple.driver.AppleSSE    1.0
      com.apple.iokit.IOSurface    255.1
      com.apple.driver.IOPlatformPluginLegacy    1.0.0
      com.apple.iokit.IONDRVSupport    530
      com.apple.driver.IOPlatformPluginFamily    6.0.0d8
      com.apple.AppleGPUWrangler    3.28.4
      com.apple.kext.AMDSupport    2.0.4
      com.apple.AppleGraphicsDeviceControl    3.28.4
      com.apple.iokit.IOGraphicsFamily    530.14
      com.apple.iokit.IOSlowAdaptiveClockingFamily    1.0.0
      com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport    6.0.9f2
      com.apple.iokit.IOBluetoothHostControllerUSBTransport    6.0.9f2
      com.apple.iokit.IOBluetoothHostControllerTransport    6.0.9f2
      com.apple.iokit.IOBluetoothFamily    6.0.9f2
      com.apple.driver.usb.IOUSBHostHIDDevice    1.2
      com.apple.iokit.IOAudioFamily    206.5
      com.apple.vecLib.kext    1.2.0
      com.apple.driver.AppleUSBHostMergeProperties    1.2
      com.apple.driver.usb.networking    5.0.0
      com.apple.driver.usb.AppleUSBHostCompositeDevice    1.2
      com.apple.driver.usb.AppleUSBHub    1.2
      com.apple.iokit.IOSerialFamily    11
      com.apple.filesystems.hfs.encodings.kext    1
      com.apple.driver.usb.AppleUSBHostPacketFilter    1.0
      com.apple.iokit.IOUSBFamily    900.4.2
      com.apple.iokit.IOAHCIBlockStorage    301.200.2
      com.apple.driver.AppleThunderboltNHI    4.7.6
      com.apple.iokit.IOThunderboltFamily    6.8.1
      com.apple.iokit.IONVMeFamily    2.1.0
      com.apple.iokit.IOAHCIFamily    288
      com.apple.driver.usb.AppleUSBXHCIPCI    1.2
      com.apple.driver.usb.AppleUSBXHCI    1.2
      com.apple.driver.AppleEFINVRAM    2.1
      com.apple.driver.AppleEFIRuntime    2.1
      com.apple.iokit.IOHIDFamily    2.0.0
      com.apple.security.quarantine    3
      com.apple.security.sandbox    300.0
      com.apple.kext.AppleMatch    1.0.0d1
      com.apple.driver.DiskImages    493.0.0
      com.apple.driver.AppleFDEKeyStore    28.30
      com.apple.driver.AppleEffaceableStorage    1.0
      com.apple.driver.AppleKeyStore    2
      com.apple.driver.AppleUSBTDM    456.230.1
      com.apple.driver.AppleMobileFileIntegrity    1.0.5
      com.apple.kext.CoreTrust    1
      com.apple.iokit.IOUSBMassStorageDriver    145.200.2
      com.apple.iokit.IOSCSIBlockCommandsDevice    408.200.1
      com.apple.iokit.IOSCSIArchitectureModelFamily    408.200.1
      com.apple.iokit.IOStorageFamily    2.1
      com.apple.driver.AppleCredentialManager    1.0
      com.apple.driver.KernelRelayHost    1
      com.apple.iokit.IOUSBHostFamily    1.2
      com.apple.driver.usb.AppleUSBCommon    1.0
      com.apple.driver.AppleBusPowerController    1.0
      com.apple.driver.AppleSEPManager    1.0.1
      com.apple.driver.IOSlaveProcessor    1
      com.apple.iokit.IOReportFamily    47
      com.apple.iokit.IOTimeSyncFamily    700.7
      com.apple.iokit.IONetworkingFamily    3.4
      com.apple.driver.AppleACPIPlatform    6.1
      com.apple.driver.AppleSMC    3.1.9
      com.apple.iokit.IOPCIFamily    2.9
      com.apple.iokit.IOACPIFamily    1.4
      com.apple.kec.pthread    1
      com.apple.kec.Libm    1
      com.apple.kec.corecrypto    1.0
      EOF
      System Profile:
      Thunderbolt Bus: 
      Boot Volume File System Type: apfs
      Memory Module: BANK 0/DIMM0, 16 GB, DDR4, 2666 MHz, Crucial Technology, BLS16G4D26BFSE.16FBD
      Memory Module: BANK 1/DIMM0, 16 GB, DDR4, 2666 MHz, Crucial Technology, BLS16G4D26BFSE.16FBD
      Memory Module: BANK 0/DIMM1, 16 GB, DDR4, 2666 MHz, Crucial Technology, BLS16G4D26BFSE.16FBD
      Memory Module: BANK 1/DIMM1, 16 GB, DDR4, 2666 MHz, Crucial Technology, BLS16G4D26BFSE.16FBD
      USB Device: USB 3.1 Bus
      USB Device: USB2.0 Hub
      USB Device: USB2.0 Hub
      USB Device: Macally XKEYLED USB Keyboard
      USB Device: USB3.0 Hub
      USB Device: USB3.0 Hub
      USB Device: USB 3.1 Bus
      USB Device: USB 3.1 Bus
      USB Device: USB 3.0 Bus
      USB Device: 4-Port USB 3.0 Hub
      USB Device: H150i Platinum
      USB Device: iLok
      USB Device: CodeMeter-Stick
      USB Device: Apogee Control
      USB Device: Macally ECOMouse
      USB Device: USB Axiom 49
      USB Device: Back-UPS RS 1500G FW:865.L5 .D USB FW:L5
      USB Device: 4-Port USB 2.0 Hub
      USB Device: BCM20702A0
      Serial ATA Device: ST2000DX002-2DV164, 2 TB
      Model: iMac18,3, BootROM 166.0.0.0.0, 6 processors, Intel Core i7, 3.70 GHz, 64 GB, SMC 2.41f1
      Graphics: Radeon RX Vega 64, Radeon RX Vega 64, PCIe
      Network Service: Ethernet 2, Ethernet, en1
      Bluetooth: Version 6.0.9f2, 3 services, 27 devices, 1 incoming serial ports
       
       
      Any help is greatly appreciated. Thank you.




×