diff --git a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe index c72d81f..aab11f4 100755 Binary files a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe and b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe differ diff --git a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.exe b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.exe index 3a5806b..05109d0 100755 Binary files a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.exe and b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.exe differ diff --git a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.linux b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.linux index a865896..08b12d4 100755 Binary files a/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.linux and b/OpenCore-0.8.0/Utilities/ACPIe/ACPIe.linux differ diff --git a/OpenCore-0.8.0/Utilities/FindSerialPort/FindSerialPort.command b/OpenCore-0.8.0/Utilities/FindSerialPort/FindSerialPort.command new file mode 100755 index 0000000..451ba92 --- /dev/null +++ b/OpenCore-0.8.0/Utilities/FindSerialPort/FindSerialPort.command @@ -0,0 +1,42 @@ +#!/bin/sh + +## @file +# Copyright (c) 2022, joevt. All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause +## + +serial_dev=$(ioreg -p IODeviceTree -lw0 | perl -e ' + $ioregpath=""; $pcipath=""; while (<>) { + if ( /^([ |]*)\+\-o (.+) / ) { $name = $1; }; if ( /^[ |]*"_UID" = "(\d+)"/ ) { $uid = $1; } } + elsif ( $class eq "IOPCIDevice" ) { if ( /^[ |]*"pcidebug" = "\d+:(\d+):(\d+).*"/ ) { $name = sprintf("Pci(0x%x,0x%x)", $1, $2); } if ( /^[ |]*"class-code" = <(\w+)>/ ) { $classcode = $1; } } + if ( /^[ |]*}/ && $name ) { + if ( $class eq "IOACPIPlatformDevice" ) { + if ($name eq "PNP0A03") { $name = sprintf ("PciRoot(0x%x)", $uid); } + elsif ($name eq "PNP0A08") { $name = sprintf ("PciRoot(0x%x)", $uid); } + elsif ($name =~ /PNP..../) { $name = sprintf ("Acpi(%s,0x%x)", $name, $uid); } + # not translating all ACPI types since we only care about PCI devices + } + $pcipath .= $name; + if ( $classcode eq "02000700" ) { + $serialdevicepath = $pcipath =~ s/.*PciRoot\(0x0\)//r =~ s|/Pci\(||gr =~ s|\)| 00 00 |gr =~ s|0x||gr =~ s|,| |gr =~ s|\b(\w)\b|0\1|gr =~ s|$|FF|r; + print $ioregpath =~ s|/Root/||r . "\n"; + print $pcipath =~ s|/*||r . "\n"; + print "xxd -p -r <<< \"" . $serialdevicepath . "\" | base64\n"; + print "\n"; + } + } + } +') + +if [ "$serial_dev" = "" ]; then + echo "No serial device found!" +fi + +exit 0 diff --git a/OpenCore-0.8.0/Utilities/FindSerialPort/README.md b/OpenCore-0.8.0/Utilities/FindSerialPort/README.md new file mode 100644 index 0000000..df36949 --- /dev/null +++ b/OpenCore-0.8.0/Utilities/FindSerialPort/README.md @@ -0,0 +1,4 @@ +FindSerialPort +================ + +This script finds PCIe serial ports and outputs their paths. Thanks [joevt](https://github.com/joevt) for writing it. diff --git a/OpenCore-0.8.0/Utilities/LogoutHook/nvramdump b/OpenCore-0.8.0/Utilities/LogoutHook/nvramdump index 89d3d96..6c8c342 100755 Binary files a/OpenCore-0.8.0/Utilities/LogoutHook/nvramdump and b/OpenCore-0.8.0/Utilities/LogoutHook/nvramdump differ diff --git a/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo b/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo index cff08ca..7683b44 100755 Binary files a/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo and b/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo differ diff --git a/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo.exe b/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo.exe index 1e22b20..806f477 100755 Binary files a/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo.exe and b/OpenCore-0.8.0/Utilities/acdtinfo/acdtinfo.exe differ diff --git a/OpenCore-0.8.0/Utilities/disklabel/disklabel b/OpenCore-0.8.0/Utilities/disklabel/disklabel index 0edc980..5ce0fa3 100755 Binary files a/OpenCore-0.8.0/Utilities/disklabel/disklabel and b/OpenCore-0.8.0/Utilities/disklabel/disklabel differ diff --git a/OpenCore-0.8.0/Utilities/disklabel/disklabel.exe b/OpenCore-0.8.0/Utilities/disklabel/disklabel.exe index 6b0c63a..64051fa 100755 Binary files a/OpenCore-0.8.0/Utilities/disklabel/disklabel.exe and b/OpenCore-0.8.0/Utilities/disklabel/disklabel.exe differ diff --git a/OpenCore-0.8.0/Utilities/icnspack/icnspack b/OpenCore-0.8.0/Utilities/icnspack/icnspack index fc85199..42cd254 100755 Binary files a/OpenCore-0.8.0/Utilities/icnspack/icnspack and b/OpenCore-0.8.0/Utilities/icnspack/icnspack differ diff --git a/OpenCore-0.8.0/Utilities/icnspack/icnspack.exe b/OpenCore-0.8.0/Utilities/icnspack/icnspack.exe index b126a26..a6db716 100755 Binary files a/OpenCore-0.8.0/Utilities/icnspack/icnspack.exe and b/OpenCore-0.8.0/Utilities/icnspack/icnspack.exe differ diff --git a/OpenCore-0.8.0/Utilities/macrecovery/README.md b/OpenCore-0.8.0/Utilities/macrecovery/README.md index 955aa98..4cf122b 100644 --- a/OpenCore-0.8.0/Utilities/macrecovery/README.md +++ b/OpenCore-0.8.0/Utilities/macrecovery/README.md @@ -2,4 +2,7 @@ macrecovery is a tool that helps to automate recovery interaction. It can be used to download diagnostics and recovery as well as analyse MLB. -Requires python to run. Run with `-h` argument to see all available arguments. +Requires python3 to run. Run with `-h` argument to see all available arguments. + +To create a disk image for a virtual machine installation use `build-image.sh`. + diff --git a/OpenCore-0.8.0/Utilities/macrecovery/boards.json b/OpenCore-0.8.0/Utilities/macrecovery/boards.json index be4b276..966d0b8 100644 --- a/OpenCore-0.8.0/Utilities/macrecovery/boards.json +++ b/OpenCore-0.8.0/Utilities/macrecovery/boards.json @@ -1,79 +1,79 @@ { - "Mac-226CB3C6A851A671": "latest", - "Mac-031B6874CF7F642A": "10.15.7", - "Mac-27AD2F918AE68F61": "latest", - "Mac-AA95B1DDAB278B95": "latest", - "Mac-66E35819EE2D0D05": "latest", - "Mac-7BA5B2D9E42DDD94": "latest", - "Mac-7BA5B2794B2CDB12": "10.13.6", - "Mac-06F11F11946D27C5": "latest", - "Mac-AFD8A9D944EA4843": "10.15.7", - "Mac-942B59F58194171B": "10.13.6", - "Mac-B809C3757DA9BB8D": "latest", - "Mac-7DF2A3B5E5D671ED": "10.15.7", - "Mac-35C1E88140C3E6CF": "11.6.3", - "Mac-942459F5819B171B": "10.13.6", - "Mac-77EB7D7DAF985301": "10.15.7", - "Mac-827FB448E656EC26": "latest", - "Mac-7BA5B2DFE22DDD8C": "latest", - "Mac-2E6FAB96566FE58C": "10.15.7", - "Mac-F2208EC8": "10.13.6", - "Mac-BE0E8AC46FE800CC": "11.6.3", - "Mac-00BE6ED71E35EB86": "10.15.7", - "Mac-4B7AC7E43945597E": "10.15.7", - "Mac-CAD6701F7CEA0921": "latest", - "Mac-63001698E7A34814": "latest", - "Mac-937CB26E2E02BB01": "latest", - "Mac-FFE5EF870D7BA81A": "latest", - "Mac-53FDB3D8DB8CA971": "latest", - "Mac-A61BADE1FDAD7B05": "latest", - "Mac-42FD25EABCABB274": "11.6.3", - "Mac-827FAC58A8FDFA22": "latest", - "Mac-1E7E29AD0135F9BC": "latest", - "Mac-3CBD00234E554E41": "11.6.3", - "Mac-66F35F19FE2A0D05": "10.15.7", - "Mac-189A3D4F975D5FFC": "11.6.3", - "Mac-B4831CEBD52A0C4C": "latest", - "Mac-C08A6BB70A942AC2": "10.13.6", - "Mac-8ED6AF5B48C039E1": "10.13.6", - "Mac-FC02E91DDD3FA6A4": "10.15.7", - "Mac-06F11FD93F0323C5": "latest", - "Mac-9AE82516C7C6B903": "latest", - "Mac-6F01561E16C75D06": "10.15.7", - "Mac-F60DEB81FF30ACF6": "latest", - "Mac-473D31EABEB93F9B": "latest", - "Mac-F22589C8": "10.13.6", - "Mac-0CFF9C7C2B63DF8D": "latest", - "Mac-CFF7D910A743CAAF": "latest", - "Mac-942C5DF58193131B": "10.13.6", - "Mac-77F17D7DA9285301": "latest", - "Mac-9F18E312C5C2BF0B": "latest", - "Mac-E1008331FDC96864": "latest", - "Mac-E7203C0F68AA0004": "latest", - "Mac-742912EFDBEE19B3": "10.13.6", - "Mac-27ADBB7B4CEE8E61": "10.15.7", - "Mac-F65AE981FFA204ED": "10.15.7", - "Mac-031AEE4D24BFF0B1": "10.15.7", - "Mac-4B682C642B45593E": "latest", - "Mac-DB15BD556843C820": "latest", - "Mac-937A206F2EE63C01": "latest", - "Mac-81E3E92DD6088272": "11.6.3", - "Mac-E43C1C25D4880AD6": "latest", - "Mac-942452F5819B1C1B": "10.13.6", - "Mac-65CE76090165799A": "latest", - "Mac-551B86E5744E2388": "latest", - "Mac-BE088AF8C5EB4FA2": "latest", - "Mac-A5C67F76ED83108C": "latest", - "Mac-5F9802EFE386AA28": "latest", - "Mac-AF89B6D9451A490B": "latest", - "Mac-94245B3640C91C81": "10.13.6", - "Mac-EE2EBD4B90B839A8": "latest", - "Mac-4BC72D62AD45599E": "10.13.6", - "Mac-2BD1B31983FE1663": "11.6.3", - "Mac-7DF21CB3ED6977E5": "11.6.3", - "Mac-A369DDC4E67F1C45": "latest", - "Mac-94245A3940C91C80": "10.13.6", - "Mac-C3EC7CD22292981F": "10.15.7", - "Mac-35C5E08120C7EEAF": "latest", - "Mac-942B5BF58194151B": "10.13.6" + "Mac-EE2EBD4B90B839A8": "latest", + "Mac-BE0E8AC46FE800CC": "11.6.5", + "Mac-9AE82516C7C6B903": "latest", + "Mac-942452F5819B1C1B": "10.13.6", + "Mac-942C5DF58193131B": "10.13.6", + "Mac-C08A6BB70A942AC2": "10.13.6", + "Mac-742912EFDBEE19B3": "10.13.6", + "Mac-66F35F19FE2A0D05": "10.15.7", + "Mac-2E6FAB96566FE58C": "10.15.7", + "Mac-35C1E88140C3E6CF": "11.6.5", + "Mac-7DF21CB3ED6977E5": "11.6.5", + "Mac-9F18E312C5C2BF0B": "latest", + "Mac-937CB26E2E02BB01": "latest", + "Mac-827FAC58A8FDFA22": "latest", + "Mac-226CB3C6A851A671": "latest", + "Mac-0CFF9C7C2B63DF8D": "latest", + "Mac-C3EC7CD22292981F": "10.15.7", + "Mac-AFD8A9D944EA4843": "10.15.7", + "Mac-189A3D4F975D5FFC": "11.6.5", + "Mac-3CBD00234E554E41": "11.6.5", + "Mac-2BD1B31983FE1663": "11.6.5", + "Mac-06F11FD93F0323C5": "latest", + "Mac-06F11F11946D27C5": "latest", + "Mac-E43C1C25D4880AD6": "latest", + "Mac-473D31EABEB93F9B": "latest", + "Mac-66E35819EE2D0D05": "latest", + "Mac-A5C67F76ED83108C": "latest", + "Mac-B4831CEBD52A0C4C": "latest", + "Mac-CAD6701F7CEA0921": "latest", + "Mac-551B86E5744E2388": "latest", + "Mac-937A206F2EE63C01": "latest", + "Mac-827FB448E656EC26": "latest", + "Mac-1E7E29AD0135F9BC": "latest", + "Mac-53FDB3D8DB8CA971": "latest", + "Mac-E1008331FDC96864": "latest", + "Mac-5F9802EFE386AA28": "latest", + "Mac-E7203C0F68AA0004": "latest", + "Mac-A61BADE1FDAD7B05": "latest", + "Mac-F22589C8": "10.13.6", + "Mac-94245B3640C91C81": "10.13.6", + "Mac-94245A3940C91C80": "10.13.6", + "Mac-942459F5819B171B": "10.13.6", + "Mac-4B7AC7E43945597E": "10.15.7", + "Mac-6F01561E16C75D06": "10.15.7", + "Mac-F60DEB81FF30ACF6": "latest", + "Mac-27AD2F918AE68F61": "latest", + "Mac-F2208EC8": "10.13.6", + "Mac-8ED6AF5B48C039E1": "10.13.6", + "Mac-4BC72D62AD45599E": "10.13.6", + "Mac-7BA5B2794B2CDB12": "10.13.6", + "Mac-031AEE4D24BFF0B1": "10.15.7", + "Mac-F65AE981FFA204ED": "10.15.7", + "Mac-35C5E08120C7EEAF": "latest", + "Mac-7BA5B2DFE22DDD8C": "latest", + "Mac-942B5BF58194151B": "10.13.6", + "Mac-942B59F58194171B": "10.13.6", + "Mac-00BE6ED71E35EB86": "10.15.7", + "Mac-FC02E91DDD3FA6A4": "10.15.7", + "Mac-7DF2A3B5E5D671ED": "10.15.7", + "Mac-031B6874CF7F642A": "10.15.7", + "Mac-27ADBB7B4CEE8E61": "10.15.7", + "Mac-77EB7D7DAF985301": "10.15.7", + "Mac-81E3E92DD6088272": "11.6.5", + "Mac-42FD25EABCABB274": "11.6.5", + "Mac-A369DDC4E67F1C45": "latest", + "Mac-FFE5EF870D7BA81A": "latest", + "Mac-DB15BD556843C820": "latest", + "Mac-65CE76090165799A": "latest", + "Mac-B809C3757DA9BB8D": "latest", + "Mac-4B682C642B45593E": "latest", + "Mac-77F17D7DA9285301": "latest", + "Mac-BE088AF8C5EB4FA2": "latest", + "Mac-AA95B1DDAB278B95": "latest", + "Mac-63001698E7A34814": "latest", + "Mac-CFF7D910A743CAAF": "latest", + "Mac-AF89B6D9451A490B": "latest", + "Mac-7BA5B2D9E42DDD94": "latest" } \ No newline at end of file diff --git a/OpenCore-0.8.0/Utilities/macrecovery/build-image.sh b/OpenCore-0.8.0/Utilities/macrecovery/build-image.sh new file mode 100755 index 0000000..8dc7107 --- /dev/null +++ b/OpenCore-0.8.0/Utilities/macrecovery/build-image.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +rm -rf Recovery.RO.dmg Recovery.RO.raw Recovery.dmg.sparseimage +hdiutil create -size 800m -layout "UNIVERSAL HD" -type SPARSE -o Recovery.dmg +newDevice=$(hdiutil attach -nomount Recovery.dmg.sparseimage | head -n 1 | awk '{print $1}') +echo newdevice "$newDevice" +diskutil partitionDisk "${newDevice}" 1 MBR fat32 RECOVERY R +N=$(echo "$newDevice" | tr -dc '0-9') +diskutil mount disk"${N}"s1 +MOUNT="$(diskutil info disk"${N}"s1 | sed -n 's/.*Mount Point: *//p')" +mkdir -p "$MOUNT/com.apple.recovery.boot" +cp ./*.dmg ./*.chunklist "$MOUNT/com.apple.recovery.boot/" +diskutil umount disk"${N}"s1 +hdiutil detach "$newDevice" +hdiutil convert -format UDZO Recovery.dmg.sparseimage -o Recovery.RO.dmg +rm Recovery.dmg.sparseimage +qemu-img convert -f dmg -O raw Recovery.RO.dmg Recovery.raw +rm Recovery.RO.dmg diff --git a/OpenCore-0.8.0/Utilities/macrecovery/macrecovery.py b/OpenCore-0.8.0/Utilities/macrecovery/macrecovery.py index 7a91389..b9138fb 100755 --- a/OpenCore-0.8.0/Utilities/macrecovery/macrecovery.py +++ b/OpenCore-0.8.0/Utilities/macrecovery/macrecovery.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Gather recovery information for Macs. diff --git a/OpenCore-0.8.0/Utilities/macserial/macserial b/OpenCore-0.8.0/Utilities/macserial/macserial index 830e0c8..eb9ebdc 100755 Binary files a/OpenCore-0.8.0/Utilities/macserial/macserial and b/OpenCore-0.8.0/Utilities/macserial/macserial differ diff --git a/OpenCore-0.8.0/Utilities/macserial/macserial.exe b/OpenCore-0.8.0/Utilities/macserial/macserial.exe index 17e0ecd..5cb80d3 100755 Binary files a/OpenCore-0.8.0/Utilities/macserial/macserial.exe and b/OpenCore-0.8.0/Utilities/macserial/macserial.exe differ diff --git a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen index b8dc045..676654a 100755 Binary files a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen and b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen differ diff --git a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.exe b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.exe index debf92d..59f8e9d 100755 Binary files a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.exe and b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.exe differ diff --git a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.linux b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.linux index 2b621f2..335b0fa 100755 Binary files a/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.linux and b/OpenCore-0.8.0/Utilities/ocpasswordgen/ocpasswordgen.linux differ diff --git a/OpenCore-0.8.0/Utilities/ocvalidate/README.md b/OpenCore-0.8.0/Utilities/ocvalidate/README.md index 3c98229..97384bc 100644 --- a/OpenCore-0.8.0/Utilities/ocvalidate/README.md +++ b/OpenCore-0.8.0/Utilities/ocvalidate/README.md @@ -16,7 +16,7 @@ Utility to validate whether a `config.plist` matches requirements and convention ### Global Rules - All entries must be set once only. Duplication is strictly prohibited. - All strings (fields with plist `String` format) throughout the whole config only accept ASCII printable characters at most. Stricter rules may apply. For instance, some fields only accept specified values, as indicated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf). -- All the paths relative to OpenCore root must be 128 bytes total including '\0' terminator. +- All the paths relative to OpenCore root must be less than or equal to 128 bytes (`OC_STORAGE_SAFE_PATH_MAX`) in total including '\0' terminator. - Most binary patches must have `Find`, `Replace`, `Mask` (if used), and `ReplaceMask` (if used) identical size set. Also, `Find` requires `Mask` (or `Replace` requires `ReplaceMask`) to be active (set to non-zero) for corresponding bits. - `MinKernel` and `MaxKernel` entries should follow conventions specified in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf). (TODO: Bring decent checks for this) - `MinKernel` cannot be a value that is below macOS 10.4 (Darwin version 8). @@ -78,6 +78,12 @@ Utility to validate whether a `config.plist` matches requirements and convention - DmgLoading: Only `Disabled`, `Signed`, or `Any` are accepted. - Vault: Only `Optional`, `Basic`, or `Secure` are accepted. - SecureBootModel: Only `Default`, `Disabled`, `j137`, `j680`, `j132`, `j174`, `j140k`, `j780`, `j213`, `j140a`, `j152f`, `j160`, `j230k`, `j214k`, `j223`, `j215`, `j185`, `j185f`, or `x86legacy` are accepted. +#### Serial +- RegisterAccessWidth: Only `8` or `32` are accepted. +- BaudRate: Only `921600`, `460800`, `230400`, `115200`, `57600`, `38400`, `19200`, `9600`, `7200`, `4800`, `3600`, `2400`, `2000`, `1800`, `1200`, `600`, `300`, `150`, `134`, `110`, `75`, or `50` are accepted. +- PciDeviceInfo: The last byte must be `0xFF`. +- PciDeviceInfo: Excluding the last byte `0xFF`, the rest must be divisible by 4. +- PciDeviceInfo: Maximum allowed size is 41. ### NVRAM - Requirements here all follow Global Rules. In addition, the following keys and values are checked: diff --git a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate index eb684a6..4edf8e5 100755 Binary files a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate and b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate differ diff --git a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.exe b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.exe index 0baa8f9..8d7c18d 100755 Binary files a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.exe and b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.exe differ diff --git a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.linux b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.linux index 1580a06..cccc7b2 100755 Binary files a/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.linux and b/OpenCore-0.8.0/Utilities/ocvalidate/ocvalidate.linux differ