Skip to content

Commit d84213c

Browse files
committed
Add OpenCore ISA switch for 32-bit OSes
Allows for explicitly setting the target ISA when emulating 32-bit CPU instructions on a 64-bit host. Partially addresses #32.
1 parent 08fc280 commit d84213c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

scripts/build.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,16 @@ function HasFlag {
2929
# Switches for additional '--legacy' and '--32-bit' patches
3030
$patches = @('-p config.yml')
3131
if (HasFlag '--legacy') { $patches += @('-p patch.legacy.yml') }
32-
if (HasFlag '--32-bit') { $patches += @('-p patch.32-bit.yml') }
32+
if (HasFlag '--32-bit') {
33+
$patches += @('-p patch.32-bit.yml')
34+
# Ensure the target architecture is set to IA32
35+
(Get-Content "$pwd\src\build.yml") -replace 'target: X64', 'target: IA32' |
36+
Set-Content "$pwd\src\build.yml"
37+
} else {
38+
# Ensure the target architecture is set to X64
39+
(Get-Content "$pwd\src\build.yml") -replace 'target: IA32', 'target: X64' |
40+
Set-Content "$pwd\src\build.yml"
41+
}
3342

3443
icm `
3544
-ScriptBlock $([Scriptblock]::Create($(iwr 'https://raw.githubusercontent.com/Qonfused/OCE-Build/main/ci/bootstrap.ps1'))) `

src/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
version: latest
33
build: DEBUG
4+
target: X64
45
---
56
ACPI:
67
SSDT-HV-DEV-WS2022: "ACPI/SSDT-HV-DEV-WS2022.dsl"

0 commit comments

Comments
 (0)