Coder Social home page Coder Social logo

rusty-bits / oc-tool Goto Github PK

View Code? Open in Web Editor NEW
213.0 18.0 27.0 59.07 MB

POSIX shell script that builds an OpenCore EFI folder from an OpenCore config.plist

License: GNU General Public License v3.0

Shell 100.00%
opencore-efi-folder acidanthera opencore plist posix

oc-tool's Introduction

OC-tool

POSIX shell script that builds an OpenCore EFI folder from an OpenCore config.plist

Can also be double-clicked in macOS Finder which will run as ./OC-tool -o

see either the OC-tool wiki pages for more detailed information
or the Docs/tool-changelog.md


Installation

git clone https://github.com/rusty-bits/OC-tool
cd OC-tool

copy your config.plist file into the INPUT folder, or copy and edit one of the sample plist files.

e.g. cp Docs/Sample.plist INPUT/config.plist

NOTE: If you use the Clone or download button OC-tool's files will be downloaded, but it won't be a repo and will error out when run since it can't update itself from github


Requirements

  • access to a POSIX shell such as sh, bash, ksh, ash, or dash should all work. I myself use zsh with no problems, even though it's not strictly POSIX compliant.

It will also run on Windows under WSL or by using Git for Windows

That's it, nothing more is needed. OC-tool will make a working EFI folder by getting what it needs from the stable releases on Acidanthera's github or the daily build on Dortania if you so choose. git, grep, curl, cp, cut, tr, etc used by OC-tool should already exist on those shells.

Now, if you want OC-tool to build the latest from source you will need additional tools/dependencies, and as far as I know will have to use macOS as well. If there is a good way to run Xcode on Linux let me know ...

  • To build from source Xcode with xcodebuild, nasm, and mtoc need to be installed and configured to run from the command line. You can build/install these yourself, or you can run the get-deps.sh in the .tool-files folder which uses code from acidanthera to get prebuilt dependencies.
    .tool-files/get-deps.sh while in the OC-tool directory

Credits

vit9696, PMheart, and cattyhouse
for parts of macbuild.tool used in .tool-files/get-deps.sh

DhinakG for the daily build repo that OC-tool now uses if you use the -d option

elliptic-shiho for the parse_json.sh gist on github


Acknowledgements

The folks at r/hackintosh such as dracoflar, midi1996, Beowolve, slandeh, and of course CorpNewt for help, guides and tools to get my hack up and running in the first place.

u/ChrisWayg for pointing out the script for prebuilt mtoc and nasm

u/nyhtml for making me realize the Clone button on github will cause OC-tool to error out since it won't be cloned as a repo. aka the nyhtml bug ;)

The folks at acidanthera for making OpenCore possible such as vit9696, vandroiy2013, Download-Fritz, Andrey1970AppleLife, PMheart and on and on ...

I probably forgot a number of people, sorry.

oc-tool's People

Contributors

arsfeld avatar rusty-bits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oc-tool's Issues

Last build error

Hi,

After update git just now. (was ok 8 hours before)

"Checking if required tools and files exist ...done
ERROR: HfsPlus.efi - repo was not found in Docs/repo.plist
HfsPlus.efi file not found in extras directory
Place HfsPlus.efi file in extras directory to continue"

Nice tool i prefer too using cmd line tools:)

Fred

[Bug] updating

when I upgrade to a new version of 0.59. the config.plist looks the same as my original but the graphical mode does not work. I get the default boot screen instead.
All my files are in the correct folders
e.g

Input folder

output folder

Output->EFI->OC->Resources->image

Graphical mode

Grammar Correction

Checking Lilu ... 
no existing Lilu found
Any existing kexts will be rebuilt to **insure** they are current

The word surrounded by asterisks should be "ensure".

Missing drivers from Sample.plist

Hi!

Just a quick one:
Could you please add the drivers from Sample.plist into the repository?

  • ExFatDxe.efi
  • PartitionDxe.efi
  • CrScreenshotDxe.efi

get-reps.sh cannot fetch mtoc

acidanthera team moved the mtoc compressed binary file to a new name and added a symlink instead; this is causing the get-reps.sh script to fail to load it as GitHub doesn't serve the destination file via a link as a regular web server would.

[Improvement] -q not to silence everything

Option -q should not silence OC-tool messages like missing fields on config.plist, modifications/adjustments to the config.plist, or missing files/folders from extra/ or INPUT/ folders. These should always be printed, regardless of -q flag, since they are important remarks that may cause side effects.

The standard redirect "2>&1 > /dev/null" can always be used by the user if he/she doesn't care about any output at all.

Shell.efi not copied - GUID labeled file

While building OC from sources (as of Jan 7 2020), the tool failed to copy Shell.efi as it searches for a GUID labeled file (from SHELL_EFI var) versus the plain "Shell.efi" file as specified on the config.plist Tools section.

However, by removing previous OC sources (i.e., by adding -X parameter) and building it from scratch, the build is completed successfully. See below for output examples.

Therefore, it might be a good idea to enforce/suggest -X parameter if the OC-tool script is updated. May not be needed at every single update, but for significant changes its usage/recommendation is likely welcome.

% ./OC-tool -s INPUT/config.debug.plist
For help use './OC-tool -h'

Using INPUT/config.debug.plist

Checking for updates ...
OC-tool - OK

Checking Lilu ...
Lilu updated to 2183e2a
All kexts will be rebuilt

Checking other existing resources ...
AppleSupportPkg - updated to 4cf2aea
OcSupportPkg - updated to c1c72c0
EfiPkg - updated to 326650b
MacInfoPkg - updated to 0a66205
OpenCorePkg - updated to 596836f
existing resources have been updated

Building new or updated resources
Making base tools ... done
Building DEBUG MacInfoPkg ... done
Building DEBUG OcSupportPkg ... done
Building DEBUG OpenCorePkg ... done
Cloning https://github.com/acidanthera/Lilu into Lilu ... done
Building DEBUG Lilu ... done
Cloning https://github.com/acidanthera/VirtualSMC into VirtualSMC ... done
Building DEBUG VirtualSMC ... done
Cloning https://github.com/acidanthera/AppleALC into AppleALC ... done
Building DEBUG AppleALC ... done
Cloning https://github.com/acidanthera/WhateverGreen into WhateverGreen ... done
Building DEBUG WhateverGreen ... done
Cloning https://github.com/acidanthera/IntelMausi into IntelMausi ... done
Building DEBUG IntelMausi ... done
Building DEBUG AppleSupportPkg ... done
Building DEBUG AppleSupportPkg ... done
Making audk BaseTools for Shell.efi ... done
Patching audk for Shell.efi ... done
Building DEBUG Shell.efi (Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi) ... done

Removing old /Users/hquest/Downloads/OC-tool/OUTPUT/EFI ... done
Creating new /Users/hquest/Downloads/OC-tool/OUTPUT/EFI ... done

Moving latestSource resources into place
Copying BOOTx64.efi to BOOT ... done
Copying OpenCore.efi to OC ... done
Copying config.plist to OC ... done
Copying SSDT-XOSI.aml to OC/ACPI ... done
Copying SSDT-USBX.aml to OC/ACPI ... done
Copying SSDT-EC.aml to OC/ACPI ... done
Copying Lilu.kext to OC/Kexts ... done
Copying VirtualSMC.kext to OC/Kexts ... done
Copying AppleALC.kext to OC/Kexts ... done
Copying WhateverGreen.kext to OC/Kexts ... done
Copying AGPMInjector.kext to OC/Kexts ... done
Copying USBPorts.kext to OC/Kexts ... done
Copying IntelMausi.kext to OC/Kexts ... done
Copying SMCProcessor.kext to OC/Kexts ... done
Copying SMCSuperIO.kext to OC/Kexts ... done
Copying VBoxHfs.efi to OC/Drivers ... done
Copying ApfsDriverLoader.efi to OC/Drivers ... done
Copying FwRuntimeServices.efi to OC/Drivers ... done
Copying Shell.efi to OC/Tools ...

ERROR: Copying Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi to OC/Tools failed, see /Users/hquest/Downloads/OC-tool/tool.log for details.
% ./OC-tool -X -s INPUT/config.debug.plist
For help use './OC-tool -h'

Using INPUT/config.debug.plist

Checking for updates ...
OC-tool - OK

Checking Lilu ...
no existing Lilu found
Any existing kexts will be rebuilt to insure they are current

Checking other existing resources ...

*** WARNING: -X option used ****************************************
*** /Users/hquest/Downloads/OC-tool/resources/latestSource has been removed
*** the -X option is only useful if there is an issue with the
*** previously downloaded resources causing problems while building.
*** Using it at any other time will only increase bandwith usage and
*** compile time, in many cases requiring all tools to be rebuilt.


Building new or updated resources
Cloning https://github.com/acidanthera/audk into UDK ... done
Cloning https://github.com/acidanthera/EfiPkg into EfiPkg ... done
Cloning https://github.com/acidanthera/MacInfoPkg into MacInfoPkg ... done
Making base tools ... done
Building DEBUG MacInfoPkg ... done
Cloning https://github.com/acidanthera/OcSupportPkg into OcSupportPkg ... done
Building DEBUG OcSupportPkg ... done
Cloning https://github.com/acidanthera/OpenCorePkg into OpenCorePkg ... done
Building DEBUG OpenCorePkg ... done
Cloning https://github.com/acidanthera/Lilu into Lilu ... done
Removing Xcode DerivedData for Lilu ... done
Building DEBUG Lilu ... done
Cloning https://github.com/acidanthera/VirtualSMC into VirtualSMC ... done
Removing Xcode DerivedData for VirtualSMC ... done
Building DEBUG VirtualSMC ... done
Cloning https://github.com/acidanthera/AppleALC into AppleALC ... done
Removing Xcode DerivedData for AppleALC ... done
Building DEBUG AppleALC ... done
Cloning https://github.com/acidanthera/WhateverGreen into WhateverGreen ... done
Removing Xcode DerivedData for WhateverGreen ... done
Building DEBUG WhateverGreen ... done
Cloning https://github.com/acidanthera/IntelMausi into IntelMausi ... done
Removing Xcode DerivedData for IntelMausi ... done
Building DEBUG IntelMausi ... done
Removing Xcode DerivedData for VirtualSMC ... done
Removing Xcode DerivedData for VirtualSMC ... done
Cloning https://github.com/acidanthera/AppleSupportPkg into AppleSupportPkg ... done
Building DEBUG AppleSupportPkg ... done
Cloning https://github.com/acidanthera/OpenCoreShell into OpenCoreShell ... done
Cloning https://github.com/acidanthera/audk -b master --depth=1 into UDK ... done
Making audk BaseTools for Shell.efi ... done
Patching audk for Shell.efi ... done
Building DEBUG Shell.efi (Shell_EA4BB293-2D7F-4456-A681-1F22F42CD0BC.efi) ... done

Removing old /Users/hquest/Downloads/OC-tool/OUTPUT/EFI ... done
Creating new /Users/hquest/Downloads/OC-tool/OUTPUT/EFI ... done

Moving latestSource resources into place
Copying BOOTx64.efi to BOOT ... done
Copying OpenCore.efi to OC ... done
Copying config.plist to OC ... done
Copying SSDT-XOSI.aml to OC/ACPI ... done
Copying SSDT-USBX.aml to OC/ACPI ... done
Copying SSDT-EC.aml to OC/ACPI ... done
Copying Lilu.kext to OC/Kexts ... done
Copying VirtualSMC.kext to OC/Kexts ... done
Copying AppleALC.kext to OC/Kexts ... done
Copying WhateverGreen.kext to OC/Kexts ... done
Copying AGPMInjector.kext to OC/Kexts ... done
Copying USBPorts.kext to OC/Kexts ... done
Copying IntelMausi.kext to OC/Kexts ... done
Copying SMCProcessor.kext to OC/Kexts ... done
Copying SMCSuperIO.kext to OC/Kexts ... done
Copying VBoxHfs.efi to OC/Drivers ... done
Copying ApfsDriverLoader.efi to OC/Drivers ... done
Copying FwRuntimeServices.efi to OC/Drivers ... done
Copying Shell.efi to OC/Tools ... done
Copying GRUBShell.efi to OC/Tools ... done

Finished building /Users/hquest/Downloads/OC-tool/OUTPUT/EFI

Not working after a new install

When OC-tool automatically updated to the latest release everything worked great.
I deleted/reinstalled OC-too. Now it will not generate an EFI in the output folder. All my files are in the correct folders.
macOS Catalina

macOS Big Sur Beta3 stops @ "Building new or updated resources"

Thanks

Output what's updated when using prebuilt binaries

Can the tool be updated to list an output of any new files that it downloads and uses when building OpenCore using the prebuilt binaries? Right now, I run the script and it outputs "Downloading/unzipping needed or updated resources" and then the output as it builds the EFI folder. I'd like to know if any of the components are newer than the previous time the tool was ran successfully. Thanks!

Fetching prebuilt release versions fails on AtherosE2200Ethernet

cdiv@Cloudbank% ./OC-tool -v
To build from source use -s option
For help use './OC-tool -h'

Checking OC-tool for updates ... done

Processing config.plist ... done
Checking for missing fields ... done
Checking for extra fields ... done
Using /Users/cdiv/Hackintosh_Scripts/OC-tool/INPUT/config.plist

Downloading/unzipping needed or updated resources
Downloading  ... zsh: exit 3     ./OC-tool -v

tool.log says curl: (3) URL using bad/illegal format or missing URL. Looking at update.log, the next kext to download would be AtherosE2200Ethernet.kext. If I copy it to extras, OC-tool continues without issue.

Thanks!

No error output, but config.plist not being converted to config.plist.txt

I thought I was really good at bash scripts, then started to dig into parsePlistEdit.sh. OMG.
anyway I have the attached config.plist and the parsePlistEdit.sh script only does a partial generation of config.plist.txt. Looking at the Errors.txt it's complaining about a section not being complete, but this is an AMD build and according to the docs this is a valid configuration.

attached is my config.plist renamed to config.plist.txt so that I can attach to this ticket.
config.plist.txt

Improve OC-tool handling of git sync issues

During regular OC-tool usage done in between multiple days/weeks, the script might create or update sync'ed files on standard local folders as found on the rusty-bits git repository. Fast forward to another run of OC-tool days after, the script may fail with no warning whatsoever about what went wrong, which can be misleading if the user is not familiar with the tool. Unless the user knows to look at tool.log log file for clues, there are zero suggestions from the script about why the tool just failed. Perhaps a simple message as "Review tool.log logfile for errors", after the "For help use %1 -h" message should suffice, if automation of such error recoveries cannot be implemented.

See tool output example below.

hquest@hquest OC-tool % ./OC-tool -s INPUT/config.debug.plist
For help use './OC-tool -h'

Using INPUT/config.debug.plist

Checking for updates ...
OC-tool - %
hquest@hquest OC-tool % more tool.log
error: Your local changes to the following files would be overwritten by merge:
Docs/Sample.plist
Please commit your changes or stash them before you merge.
Aborting
hquest@hquest OC-tool %

Suggestion: add [module] optional parameter to -X

Suggestion:

% ./OC-tool -h
SYNOPSIS

  • ./OC-tool [-dhinoqrstvV][X [module]] [optional path to an existing config.plist]

OPTIONS

  • -X [module] removes downloaded resources for [module] before building. A comma separated list of modules can be provided, or all downloaded resources if no module name/list is provided.

OC-tool -r command fails during downloading/unzipping

Hello, I'm running OC-tool using the -r switch to build the release versions. The tool fails sometime during the download/unzipping process. I've attached the tool.log file as well as a screenshot from my terminal window.

Running with -tr results in the same failure.

Running without the -r switch completes successfully.

tool.log
Screen Shot 2020-04-05 at 10 14 16 AM

Resources folder is missing

Thanks for the tool, until I came across the tool I was doing manual upgrades which is painful.

In my config file, I've enabled Boot picker to be External which requires the Resources folder to be present in the EFI folder. I put my Resources folder inside the extras folder but it didn't get copied. Is there any thing am I missing?

Also, if the Boot picker is set to External and Resources folder is not presence, can the script pull the latest Resource folder from opencore project?

consider HfsPlus.efi also?

I like HfsPlus.efi over VboxHFS.efi, it is faster when used to boot Recovery. but this tool does not work if HfsPlus.efi is used.

ERROR: HfsPlus.efi - repo was not found in Docs/repo.plist or extras

Request/Bug: Adding VoodooI2C.kext to extra/ causes VoodooI2C artifacts to be stored underneath itself

Quite confusing title, but here it goes: Laptops using I2C type of touch devices are expected to use VoodooI2C files (assuming the pre-compiled, official release ones to make matters easy). These files in Clover are just added with no particular order as they are loaded in demand whenever needed. In OC, there is a particular order to inject the core I2C kernel extension, as follows:

VoodooI2C.kext/Content/Plugins/VoodooI2CServices.kext
VoodooI2C.kext/Content/Plugins/VoodooGPIO.kext
VoodooI2C.kext

, followed by any of the satellite kexts for your hardware.

By OC-tool's default behavior, in order for a file to be added into the config.plist, it has to exist at extra/ folder and not underneath another folder inside extra/. Which in this case, we have to extract it from inside the kernel extension.

Now, by adding the VoodooI2C kernel extension in this particular order (otherwise the device does not work - see Lilu and its companion extensions), since a folder called VoodooI2C.kext is first created when VoodooI2CServices.kext is copied on OUTPUT/EFI (it obeys the BundlePath from the Kext > Add > item X), the VoodooI2c.kext kernel extension itself gets copied underneath it. Ends up as follows:

VoodooI2C.kext/Content/Plugins/VoodooI2CServices.kext
VoodooI2C.kext/Content/Plugins/VoodooGPIO.kext
VoodooI2C.kext/VoodooI2C.kext
VoodooI2C.kext/VoodooI2C.kext/Content/Plugins/VoodooI2CServices.kext
VoodooI2C.kext/VoodooI2C.kext/Content/Plugins/VoodooGPIO.kext

While a quick workaround is just remove the entire VoodooI2C.kext and copy it back from extras/, perhaps would be if the copy process of kernel extensions created as "plugins" (looks at VirtualSMC plugins) to verify if their parent extension is also added into the list, and if so, don't copy the child plugins if the parent is also in the list of artifacts to be copied. This way we don't need to dissect an extension, which makes updates easier to be managed and maintained.

The drawback of the above is if you are building a parent from sources and want to use a custom built plugin. Which should be very rare, as they should be aligned for feature parity/proper functionality.

Hope this makes sense.

Tool fails at copying AppleGenericInput.efi to OC/Drivers

So I ran the tool just a few minutes ago using ./OC-tool build release and the process dies at "Copying AppleGenericInput.efi to OC/Drivers ... %"

the tool.log file says
"- Done -
Build end time: 13:58:15, Oct.06 2019
Build total time: 00:00:20

cp: /Users/joshua/Hackintosh/OC-tool/resources/UDK/Build/AppleSupportPkg/RELEASE_XCODE5/X64/AppleGenericInput.efi: No such file or directory"

Screen Shot 2019-10-06 at 2 03 26 PM

Request: naming for modified custom plist

Currently, if you make changes in the TUI, your plist is saved indiscriminately as "modified.config.plist". This would make sense if you're modifying config.plist, but not in the case where you supply a custom plist, e.g. "usb.config.plist". This is my case as my USB version has different values for ShowPicker and Timeout.

My suggestion: where $1 is the specified (or default) filename, rename the modified file to "modified.$". This means that a specified file "usb.config.plist" would become "modified.usb.config.plist".

OpenSSL

tool.log
Hi Rusty,

Keeping up with OC changes today and noticed I had t turn off vault since it wouldn't build on my machine.

cc -Wall -Wextra -pedantic -O3 -I/usr/local/opt/openssl/include -I/opt/local/include -L/usr/local/opt/openssl/lib -L/opt/local/lib -lcrypto RsaTool.c -o RsaTool
In file included from RsaTool.c:14:
./openssl_compat.h:20:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [RsaTool] Error 1

Everything else builds fine. I'm on Catalina 10.15.3 with Xcode Version 11.3.1 (11C504)

Which openssl do I need?

(Great resource !!)

Version 2.0.8 of AirportBrcmFixup.kext breaks OCtool

Hi Rusty,

AirportBrcmFixup.kext has changed configuration

"Remove injectors for AirPortBrcm4360 and AirPortBrcmNIC from main Info.plist and move them into separate plugins"

Getting this error now

ERROR: AirPortBrcm4360_Injector.kext - resource was not found in /Users/milesj/OC-tool/.tool-files/git_repo.json
AirPortBrcm4360_Injector.kext file not found in extras directory
Check the spelling of the resource, case matters as well.
Also check the Configuration.pdf and the Sample.plist to be
sure the resource hasn't been removed or renamed.
If you are sure you want this resource then you can
either place AirPortBrcm4360_Injector.kext in extras directory to build EFI with AirPortBrcm4360_Injector.kext
or run with -i option to build EFI without AirPortBrcm4360_Injector.kext
for example, try './OC-tool -is'

tried fixing with './OC-tool -is' but that trashes the config.plist. Premature EOF.

milesj@iMac OC-tool % cat last_run_issues.txt
plutil could not convert plist

Happy Days !!

Dont build release version

iMac-Andrey:OC-tool andrey$ ./OC-tool 
To build from source use -s option
For help use './OC-tool -h'

Checking OC-tool for updates ... done

Processing config.plist ... done
Checking for missing fields ... done
Checking for extra fields ... done
Using /Volumes/Data/Andrey/OC-tool/INPUT/config.plist

Downloading/unzipping needed or updated resources
Downloading  ... iMac-Andrey:OC-tool andrey$ 

[Feature request] Download Beta

Hi,
Great software. is there an option to download the OpenCore-0.5.8-RELEASE instead of 0.5.7. with OCBuilder it can download 0.5.8.

Thanks

BOOTx64.efi compiled from source causing EFI partition to show in picker

I'm not sure if 100% related to OC-tool, but when I compile from source using OC-tool the resulting BOOTx64.efi file will make the EFI partition show in the picker. If I use the BOOTx64.efi from an official release or the Dortania builds the EFI partition doesn't show in the picker. It's been a real head scratcher to me. Any ideas why this happens?

Parsing of latest config.plist is off

Hi,

With the latest update on OC-tool the parsing of config.plist is off.
I have attached two screenshots, one of the contents of extra and one of the terminal with the latest ./OC-tool -s and the latest source.

OC-tool

terminal

There are in Sample.plist a couple of drivers added with an # in front so not active.
I have included it in my config.plist in the same way.

OC-tool stops with the error that it can't find (for instance) #UsbMouseDxe.efi

Copying HFSPlus.efi fails on a case-sensitive file system

Here is the tool log. From what I can tell, the script checks that HfsPlus.efi exists, but tries to copy HFSPlus.efi. This theory is confirmed by placing both files in the extras directory. If that is done, the script finishes successfully.
Hoping you can fix this :)

ERROR: vault build failed

Hello, when I run ./OC-tool -d it builds an EFI and then I get the error below"

Building vault files for /Users/josh/Hackintosh/OC-tool/OUTPUT/EFI ... ERROR: vault build failed, see /Users/josh/Hackintosh/OC-tool/tool.log for details

When I check the tool.log file I see the message below:

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib Referenced from: /Users/josh/Hackintosh/OC-tool/resources/prebuiltDaily/UDK/OcSupportPkg/Utilities/RsaTool/RsaTool Reason: image not found ./OC-tool: line 597: 9003 Abort trap: 6 "$RES_DIR"/UDK/OcSupportPkg/Utilities/RsaTool/RsaTool -sign vault.plist vault.sig vault.pub

I checked my /usr/local/opt/openssl/lib/ folder and I've got libcrypto.1.1.dylib, not the 1.0.0 referenced. I am using homebrew to install openssl. Any ideas on how I can fix this?

Suggestion: Kexts in Extras Takes Higher Priority

Is your feature request related to a problem? Please describe.
DW1820A is a problematic card with lots of different flavors, and people may have to customize their BrcmPatchRAM3.kext to their need to make the correct firmware being uploaded (refer to this issue).

Describe the solution you'd like
It would be great if it accepts user-provided kexts in extras folder and create vault signatures. In other words, if a specific kext is shown in extras folder, use the user-provided one instead of the pre-built/built-from-source one. It could be implemented as an dedicated flag to trigger it, or just implemented as the default behavior and leave a warning message to people who may be unaware of this new feature.

Additional context
I'm ordering two more DW1820A with different flavors and is planning to test them out upon arrival.

VirtualSMC Dell sensors plug-in is missing

Great work on this tool, didn't realise it existed and sure cleaned up my messy OC build folder. Currently the Dell sensors are missing. I added the following to git_repo.json.txt but that's probably too dirty and not enough for all use cases except when building from source.

| SMCDellSensors.kext|parent "VirtualSMC"
| SMCDellSensors.kext|path "Kexts"

I checked the others and this is the only missing VirtualSMC plug-in.

Add support to ocvalidator tool

While a simple diff from key/value pairs is enough to identify what's extra and what's missing against a sample configuration, the Acidanthera team offers a tool called ocvalidator (previously ConfigValidity) within their suite of programs. Happy if this tool could be added into the list of compiled artifacts OC-tool generates during source work. Since it too is distributed with their releases, it could be ran at an early or late point of the EFI build process as a sanity check, either automatically or as a command flag.

Clear Docs/ files prior to try update OC-tool

At pretty much every new update of OC-tool, the tool complains about being unable to retrieve files from GitHub. In all instances, it was found there are two docs (Docs/Configuration.pdf and Docs/Differences.pdf) that do not match the upstream files.

Any chance these files can be removed before the tool tries to update itself? Perhaps checking on the tool.log output and taking action if the initial tool update fails, followed by a self-retry, would save bandwidth while improving the tool experience.

no building

Hi, OC-tool does't do anything:

./OC-tool -sv ./extras/config.plist
For help use './OC-tool -h'

Using ./extras/config.plist

Checking for updates ...
OC-tool - OK

Checking existing resources ...
/usr/bin/xcodebuild
/usr/local/bin/nasm
/usr/local/bin/mtoc
locus@locus OC-tool %

That's all!

source is from today an hour ago....

prev-lang:kbd doesn't accept 'en-US:0'

Great PROJECT!!!!!
I have a config.plist which has

prev-lang:kbd ( type string) : en-US:0

which according to this doc is valid.

Hint: prev-lang:kbd can be changed into a String so you can input en-US:0 directly instead of converting to HEX

The sample.plist.txt file has it listed as:

NVRAM|Add|7C436110-AB2A-4BBB-A880-FE41995C9F82|||data|prev-lang:kbd| "cnUtUlU6MjUy"

It's throwing this error

Processing config.plist ... done
Checking for missing fields ...
NOTE:	found fields missing from config.plist

	NVRAM > Add > prev-lang:kbd

	You can edit your config.plist manually, or
	use the -t option to select fields to add
	e.g. './OC-tool -t'

Checking for extra fields ...
NOTE:	found extra fields in config.plist

	NVRAM > Add > prev-lang:kbd

	You can edit your config.plist manually, or
	use the -t option to select fields to remove
	e.g. './OC-tool -t'


ERROR: /Users/foo/Dropbox/home_work/osx-amd/round2/OC-tool/INPUT/config.plist does not appear to be an OpenCore plist
	If you don't have an OpenCore plist you can start with the sample provided
	by the acidanthera team.  You can copy the sample to your INPUT directory
	by using this command, but be aware if a config.plist already exists in
	the INPUT directory it will be replaced.

	cp ./Docs/Sample.plist ./INPUT/config.plist

I worked around the issue by setting the field to data and putting the HEX value in... I don't know, maybe put some sort of pre - linter in there that says if this field is set to string don't accept?

modified.config.plist Kernel_Delete_0 breaking followup builds

Version data:

./OC-tool -V
OC-tool version 3.5.9(010620) last checked with OpenCore version REL-060-2020-06-01

prebuilt release -> 0.5.9
prebuilt daily/latest source -> 0.6.0

Found booted opencore-version	REL-058-2020-05-04  in NVRAM

After running ./OC-tool -t, output modified.config.plist cannot be used for followup builds.

Issue appears to be the change from original config.plist

	<key>Kernel</key>
	<dict>
		<key>Delete</key>
		<array>
			<dict>
				<key>Comment</key>
				<string></string>
				<key>Enabled</key>
				<false/>
				<key>Identifier</key>
				<string>com.apple.driver.AppleTyMCEDriver</string>
				<key>MaxKernel</key>
				<string></string>
				<key>MinKernel</key>
				<string></string>
			</dict>
		</array>

to modified.config.plist

	<key>Kernel</key>
	<dict>
		<key>Delete</key>
		<array>
			<string>Kernel_Delete_0</string>
			<array>
				<string>Comment</string>
				<string></string>
				<string>Enabled</string>
				<false/>
				<string>Identifier</string>
				<string>com.apple.driver.AppleTyMCEDriver</string>
				<string>MaxKernel</string>
				<string></string>
				<string>MinKernel</string>
				<string></string>
			</array>
		</array>

After reverting the updated block in modified.config.plist back to the original, builds complete successfully against the new file.

[ 2 Questions]0.5.8 folder Structure & ApfsDriverLoader

Hi,

  1. A few days ago Bootstrap was added to the EFI folder structure. Does OC-tool need to be updated or will it always have to be manually added like the Resources folder?

    2)I was surprised I had to add ApfsDriverLoader.efi to the extras folder is this normal?

Thanks

Freeze when building new config/efi from TUI

If I go into the TUI, edit with the editor (e option), make changes, and try to directly build new efi (g-option), the program stalls at this line:

Writing new config.plist to /Users/USER/Desktop/Hackintosh/OC-tool/Docs/config.plist ...
And the config file that it generates is corrupt.

Errors in tool.log

I'm on MacOS Catalina 10.15.3 using zsh as my shell.
I runned your tool with this command: ./OC-tool -st and I found this in the logs:

UEFI|Output| not found
sed: 1: "s/Kernel_Add_5 /Content ...": bad flag in substitute command: 'P'

If you need more informations or anything I'll gladly help you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.