diff --git a/Changelog.md b/Changelog.md index 507c37c5630b4d6fdfe160ffd788e6c9e8045c8b..57ec135048bfb308d2326bda758c4df9410a1659 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,6 +14,7 @@ OpenCore Changelog - Implemented `InitialMode` option to allow fine control over text renderer operating mode - Added support for `ConsoleMode` text resolution setting to `Builtin` renderer - Fixed regression for ACPI quirks `RebaseRegions` and `SyncTableIds` +- Updated build process to provide stable and bleeding-edge versions of `EnableGop` #### v0.9.1 - Fixed long comment printing for ACPI patches, thx @corpnewt diff --git a/OpenCorePkg.dsc b/OpenCorePkg.dsc index b35c7852ae72c50b49954e4c54fa40ff1fc5d80a..ff516d57ec664daff6b9f9df76eea0a49d442c86 100755 --- a/OpenCorePkg.dsc +++ b/OpenCorePkg.dsc @@ -22,7 +22,7 @@ BUILD_TARGETS = RELEASE|DEBUG|NOOPT SKUID_IDENTIFIER = DEFAULT DSC_SPECIFICATION = 0x00010006 - # FLASH_DEFINITION = OpenCorePkg/OpenCorePkg.fdf + FLASH_DEFINITION = OpenCorePkg/OpenCorePkg.fdf # # Network definition diff --git a/Staging/EnableGop/EnableGop.inf b/Staging/EnableGop/EnableGop.inf index 90326c835d95a23bf546de15b083a45aa95ca80a..089576732a9c94be5522c0d0ea3bddbdc99c149f 100644 --- a/Staging/EnableGop/EnableGop.inf +++ b/Staging/EnableGop/EnableGop.inf @@ -7,12 +7,15 @@ # ## +# Note: VERSION_STRING is compiled into the .ffs file, so updates to Staging/EnableGop/Release +# folder contents should be built locally, or on non-master branch in CI, without -dev suffix +# on VERSION_STRING, and then copied from the built Utilities/EnableGop/Pre-release folder. [Defines] INF_VERSION = 0x00010005 BASE_NAME = EnableGop FILE_GUID = 3FBA58B1-F8C0-41BC-ACD8-253043A3A17F MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.4 + VERSION_STRING = 1.4-dev ENTRY_POINT = UefiMain # diff --git a/Staging/EnableGop/EnableGopDirect.inf b/Staging/EnableGop/EnableGopDirect.inf index 2a36651e7b07fd42a7a69af41711cfe597601028..ef49c0798947860e1d4f89ec2fe2c77db87a3cf8 100644 --- a/Staging/EnableGop/EnableGopDirect.inf +++ b/Staging/EnableGop/EnableGopDirect.inf @@ -7,12 +7,15 @@ # ## +# Note: VERSION_STRING is compiled into the .ffs file, so updates to Staging/EnableGop/Release +# folder contents should be built locally, or on non-master branch in CI, without -dev suffix +# on VERSION_STRING, and then copied from the built Utilities/EnableGop/Pre-release folder. [Defines] INF_VERSION = 0x00010005 BASE_NAME = EnableGopDirect FILE_GUID = 3FBA58B1-F8C0-41BC-ACD8-253043A3A17F MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.4 + VERSION_STRING = 1.4-dev ENTRY_POINT = UefiMain # diff --git a/Staging/EnableGop/Release/EnableGopDirect_1.3.efi b/Staging/EnableGop/Release/EnableGopDirect_1.3.efi new file mode 100644 index 0000000000000000000000000000000000000000..ee13ed463b86b7cb2a60f0ee3e3f69c0df026062 Binary files /dev/null and b/Staging/EnableGop/Release/EnableGopDirect_1.3.efi differ diff --git a/Staging/EnableGop/Release/EnableGopDirect_1.3.ffs b/Staging/EnableGop/Release/EnableGopDirect_1.3.ffs new file mode 100644 index 0000000000000000000000000000000000000000..fe47f4d6b5715864e59745724e65eb170bcfd391 Binary files /dev/null and b/Staging/EnableGop/Release/EnableGopDirect_1.3.ffs differ diff --git a/Staging/EnableGop/Release/EnableGop_1.3.efi b/Staging/EnableGop/Release/EnableGop_1.3.efi new file mode 100644 index 0000000000000000000000000000000000000000..59738b1c84fb4a96609fc236ac3ce5a45451dab5 Binary files /dev/null and b/Staging/EnableGop/Release/EnableGop_1.3.efi differ diff --git a/Staging/EnableGop/Release/EnableGop_1.3.ffs b/Staging/EnableGop/Release/EnableGop_1.3.ffs new file mode 100644 index 0000000000000000000000000000000000000000..970f38cb8edd593c4c6eb76be5e1011f147dda8a Binary files /dev/null and b/Staging/EnableGop/Release/EnableGop_1.3.ffs differ diff --git a/build_oc.tool b/build_oc.tool index 8b30be2e3fb6d8ad7f011e89e5b136152ffa168c..a6aef0347c0c3c33dfc61754f07d24d5ab924c5e 100755 --- a/build_oc.tool +++ b/build_oc.tool @@ -69,6 +69,33 @@ buildutil() { popd || exit } +get_inf_version() { + VER="VERSION_STRING" + + if [ ! -f "${1}" ]; then + echo "Missing .inf file ${1}" > /dev/stderr + exit 1 + fi + + ver_line=$(grep -E "${VER} *=" "${1}") + + if [ "${ver_line}" = "" ] ; then + echo "Missing ${VER} in ${1}" > /dev/stderr + exit 1 + fi + + read -ra ver_array <<<"${ver_line}" + + if [ "${ver_array[0]}" != "${VER}" ] || + [ "${ver_array[1]}" != "=" ] || + [ "${ver_array[2]}" = "" ] ; then + echo "Malformed ${VER} line in ${1}" > /dev/stderr + exit 1 + fi + + echo "${ver_array[2]}" +} + package() { if [ ! -d "$1" ]; then echo "Missing package directory $1" @@ -251,31 +278,40 @@ package() { fi done - # Copy Mac Pro GOP firmware driver. - # # mkdir -p "${dstdir}/Utilities/EnableGop" || exit 1 - # # ENABLE_GOP_GUID="3FBA58B1-F8C0-41BC-ACD8-253043A3A17F" - # # ffsNames=( - # # "EnableGop" - # # "EnableGopDirect" - # # ) - # # for ffsName in "${ffsNames[@]}"; do - # # cp "FV/Ffs/${ENABLE_GOP_GUID}${ffsName}/${ENABLE_GOP_GUID}.ffs" "${dstdir}/Utilities/EnableGop/${ffsName}.ffs" || exit 1 - # # done - # # gopDrivers=( - # # "EnableGop.efi" - # # "EnableGopDirect.efi" - # # ) - # # for file in "${gopDrivers[@]}"; do - # # cp "X64/${file}" "${dstdir}/Utilities/EnableGop"/ || exit 1 - # # done - # # helpFiles=( - # # "README.md" - # # "UEFITool_Inserted_Screenshot.png" - # # "vBiosInsert.sh" - # # ) - # # for file in "${helpFiles[@]}"; do - # # cp "${selfdir}/Staging/EnableGop/${file}" "${dstdir}/Utilities/EnableGop"/ || exit 1 - # # done + # Copy EFI-era Mac GOP firmware driver. + eg_ver=$(get_inf_version "${selfdir}/Staging/EnableGop/EnableGop.inf") || exit 1 + egdirect_ver=$(get_inf_version "${selfdir}/Staging/EnableGop/EnableGopDirect.inf") || exit 1 + + if [ "${eg_ver}" != "${egdirect_ver}" ] ; then + echo "Mismatched EnableGop versions (${eg_ver} and ${egdirect_ver})!" + exit 1 + fi + + mkdir -p "${dstdir}/Utilities/EnableGop/Pre-release" || exit 1 + ENABLE_GOP_GUID="3FBA58B1-F8C0-41BC-ACD8-253043A3A17F" + ffsNames=( + "EnableGop" + "EnableGopDirect" + ) + for ffsName in "${ffsNames[@]}"; do + cp "FV/Ffs/${ENABLE_GOP_GUID}${ffsName}/${ENABLE_GOP_GUID}.ffs" "${dstdir}/Utilities/EnableGop/Pre-release/${ffsName}_${eg_ver}.ffs" || exit 1 + done + gopDrivers=( + "EnableGop" + "EnableGopDirect" + ) + for file in "${gopDrivers[@]}"; do + cp "X64/${file}.efi" "${dstdir}/Utilities/EnableGop/Pre-release/${file}_${eg_ver}.efi" || exit 1 + done + helpFiles=( + "README.md" + "UEFITool_Inserted_Screenshot.png" + "vBiosInsert.sh" + ) + for file in "${helpFiles[@]}"; do + cp "${selfdir}/Staging/EnableGop/${file}" "${dstdir}/Utilities/EnableGop"/ || exit 1 + done + cp "${selfdir}/Staging/EnableGop/Release/"* "${dstdir}/Utilities/EnableGop"/ || exit 1 # Provide EDK-II BaseTools. mkdir "${dstdir}/Utilities/BaseTools" || exit 1