Skip to content

Commit

Permalink
Add OpenCore ISA switch for 32-bit OSes
Browse files Browse the repository at this point in the history
Allows for explicitly setting the target ISA when emulating 32-bit CPU instructions on a 64-bit host.

Partially addresses #32.
  • Loading branch information
Qonfused committed Dec 9, 2024
1 parent 08fc280 commit d84213c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ function HasFlag {
# Switches for additional '--legacy' and '--32-bit' patches
$patches = @('-p config.yml')
if (HasFlag '--legacy') { $patches += @('-p patch.legacy.yml') }
if (HasFlag '--32-bit') { $patches += @('-p patch.32-bit.yml') }
if (HasFlag '--32-bit') {
$patches += @('-p patch.32-bit.yml')
# Ensure the target architecture is set to IA32
(Get-Content "$pwd\src\build.yml") -replace 'target: X64', 'target: IA32' |
Set-Content "$pwd\src\build.yml"
} else {
# Ensure the target architecture is set to X64
(Get-Content "$pwd\src\build.yml") -replace 'target: IA32', 'target: X64' |
Set-Content "$pwd\src\build.yml"
}

icm `
-ScriptBlock $([Scriptblock]::Create($(iwr 'https://raw.githubusercontent.com/Qonfused/OCE-Build/main/ci/bootstrap.ps1'))) `
Expand Down
1 change: 1 addition & 0 deletions src/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
version: latest
build: DEBUG
target: X64
---
ACPI:
SSDT-HV-DEV-WS2022: "ACPI/SSDT-HV-DEV-WS2022.dsl"
Expand Down

0 comments on commit d84213c

Please sign in to comment.