Home

Awesome

octool

license downloads CI release

A small project to help me continue my learning of the Rust language. All suggestions and criticisms are welcome (but that doesn't mean I'll get to them in a timely manner, I can be lazy at times)
You can build from the included source by running cargo build --release (if you have the Rust environment installed) or you can use the binary from the Releases section on GitHub. Unlike my older OC-tool, this tool does not auto update itself to the latest version, but it will let you know if there is an update.

You can find a basic picture guide for the use of octool here https://rusty-bits.github.io/octool/

Command line options

./octool [options] [-V x.y.z] [INPUT_folder || config.plist]

-d use debug versions for EFI instead of release versions

-h print help/usage message then exit

-v print octool version information and booted OpenCore version if the var is in NVRAM then exit

-V x.y.z select OpenCore version number to use e.g. -V 0.9.7

octool takes a path to a folder whos name contains INPUT at any point. This folder contains a config.plist and additional files for a specific build which allows the user to have numerous differing configs. octool will also take a direct path to a specific config.plist to use if desired and will gather what is needed for that specific config in the generic INPUT folder If you run octool with no path provided ./octool will look for config.plist in the generic INPUT folder, if it doesn't find it there it will use the OpenCorePkg/Docs/Sample.plist file.

At startup, octool checks for a local copy of the builds branch of the Dortania/build-repo so it will know the urls and hashes of the prebuilt binary resources. Thank you dhinakg, hieplpvip, and khronokernel.

Next, octool does the same thing for the master branch of the Acidanthera OpenCorePkg source files, thanks to the people of Acidanthera, in order to have the corresponding Sample.plist and Configuration.tex files, etc. for the version of OpenCore that you are building. They will be placed into the resources folder along with the corresponding binaries from the Dortania builds. This will allow octool to use Acidanthera tools while building the EFI, such as the ocvalitate and CreateVault tools. Thanks, again dhinakg.

Lastly, octool will run the input config.plist through ocvalitade and give you the option to quit or continue.
If you continue you then enter the

config.plist editor...

Navigation: arrow keys or some standard vi keys
          'up'/'k'            jump to top of section
              ^                       't'
              |                        ^
'left'/'h' <-- --> 'right'/'l'         |
              |                        v
              v                       'b'
          'down'/'j'          jump to bottom of section

Usage:
'ENTER' will switch to edit mode for string, integer, or data fields. When editing a data field 'TAB' will toggle between editing the data as hex or as a string.

'SPACE' will toggles boolean value between true/false

'a' add - if in a resource section there is option to select from a list of known resources, or add a blank resource template to the working plist from the Sample.plist

'ctrl-c' copy - copy the highlighted field or section

'd' delete - will delete the highlighted field or section after confirmation (dd command). The deleted data can be replaced by using the 'p' paste command

'f' find - find all occurances of a string in the plist

'G' go (capital G) - make an OUTPUT/EFI/OC folder from the config.plist

'i' show info of highlighted item.

'I' - Capital I - Insert - enter the path to a plist file, or drop it on the window, and octool will add the fields from that plist

'K' Key - capital K - edit the name of the highlighted key

'M' merge - capital M - will add missing fields to the config.plist from the Sample.plist without changing any existing fields.

'n' next - jump to the next found item if more than one occurance was found

'O' order - Capital O - if currently in the Kernel > Add section the 'O' command will check the order and dependencies of kexts.

'P' purge - Capital P - removes fields from the config.plist that are not in the Sample.plist

'p' paste - places the last deleted or modified etc. item into the plist (for those familiar with vi commands)

'q' quit - if unsaved changes were made to the config.plist octool will show a warning so changes can be saved

'r' reset - if a single item is selected, reset its value to the same as the Sample.plist value

's' save a copy of the config.plist as INPUT/modified_config.plist

'V' Version - Capital V - change the version of OpenCore that will be checked against and used in the OUTPUT EFI

'ctrl-x' cut - remove the highlighted field or section from the plist

'y' yank - copy the highlighted field or section (included for those vim users used to 'y' for copying)

'ctrl-v' paste - place the last cut, copied, etc. item into the plist

File and Folder Descriptions

tool_config_files folder - contains various json formatted files

INPUT folder - place your config.plist here along with other files to be included in the OUTPUT/EFI, such as custom SSDT files, custom Drivers, custom OpenCanopy themes, etc.

OUTPUT folder - location where octool will put the created EFI folder

resources folder - location where octool places the resources needed to create the OUTPUT/EFI folder. Can be deleted if desired, octool will gather any resources it needs when run

To Do: