Jump to content

OpenCore command line tool

22 posts in this topic

Recommended Posts



Command line tool that will build a working EFI folder based on the settings in the config.plist file.




you can also copy your config.plist to the RELEASE folder and double-click OC-tool  

this is the same as running

./OC-tool -uo build release

from the command line  


see the wiki for more info  




added functionality to the -T option  (update ver 1.6pt)  


TUI (Text based User Interface) now has limited functionality  

kexts, drivers, tools and quirks can be toggled on or off, then by pressing g an EFI folder will be created based on what you set  




- BOOT/BOOTx64.efi built automatically  

- OC/OpenCore.efi build automatically

- OC/ACPI folder built automatically from settings in ACPI/Add section of config.plist  

- - the tool can compile .dsl to .aml on the fly if iasl is present, but I recommend compiling them to .aml yourself for the tool to move over  

- OC/Drivers folder built automatically from settings in UEFI/Drivers section of config.plist  

- OC/kexts folder built automatically from settings in Kernel/Add section of config.plist  

- OC/Tools/Shell.efi built automatically from setings in Misc/Tools section of config.plist  

- OC/vault.plist and OC/vault.sig are built automatically from the Misc/Security/RequireVault setting in config.plist  

- can specify debug or release version of resources to be built  

- parses plist files internally, no longer needs to call /usr/libexec/PlistBuddy which may not exist on Catalina  

- kexts, drivers, tools and quirks can be enabled or disabled before building the EFI by using the -T option  


Edited by rusty-bits

Share this post

Link to post
Share on other sites

update ver 1.0p(0907)   checked with opencore DBG-050-2019-09-07 + macOS 10.14.6 (18G95)


changed -s option to -q for quiet - more consistent with other command line tools   


added -u update option

    if used alone it will update the tool and any pulled repos, then exit, same as the update command

    if used before the build command it will update first, then build the EFI folder


-V verbose option will dump all output to the screen instead of the log file

    I find using the combined -uV options to be useful at times


-A will pull and build all available repos

    used alone it will build DEBUG and RELEASE versions

    specify -A debug, or -A release to only build those specific versions

    useful if you want all built resources to be local

    I just use it to check my code for bugs


-X will delete all local pulled and built resources

   I use it when I've messed up something and need a clean start


added code to check missing built files as well as updated repos


to do:

    still working on a way to grab prebuilt resources on the fly, for now any Drivers or Kexts that the tool can't pull and build on its own can be placed in the extras folder, the tool will see them in there and copy them to the EFI folder

Share this post

Link to post
Share on other sites

update ver 1.1p(0911)


added support for the ACPI folder  

- the tool will compile .dsl files into .aml files if you have iasl installed, but I recommend building the .aml files yourself and placing them in the extras folder.  

- the tool will always check the extras folder first for ACPI files and use those if found  


cleaned up the swap function a bit, this makes sure that ...  

- the debug version of Lilu.kext is built before any other kexts

- the debug version of VirtualSMC.kext is built before AsusSMC.kext (if you're using that)  

- Shell.efi is built last since it uses patched UDK2018 tools instead of acidanthera/audk  


removed the -A option, there was little need for the tool to build every resource it was aware of.  I was just using that option for testing.  


removed the update command since it seemed redundant.  

The -u option will check for updates and exit if used alone.  If used before the build or copy commands the tool will check for updates first.   

Edited by rusty-bits

Share this post

Link to post
Share on other sites

update ver 1.1p(0913)


added -o option   

- this will open up to the EFI folder in the macOS finder when done building  


changed tool name to OC-tool to be more consistent  

- old tool name, OpenCore-tool, will still work for now but will issue a notice at . the end about the new name.  


beginning work on removing the need to use PlistBuddy or plutil in the tool, will parse the config.plist file in the tool itself to insure compatibility with Catalina, etc.

Share this post

Link to post
Share on other sites

update ver 1.3p(0918)  


added -U  (uppercase U) option

lowercase -u will check for updates before building the EFI folder

uppercase -U will check for updates and only build the EFI if there were changes,  

    if nothing changed it will exit  


fixed -q option, will now be quiet when checking for updates too  



Share this post

Link to post
Share on other sites

Hello Rusty.

OC-tool, build from scratch, build with -u (adding VoodooHDA) works fine on an Haswell Platform (H87M-e, i5-4440, 20 Gb DDR3 1600 Mhz, MSI GTX 650 Ti ...), more details in attachement.


So thanks

Best regards

Capture d’écran 2019-09-23 à 12.01.40.png

Share this post

Link to post
Share on other sites

I'm glad it worked for you, and glad to see it's working well on Catalina!  And in French!  ;)  


Hopefully I'll find a way to reliably download the latest versions of resources such as VoodooHDA from sourceforge.net and add files like VoodooHDA.kext to the known files list of OC-tool, but I'm working on a Text based user interface right now.  

Share this post

Link to post
Share on other sites

Hi Rusty.



Catalina Dev. beta 8 updated so Catalina Dev. beta 9 works fine but after a "cold boot", restart won't boot staying on big Apple screen.

Best regards

Catalina Bêta Dév. 8 OC boot 2019-09-23 à 19.26.03.png

Catalina Bêta Dév. 9 Download 2019-09-23 à 19.16.22.png

Catalina Bêta Dév. 9 OC boot 2019-09-23 à 20.33.18.png

Share this post

Link to post
Share on other sites

Hello, I'm glad it updated to beta 9, but sad you're stuck on the Apple screen.  

I have no experience with Catalina or a Haswell system, I'm on Mojave with a Coffee Lake  

I don't think there is anything I can do with OC-tool to help, since all it does is build the latest files and copy them into an EFI folder, but please let me know what you find.  If OC-tool has a problem I want to know.  

The text based user interface, TUI, I'm working on will list options that OC-tool sees in the config.plist file.  If you want to try it out, do ...  


git pull
git checkout TUI
git pull
./OC-tool -T




It might show something unexpected   

use `git checkout master` to return to the main version of OC-tool  


Edited by rusty-bits
git pull

Share this post

Link to post
Share on other sites


first all, ./OC-tool -T and the result is imageproxy.php?img=&key=c17464ef1b1b51c71501619472_Capturedecran2019-09-25a15_30_17.thumb.png.d29385068ba6b2c99165c6e40828a368.png

no doubt with OC-tool, it's my fault, my own fault, certainly a lack in content of "config.plist" or in use of "efi" or "kext" component(s).

For example, after Catalina update l haded XhciDxe.efi which is present in my Clover EFI kexts section and this causes problems, so I'll remove it and I'll try with GenericUSBXHCI.kext.

For me OpenCore is fabulous and your OC-tool a very helpful tool.


Best regards

Edited by matxpa

Share this post

Link to post
Share on other sites

update ver 1.5pt(0925)  


added -T option  

it opens a Text based User Interface - TUI  

it doesn't do much of anything yet, but I'm working on ways it can turn options on and off  


also, added double-click support from the Finder  

double-clicking on OC-tool is the same as running 

./OC-tool -uo build release

you can see more about that on the wiki  




Edited by rusty-bits
add link

Share this post

Link to post
Share on other sites


Is is possible the get your brilliant tool to construct config.plist from Clovers config.plist, obviously just take the needed bits, and populate what Clover does not have.

Building a config from scratch is pretty daunting, so a bit of a helping hand would be nice.;)

Thanks again for your wonderfull tool, I have not used it yet, stuck on config.plist, hence the reason for my comment.



Edited by STLVNUB

Share this post

Link to post
Share on other sites

Hello Stlvnub,

maybe you already know that tool "OpenCore Configurator", same dev. makes Clover one.

You can convert (recover a lot of content) a Clover "config.plist" but this one will not be realy usable, if you try as this you'll have a message like "...config.plist corrupted ..." at boot. It's just a working base, recover "SMBIOS" section is usefull.


Share this post

Link to post
Share on other sites


While it may be possible to construct a tool that will convert a clover config.plist to an opencore config.plist it is not a feature I am going to add to OC-tool  

OpenCore is changing frequently and I don't see any way to guarantee it would be stable right now.  

Plus, good old UNIX "rules" have one command do one job, and I only plan on having OC-tool take an OpenCore config.plist and produce a workable EFI folder.  

If in the future I or someone else has a command line tool that can convert a Clover to an OpenCore you could just pipe the output into OC-tool.  That would be interesting, but I really feel that people should learn how to set up their own config.plist.  I'm still working on understanding every bit of it myself!

Share this post

Link to post
Share on other sites



Hello Rusty.

./OC-tool -T execution


In T.U.I code I'll suggest you 3 little modif. and/or adds in next functions : text_user_interface(), draw_screen() and finally draw_footer()


1) text_user_interface() (add and modification)

  a)  If you navigate with A, K, l, h, ... you keep display attributes of the active word when you "quite" ( prompt is green, red or other         color,  because of attributes manipulation in navigation)
  b) When you "quite", the last cursor position kept results from "unselect_MSG()", so prompt appears at last kept number line +1 ( msg "\n")  with lost echo and CR. (« stty -echo » at line 605)


2) draw_screen() (add)
  at the end of details lines draw, a new variable (Footer_Line) to keep value of that last drawn line number to position Footer N lines after.


3) draw_footer() (modification)

  In content of « msg » parameter,  initial Footer position  $(R-1) is replaced by ${Footer_Line}, and a space added at end. 


You can see details in the « rtf » file attached

Hope y'll be interested by OC-tool modif switch -T.rtf


Edited by matxpa

Share this post

Link to post
Share on other sites

@matxpa thanks for taking an interest  

1) thanks for pointing this out, I would never notice this on my terminal because I have my prompt set to show me info with colored status  

(just fixed it hopefully)


2,3) I plan on having a list of all the keyboard options and commands on the screen as well, not sure where the footer will be when I'm done  

  Also, I plan on having multiple screens to show the other options set in config.plist, so I may want to keep the color key at the bottom.

Edited by rusty-bits
add fixed note

Share this post

Link to post
Share on other sites

update ver 1.6pt(0930)  


added functionality to the -T option  



./OC-tool -T

will default to the build release options and use the RELEASE/config.plist  

and modifications made to the config.plist in OC-tool will be saved to Docs/config.plist (currently the tabs are stripped out, but still a valid plist)  

pressing g will build an EFI folder based on the what you edit on the screen  

./OC-tool -T build debug

will use the DEBUG/config.plist

Share this post

Link to post
Share on other sites

ver 1.7pt(1006)


Fixed bug causing copy failure for AppleGenericInput.efi - it has been migrated to OcSupportPkg - no longer in config.plist  


Started adding feature in TUI that shows the description of the highlighted item - by pressing i  


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DI2edd
      I'm writing from a Catalina QEMU/KVM VM which, I must say, works pretty damn well besides the fact that rebooting just doesn't work. But first, a bit of background:
      I'm using OpenCore 0.5.5 through DuetPkg because I'm forced on SeaBIOS (legacy boot) because of legacy IGD passthrough (OVMF doesn't support the semi-hack that's needed for it to function), and that works well enough; I switched from Clover because it didn't allow me to use the "host" cpu model on QEMU, which OpenCore did, and so far so good.
      The problem is that, whenever i attempt a reboot, the screen would just turn black and thats's it. I can even see that every 30 seconds it polls the battery's status through ACPI (I modified QEMU for that and left some debugging printfs).
      On the other hand, shutting down works as expected. One thing I noticed is that, on shutdown, I can see the last line of verbose output on the screen is "CPU_HALTED", whereas on reboot I don't get that (don't even know if that's to be expected).
      The point is that I'm not even sure this is a bootloader issue, because I booted a Fedora live ISO through OpenCore, and that rebooted with no problems, but at the same time I remember that with Clover I didn't have such an issue. Perhaps it was one of Clover's "Fixes" that is not automatic with OpenCore?
      Anyway, I attached my config.plist.
      Thank you.
    • By SniperBuddy
      Hello guys,
      I'm relatively new to the world of hackintosh.
      I'm trying to install the latest Mac OS - Catalina with the help of Opencore, however, this is the error that's displayed while booting from the USB:
      You can take a look at my config.plist file from here - https://drive.google.com/file/d/17FZpTcVp4RFSaxdm6yW4uELkt7MaLdmt/view?usp=sharing
      I'm using the Acer E575 G laptop with Kabylake (i5 7200u)
      Any help would be gladly appreciated!
      Edit: I've fixed this problem by following this guide completely - https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/intel-config.plist/kaby-lake
      This is due to OpenCore being unable to find any drives with the current ScanPolicy, setting to 0 will allow all boot options to be shown
    • By DanZiRuleZ
      Dear All, 
      trying to install Catalina on my ASUS Z87 Plus, I followed the Haswell guide to the letter, all set up now, USB stick boots ok, Catalina installs on SSD, but then when trying to boot it I am receiving Kernel Panic and no idea how to move forward. 
      Have the debug options, but opencore will only dump boot messages where I don't see much sticking out.
      My last resort would be just installing clover on the already installed SSD's EFI partition, it at all possible. High Sierra is working fine and I did get Clover with Mojave once but stuck with High Sierra with my GTX960 video card...
      Attached is the kernel panic and my EFI setup if anyone can help me troubleshoot.
      Many thanks

    • By n.d.k
      After several weeks of testing OC bootloader,  disecting its source code and also Clover's source code as well, I finally switch from Clover to OC as my main bootloader. Wait! don't get the wrong idea that OpenCore is better than Clover. They both work equally well, producing a bootable macOS as an end result with simliar boot time. OC design direction is different with Clover, I believe it's not intended as a Clover replacement, but more narrowing down to macOS specifically. However, macOS is not the only OS that i am using, so, i decided to add some minimal necessary source code modification to the OC to get some of the features I need. I like to share my customized OC forked https://github.com/n-d-k/OpenCorePkg , you have to compile it yourself if you want, i will not provide pre build binary.    
      Additional features/changes:
      [ Multi-Boot ]
        - ACPI patches are optional for non macOS with setting ACPI->Quirks->EnableForAll to yes (default is no).
        - Booter Quirtks, SMBIOS and Device Properties patches will only applied to macOS.
      [ Hotkeys ]
        - Full functional Hotkeys [1-9] corresponding to Boot Entry's Index number and dedicated W (Windows) / X (macOS) keys can be used without seeing Boot Picker.
        - While in boot picker, F10 can use to take a snapshot of the screen.
      [ Ui Boot Picker ]
        - Bios Date/time, auto boot to the same OS or manual set to always boot one OS mode, and OC version are displayed in boot picker.
        - Auto boot to previous booted OS (if Misc->Security->AllowSetDefault is NO/false).
        - macOS Recovery/Tools Entries are hidden by default, use Spacebar in Boot Menu as a toggle on/off to show/hide hidden entries.
      [ Custom Entries ]
         - Custom entries are now listed first in picker menu and by the orders they are appeared in Misc->Boot->Entries, before all other entries.
         - Ability to change entry name found by auto scanner by adding custom entry with the exact same device path,
           this will give users the option to complete change how all boot entries listed in Boot Picker.
      [ Others ]
         - No verbose apfs.efi driver loading (if using apfs.efi instead of ApfsDriverLoader.efi).
          - ndk-macbuild.tool script are set to compile with latest edk2 (One can easily set to stable edk2 if prefer).
          - NvmExpressDxe driver build script are also available for system without native nvme support. (Compatible with OC and Clover).
       - To build OpenCore, run "./ndk-macbuild.tool" at Terminal (require Xcode and Xcode Command Line Tool installed, and open xcode to accept license agreement before compiling).
       - To build NvmExpressDxe driver, run "./buildnvme.sh".
      4k screen resolutions


      Customized by @btwise

    • By Krani93
      Hi guys,
      I'm trying to install Catalina on a Lenovo m720q (i5-8600T with B360).
      After some other issues I'm know stuck at attached screen.
      Im using latest opencore version and have my EFI folder attached.
      Can someone help me I've got no clue what to try next :/