Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement legacy OS booting support #482

Merged
merged 56 commits into from
Sep 8, 2023
Merged

Implement legacy OS booting support #482

merged 56 commits into from
Sep 8, 2023

Conversation

Goldfish64
Copy link
Member

@Goldfish64 Goldfish64 commented Aug 6, 2023

Adds support for booting of legacy OSes such as older versions of Windows or situations where legacy Windows must be used for proper functionality of hardware. Scope includes both Macs (via legacy interface) and OpenDuet on PC systems.

Closes acidanthera/bugtracker#912.

Mac

  • Apple legacy loader interface
  • Legacy CD-ROM booting
  • Get default entry for legacy entries
  • Set default entry for legacy entries
  • Set desired partition as active to support multiple legacy OSes on a single disk

PC

  • Legacy loader interface on OpenDuet and firmwares with CSM
  • Make USB be in usable state for real mode (transition ownership back to BIOS) Use BlockIo build of DUET
  • Get default entry for legacy entries (translate Apple legacy interface path set by macOS)
  • Set default entry for legacy entries

PC and Mac

  • Move legacy interfaces to separate driver
  • Configuration to exclude legacy devices from boot
  • .contentDetails support if appropriate filesystem drivers are available (NTFS, etc)

@joevt
Copy link

joevt commented Aug 7, 2023

Set desired partition as active to support multiple legacy OSes on a single disk from within OpenCore on Macs

This feature exists in rEFInd. I'm glad to see it coming to OpenCore. It involves writing to the MBR to change the active partition. This assumes the boot code in the MBR supports the MBR partition table semantics but I don't know of a case where an MBR wouldn't have a partition table.

@Goldfish64 Goldfish64 marked this pull request as ready for review August 27, 2023 01:07
@@ -714,12 +714,25 @@ InternalAddBootEntryFromCustomEntry (
DEBUG_INFO,
"OCB: Adding custom entry %s (%a|B:%d) -> %a\n",
BootEntry->Name,
CustomEntry->SystemAction != NULL ? "action" : (CustomEntry->Tool ? "tool" : "os"),
CustomEntry->ExternalSystemAction != NULL ? "ext-action" : (CustomEntry->SystemAction != NULL ? "action" : (CustomEntry->Tool ? "tool" : "os")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need icon update in OcBinaryData?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flavor still needs to be set like for SystemAction, currently OC_FLAVOUR_WINDOWS is used for all entries at the moment. Shouldn't need any icon updates.

@vit9696
Copy link
Contributor

vit9696 commented Sep 3, 2023

This looks architecturally right to me. Let's get it merged in the September release, cc @mhaeuser

@vit9696
Copy link
Contributor

vit9696 commented Sep 7, 2023

In my opinion, this is ready. @Goldfish64, can you merge it please?

@Goldfish64 Goldfish64 merged commit bb44e89 into master Sep 8, 2023
22 checks passed
@startergo
Copy link
Contributor

I have just tested it. The Windows (Legacy) logo appears in the bootlicker, but it can't boot. It boots fine through the Apple BootPicker menu.
opencore-2023-09-08-191415.txt.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add MBR loading tool to OpenCore
4 participants