aboutsummaryrefslogtreecommitdiff
path: root/custom/generate-specific-bootdisk.sh
diff options
context:
space:
mode:
Diffstat (limited to 'custom/generate-specific-bootdisk.sh')
-rwxr-xr-xcustom/generate-specific-bootdisk.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/custom/generate-specific-bootdisk.sh b/custom/generate-specific-bootdisk.sh
index 386c13b..5095399 100755
--- a/custom/generate-specific-bootdisk.sh
+++ b/custom/generate-specific-bootdisk.sh
@@ -30,10 +30,11 @@ Optional options:
--master-plist <filename> Same as above.
--output-bootdisk <filename> Optionally change the bootdisk filename
--output-plist <filename> Optionally change the output plist filename
+ --thinkpad Sets ForceOcWriteFlash to true
--help, -h, help Display this help and exit
Placeholders: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
- {{ROM}}, {{WIDTH}}, {{HEIGHT}}
+ {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{THINKPAD}}
Example:
./generate-specific-bootdisk.sh \\
@@ -183,6 +184,12 @@ while (( "$#" )); do
shift
;;
+
+ --thinkpad )
+ export THINKPAD=true
+ shift
+ ;;
+
*)
echo "Invalid option ${1}. Running with default values..."
shift
@@ -193,12 +200,12 @@ done
download_qcow_efi_folder () {
- export EFI_FOLDER=./OpenCore-Catalina/EFI
+ export EFI_FOLDER=./OpenCore/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 ./OpenCore/EFI/ ] || {
[ -d ./OSX-KVM/ ] || git clone --recurse-submodules --depth 1 https://github.com/kholia/OSX-KVM.git
export EFI_FOLDER="./OSX-KVM/${EFI_FOLDER}"
}
@@ -233,6 +240,13 @@ generate_bootdisk () {
wget -O "${MASTER_PLIST:=./config-nopicker-custom.plist}" "${MASTER_PLIST_URL}"
fi
+ if [[ "${THINKPAD}" == true ]]; then
+ echo "Thinkpads: setting ForceOcWriteFlash to true"
+ export THINKPAD=true
+ else
+ export THINKPAD=false
+ fi
+
[ -e ./opencore-image-ng.sh ] \
|| { wget "${OPENCORE_IMAGE_MAKER_URL}" \
&& chmod +x opencore-image-ng.sh ; }
@@ -252,6 +266,7 @@ generate_bootdisk () {
-e s/\{\{ROM\}\}/"${ROM}"/g \
-e s/\{\{WIDTH\}\}/"${WIDTH:-1920}"/g \
-e s/\{\{HEIGHT\}\}/"${HEIGHT:-1080}"/g \
+ -e s/\{\{THINKPAD\}\}/"${THINKPAD:-false}"/g \
"${MASTER_PLIST}" > ./tmp.config.plist || exit 1
else
cat <<EOF && exit 1