Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -31,4 +31,104 @@ source ~/.bash_profile
|
||||
若是 zsh,则执行:
|
||||
```bash
|
||||
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
|
||||
source ~/.zshrc
|
||||
source ~/.zshrc
|
||||
```
|
||||
|
||||
|
||||
## macOS开发环境
|
||||
https://ue5wiki.com/wiki/2329190d/
|
||||
|
||||
运行生成解决方案.sh时会提示:
|
||||
>ERROR: Invalid SDK MacOSX.sdk, not found in /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs
|
||||
|
||||
确认安装Xcode之后执行
|
||||
```bash
|
||||
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms /Library/Developer/CommandLineTools/Platforms
|
||||
```
|
||||
|
||||
## 为 xcode 开启多线程编译
|
||||
AMD CPU信息查看APP:
|
||||
https://github.com/trulyspinach/SMCAMDProcessor/releases/tag/0.7.1
|
||||
|
||||
首先看一下 Mac 的硬件配置:
|
||||
>sysctl machdep.cpu
|
||||
|
||||
找到 `machdep.cpu.core_count` 字段,其中的数值就是 Mac 的核心数。然后可以给 xcode 开启多线程,数量数为核心数 *2,如我的是 8 核,就可以开启 16 线程:
|
||||
> defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 16
|
||||
|
||||
# 编译流程
|
||||
- 先编译ShaderCompileWork
|
||||
- 后编译UE5
|
||||
|
||||
## ATOMIC_VAR_INIT错误
|
||||
https://forums.unrealengine.com/t/cannot-build-ue-5-1-1-from-source-on-macos-ventura-13-3-1-xcode-14-3/885545
|
||||
macOS 13.4 Xcode 14.3编译UE5.1会报错,其原因是:
|
||||
>So it seems the error is related to the deprecation of `ATOMIC_VAR_INIT` [since C++20 2](https://en.cppreference.com/w/cpp/atomic/ATOMIC_VAR_INIT). I gather [from this table 3](https://en.wikipedia.org/wiki/Xcode#Xcode_11.0_-_14.x_(since_SwiftUI_framework)_2) that Xcode 14.3 includes a clang patch version bump from 14.0.0 to 14.0.3, and a llvm major version bump from 14.0.0 to 15.0.0. With my limited understanding of clang and llvm, I would guess that llvm 15 compiles at C++20, and therefore throws the build error, whereas the build is successful with Xcode 14.2.
|
||||
|
||||
解决方法是:
|
||||
- ShaderCompileWorker.target.cs添加下面的代码。
|
||||
- UnrealEditor.Target.cs添加下面的代码(去掉bOverrideBuildEnvironment那一行)。
|
||||
|
||||
```c++
|
||||
using UnrealBuildTool;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class YourGameTarget : TargetRules
|
||||
{
|
||||
public YourGameTarget(TargetInfo Target) : base(Target)
|
||||
{
|
||||
if(Target.Platform == UnrealTargetPlatform.Mac)
|
||||
{
|
||||
bOverrideBuildEnvironment = true;
|
||||
AdditionalCompilerArguments = "-Wno-deprecated-pragma"; // you can add more separated with spaces here
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
我对文件做了一些修改`Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs`,错误消失了。
|
||||
```c++
|
||||
if (CompilerVersionGreaterOrEqual(14, 0, 0))
|
||||
{
|
||||
Arguments.Add("-Wno-deprecated-pragma");
|
||||
}
|
||||
```
|
||||
|
||||
功能齐全:
|
||||
```csharp
|
||||
protected override void GetCompileArguments_Global(CppCompileEnvironment CompileEnvironment, List<string> Arguments)
|
||||
{
|
||||
base.GetCompileArguments_Global(CompileEnvironment, Arguments);
|
||||
|
||||
Arguments.Add("-fasm-blocks");
|
||||
|
||||
if (CompileEnvironment.bEnableOSX109Support)
|
||||
{
|
||||
Arguments.Add("-faligned-new"); // aligned operator new is supported only on macOS 10.14 and above
|
||||
}
|
||||
|
||||
// Pass through architecture and OS info
|
||||
Arguments.Add("" + FormatArchitectureArg(CompileEnvironment.Architecture));
|
||||
Arguments.Add($"-isysroot \"{SDKPath}\"");
|
||||
Arguments.Add("-mmacosx-version-min=" + (CompileEnvironment.bEnableOSX109Support ? "10.9" : Settings.MacOSVersion));
|
||||
|
||||
List<string> FrameworksSearchPaths = new List<string>();
|
||||
foreach (UEBuildFramework Framework in CompileEnvironment.AdditionalFrameworks)
|
||||
{
|
||||
FileReference FrameworkPath = new FileReference(Path.GetFullPath(Framework.Name));
|
||||
if (!FrameworksSearchPaths.Contains(FrameworkPath.Directory.FullName))
|
||||
{
|
||||
Arguments.Add($"-F \"{NormalizeCommandLinePath(FrameworkPath.Directory)}\"");
|
||||
FrameworksSearchPaths.Add(FrameworkPath.Directory.FullName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (CompilerVersionGreaterOrEqual(14, 0, 0))
|
||||
{
|
||||
Arguments.Add("-Wno-deprecated-pragma");
|
||||
}
|
||||
}
|
||||
```
|
@@ -22,19 +22,20 @@ SSDT&DSDT:
|
||||
- [如何选择有线网卡(板载or外置)?看这个视频可能就够了!](https://www.bilibili.com/video/BV1HN411P7Fx/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [12-13代intel黑苹果OC引导配置注意事项](https://www.bilibili.com/video/BV17e4y1A7os/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [蓝牙自动连接,黑苹果和Windows双系统共用一套蓝牙键鼠](https://www.bilibili.com/video/BV1kv4y1w7qH/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
|
||||
- [免驱显卡编号查询](https://devicehunt.com/view/type/pci/vendor/1002)
|
||||
|
||||
# 相关软件
|
||||
- [SSDTTime](https://github.com/corpnewt/SSDTTime):用于生成ssdt文件。
|
||||
- [USBToolBox](https://github.com/USBToolBox/tool):用于定制usb。
|
||||
- [kext](https://github.com/USBToolBox/kext)
|
||||
- [OCAT](https://github.com/ic005k/OCAuxiliaryTools):OC编辑器。
|
||||
- DiskGenius:查看EFI用。
|
||||
- balenaEtcher-Setup:写入镜像工具。
|
||||
- [OCC](https://mackie100projects.altervista.org/download-opencore-configurator/):MAC系统中的OC编辑器。
|
||||
- [DiskGenius](https://www.diskgenius.cn/):查看EFI用。
|
||||
- [BalenaEtcher-Setup](https://etcher.balena.io/):写入镜像工具。
|
||||
- [ProperTree](https://github.com/corpnewt/ProperTree):
|
||||
- [Hackintool](https://github.com/benbaker76/Hackintool):
|
||||
|
||||
https://pan.baidu.com/s/1VFuLao3LDb_VwQzXxx6Eyg 提取码:ile9
|
||||
也可以参考https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/post-27008
|
||||
参考:https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/post-27008
|
||||
|
||||
# 完美黑苹果(Win&Mac 双系统)安装流程
|
||||
如果电脑已经存在EFI分区,即你已经先安装了macOS,此时安装Win10会破坏之前的EFI引导,所以建议先安装Win10,之后安装macOS。
|
||||
@@ -101,11 +102,10 @@ https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x6
|
||||
2. NVRAM法 https://imacos.top/2022/01/03/0807/
|
||||
3. 路径可以在设备管理器 -> 显卡属性 -> 详细信息 -> 位置路径找到。 https://www.reddit.com/r/hackintosh/comments/yetoec/pci_device_paths_without_gfxutil_or_macos_using/
|
||||
4. 屏蔽N卡 PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0) |disable-gpu|Boolean|`True`| https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html
|
||||
3. 修改MMIO白名单
|
||||
3. [x] 修改MMIO白名单
|
||||
4. 可选修改
|
||||
1. [ ] 将OpenCore加入Bios启动项中。[【Windows&macOS】完美双系统系列教程第2集,Windows环境下配置OC引导】 【精准空降到 05:35】](https://www.bilibili.com/video/BV1Bi4y1S7DN/?share_source=copy_web&vd_source=fe8142e8e12816535feaeabd6f6cdc8e&t=335)
|
||||
2. [ ] 为了EXPO关闭雷电4接口。(**Bios中操作,可能需要禁用**)
|
||||
3. [ ] USBToolBox 定制
|
||||
1. [x] 为了EXPO关闭雷电4接口。(**Bios中操作,可能需要禁用**)
|
||||
2. [ ] USBToolBox 定制
|
||||
|
||||
# 额外操作
|
||||
debug 3 -> 67
|
||||
@@ -115,10 +115,125 @@ debug 3 -> 67
|
||||
|
||||
|
||||
# 其他可能的Bios问题
|
||||
1. 关闭CSM
|
||||
2. 快速启动
|
||||
3. 安全启动
|
||||
需要关闭:
|
||||
1. SVM(虚拟机)
|
||||
2. CSM
|
||||
3. 快速启动
|
||||
4. 安全启动
|
||||
5. 为了EXPO关闭雷电4接口
|
||||
|
||||
# OpenCore添加跑码模式
|
||||
找到NVRAM---7C436110-AB2A-4BBB-A880-FE41995C9F82 ,给boot-args 添加上 -v选项。
|
||||

|
||||
# OpenCore Debug
|
||||
添加跑码模式,找到NVRAM---7C436110-AB2A-4BBB-A880-FE41995C9F82 ,给boot-args 添加上 -v选项。
|
||||

|
||||
|
||||
MISC - Debug -Target 设置成67,之后就可以输出Log到安装U盘根目录。
|
||||
|
||||
# CaseySJ & ovenlite1 EFI
|
||||
ovenlite1相比CaseySJ
|
||||
- ACPI
|
||||
- Add (Remove & Replace)
|
||||
- SSDT-CREATE-DP68.aml (disable)
|
||||
- SSDT-EC-AMD.aml
|
||||
- SSDT-SBUS-MCHC-AMD.aml
|
||||
- SSDT-SBRG.aml
|
||||
- SSDT-USBX.aml -> SSDT-EC-USBX.aml
|
||||
- SSDT-SBUS-MCHC-AMD.aml -> SSDT-SBUS-MCHC.aml
|
||||
- SSDT-DTPG.aml
|
||||
- SSDT-TB3HP-ASUS-X670E-GENE.aml (disable)
|
||||
- SSDT-USB-ASUS-X670E-GENE-GP17.aml
|
||||
- SSDT-USB-ASUS-X670E-GENE-GPP7.aml
|
||||
- SSDT-USB-ASUS-X670E-GENE-GPP7-NO-BT.aml (disable)
|
||||
- SSDT-USBW.aml
|
||||
- SSDT-AQUANTIA-AQC113C-PCX1.aml (disable)
|
||||
- Path (Add)
|
||||
- | | 0 | Replace DP68 with DP10 in AmdTable | 2 | false | 44503638 | 0 | | 416D645461626C65 | 44503130 | | 0 | 0 | 53534454 |
|
||||
- Booter
|
||||
- MMIO WhiteList
|
||||
- Row 5 Address 36507222016 -> 70866960384
|
||||
- DP (Skip)
|
||||
- Kernel
|
||||
- Add(Remove)
|
||||
- SMCAMDProcessor.kext
|
||||
- NVMeFix.kext
|
||||
- USBPorts-XHC1-XHC2-XHC4.kext
|
||||
- USBPorts-XHC1-XHC2-XHC4-NO-BT.kext
|
||||
- USBWakeFixup.kext
|
||||
- AirportItlwm-Monterey.kext
|
||||
- FeatureUnlock.kext
|
||||
- IntelBluetoothInjector.kext
|
||||
- Force
|
||||
- | com.apple.iokit.IONetworkingFamily | System/Library/Extensions/IONetworkingFamily.kext | | false | Contents/MacOS/IONetworkingFamily | Contents/Info.plist | | 13.99.99 | Any |
|
||||
- Kext 标识符,以便在添加前检查是否存在,例如:`com.apple.iokit.IONetworkingFamily`。只有在缓存中找不到标识符的驱动程序才会被添加。
|
||||
- Path
|
||||
- Enable algrey - _cpuid_set_generic_info - Set microcode=186 - 10.13/10.14/10.15/11.0/12.0/13.0
|
||||
- Disable CaseySJ - Fix PCI bus enumeration on AM5 - 13.0
|
||||
- Remove CaseySJ Row 21~26 com.apple.driver.AppleEthernetAquantiaAqtion
|
||||
- Emulate
|
||||
- Disable DummyPowerManagement
|
||||
- Quirks
|
||||
- Disable CustomSMBIOSGuid
|
||||
- Scheme
|
||||
- KernelArch
|
||||
- x86_64 -> Auto
|
||||
- MISC
|
||||
- Boot
|
||||
- Disable PollAppleHotKeys
|
||||
- Disable HibernateSkipsPicker
|
||||
- PickerAttributes 153 -> 17
|
||||
- PickerVariant blackosx\BsxM1 -> Acidanthera\Syrah
|
||||
- Timeout 6 -> 10
|
||||
- Debug(Skip)
|
||||
- Security
|
||||
- Disable AllowSetDefault
|
||||
- Entries
|
||||
- Add | CustomOS | PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,11-22-33-44-55-66-77-88)/HD(1,GPT,00000000-0000-0000-0000-000000000000,0x800,0x64000)/\EFI\BOOT\BOOTX64.EFI | | false | Not signed for security reasons | false | Auto | false |
|
||||
- Tools(Add)
|
||||
- BootKicker.efi
|
||||
- ChipTune.efi
|
||||
- CleanNvram.efi
|
||||
- ControlMsrE2.efi
|
||||
- CsrUtil.efi
|
||||
- GopStop.efi
|
||||
- KeyTester.efi
|
||||
- MmapDump.efi
|
||||
- OpenControl.efi
|
||||
- ResetSystem.efi
|
||||
- RtcRw.efi
|
||||
- TpmInfo.efi
|
||||
- NVRAM
|
||||
- Add
|
||||
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
|
||||
- revcpuname
|
||||
- revcpu
|
||||
- 7C436110-AB2A-4BBB-A880-FE41995C9F82 (Add)
|
||||
- | #INFO (prev-lang:kbd) | String | en:252 (ABC), set 656e3a323532 |
|
||||
- | ForceDisplayRotationInEFI | Number | 0 |
|
||||
- boot-args keepsyms=1 revpatch=cpuname e1000=0 debug=0x100 agdpmod=pikera -> keepsyms=1 e1000=0 debug=0x100 agdpmod=pikera
|
||||
- Delete
|
||||
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
|
||||
- revcpu
|
||||
- revcpuname
|
||||
- opencore-version
|
||||
- UIScale
|
||||
- 7C436110-AB2A-4BBB-A880-FE41995C9F82 (Remove)
|
||||
- csr-active-config
|
||||
- SystemAudioVolume
|
||||
- SystemAudioVolumeDB
|
||||
- UIScale
|
||||
- LegacySchema
|
||||
- 7C436110-AB2A-4BBB-A880-FE41995C9F82
|
||||
- 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
|
||||
- UEFI
|
||||
- APPLEInput
|
||||
- Enable GraphicsInputMirroring
|
||||
- Audio
|
||||
- AudioDevice
|
||||
- Drivers (Remove)
|
||||
- CrScreenshotDxe.efi
|
||||
- OpenLinuxBoot.efi
|
||||
- ext4_x64.efi
|
||||
- ResetNvramEntry.efi
|
||||
- ToggleSipEntry.efi
|
||||
- ReservedMemory
|
||||
- | 268435456 | HD3000: IGPU memory corruption errata | false | 268435456 | Reserved |
|
||||
- | 569344 | Fix black screen on wake from hibernation for Lenovo Thinkpad T490 | false | 4096 | RuntimeCode |
|
||||
|
Reference in New Issue
Block a user