Merge pull request #1 from sickcodes/ocbinarydata-simplify

OSX-KVM already has OcBinaryData as a submodule
This commit is contained in:
sickcodes 2021-03-09 10:12:40 +00:00 committed by GitHub
commit 1ba588af3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 17 deletions

View file

@ -192,16 +192,30 @@ done
download_qcow_efi_folder () {
[ -d ./OSX-KVM ] || git clone --depth 1 https://github.com/kholia/OSX-KVM.git
cp -ra ./OSX-KVM/OpenCore-Catalina/EFI .
mkdir -p ./EFI/OC/Resources
# clone some Apple drivers
[ -d ./OcBinaryData ] || git clone --depth 1 https://github.com/acidanthera/OcBinaryData.git
# copy said drivers into EFI/OC/Resources
cp -a ./OcBinaryData/Resources/* ./EFI/OC/Resources
export EFI_FOLDER=./OpenCore-Catalina/EFI
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
# check if we are inside OSX-KVM already
# if not, download OSX-KVM locally
[ -d ./OpenCore-Catalina/EFI/ ] || {
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
}
[ -d ./resources/OcBinaryData/Resources/ ] || {
export RESOURCES_FOLDER="./OSX-KVM/${RESOURCES_FOLDER}"
}
# EFI Shell commands
touch startup.nsh \
&& echo 'fs0:\EFI\BOOT\BOOTx64.efi' > startup.nsh
touch startup.nsh && echo 'fs0:\EFI\BOOT\BOOTx64.efi' > startup.nsh
cp -ra "${EFI_FOLDER}" .
mkdir -p ./EFI/OC/Resources
# copy Apple drivers into EFI/OC/Resources
cp -a "${RESOURCES_FOLDER}"/* ./EFI/OC/Resources
}
generate_bootdisk () {

View file

@ -225,15 +225,30 @@ download_vendor_mac_addresses () {
}
download_qcow_efi_folder () {
[ -d ./OSX-KVM ] || git clone --depth 1 https://github.com/kholia/OSX-KVM.git
cp -ra ./OSX-KVM/OpenCore-Catalina/EFI .
mkdir -p ./EFI/OC/Resources
# clone some Apple drivers
[ -d ./OcBinaryData ] || git clone --depth 1 https://github.com/acidanthera/OcBinaryData.git
# copy said drivers into EFI/OC/Resources
cp -a ./OcBinaryData/Resources/* ./EFI/OC/Resources
export EFI_FOLDER=./OpenCore-Catalina/EFI
export RESOURCES_FOLDER=./resources/OcBinaryData/Resources
# check if we are inside OSX-KVM already
# if not, download OSX-KVM locally
[ -d ./OpenCore-Catalina/EFI/ ] || {
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
}
[ -d ./resources/OcBinaryData/Resources/ ] || {
export RESOURCES_FOLDER="./OSX-KVM/${RESOURCES_FOLDER}"
}
# EFI Shell commands
touch startup.nsh && echo 'fs0:\EFI\BOOT\BOOTx64.efi' > startup.nsh
cp -ra "${EFI_FOLDER}" .
mkdir -p ./EFI/OC/Resources
# copy Apple drivers into EFI/OC/Resources
cp -a "${RESOURCES_FOLDER}"/* ./EFI/OC/Resources
}
@ -280,7 +295,7 @@ EOF
echo "Wrote CSV to: ${TSV_SERIAL_SETS_FILE}"
# make envs if --envs, but also if you set the env filename it will switch on by itself
if [ "${CREATE_ENVS}" ] || [ "${OUTPUT_ENV}" ] || [ "${CREATE_PLISTS}" ]; then
if [ "${CREATE_ENVS}" ] || [ "${OUTPUT_ENV}" ] || [ "${CREATE_PLISTS}" ] || [ "${CREATE_BOOTDISKS}" ]; then
mkdir -p "${OUTPUT_DIRECTORY}/envs"
OUTPUT_ENV_FILE="${OUTPUT_ENV:-"${OUTPUT_DIRECTORY}/envs/${SERIAL}.env.sh"}"
touch "${OUTPUT_ENV_FILE}"