Skip to content

Replace legacy BlockSkywalk with KextsToBlock array and implement blocking logic#1

Merged
YBronst merged 3 commits intocodexfrom
7ptayn-codex/remove-blockskywalk-and-add-kextstoblock
Feb 5, 2026
Merged

Replace legacy BlockSkywalk with KextsToBlock array and implement blocking logic#1
YBronst merged 3 commits intocodexfrom
7ptayn-codex/remove-blockskywalk-and-add-kextstoblock

Conversation

@YBronst
Copy link
Owner

@YBronst YBronst commented Feb 5, 2026

Motivation

  • Remove the obsolete single-flag BlockSkywalk and provide a flexible KextsToBlock array that can list zero-or-more kexts to block with per-entry MatchOS and Disabled semantics.
  • Allow blocking behavior to be conditional on macOS version(s) and support multiple entries without hardcoding any kext identifiers.

Description

  • Removed BlockSkywalk support and UI field and added a new KextsToBlock plist array example to config-sample.plist with the requested fields (Comment, Disabled, MatchOS, Name).
  • Added KernelAndKextPatches_KextsToBlock_Class to the XML config schema and integrated KextsToBlock into the config parser so entries are validated and accessible via the settings model.
  • Introduced KEXT_TO_BLOCK model with takeValueFrom(...) and a ShouldBlock(const MacOsVersion&) method implementing the Disabled/MatchOS/Name logic and case-insensitive all handling.
  • Replaced the old hardcoded OpenCore Kernel.Block generation for BlockSkywalk with a loop that builds Kernel.Block entries from all KextsToBlock entries that return true from ShouldBlock, preserving safety for absent or empty arrays and avoiding crashes.

Testing

  • No automated tests were executed for this change (per instructions prohibiting build/test runs).

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e803bcc57

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1636 to +1640
size_t blockCount = 0;
for (size_t blockIdx = 0;
blockIdx < KernelAndKextPatches.KextsToBlock.size(); blockIdx++) {
if (KernelAndKextPatches.KextsToBlock[blockIdx].ShouldBlock(macOSVersion)) {
blockCount++;

Choose a reason for hiding this comment

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

P2 Badge Defer KextsToBlock filtering until macOSVersion is known

The new KextsToBlock loop evaluates ShouldBlock(macOSVersion) before the later “Correct OSVersion if it was not found” logic runs, and ShouldBlock returns false when CurrOS is empty. This means any KextsToBlock entries that rely on MatchOS will be silently skipped in cases where macOSVersion is only populated later (e.g., installer boot.efi detection), so the intended kext blocks never make it into OpenCore config. Consider moving the block generation to after OS version correction or passing version constraints through to OpenCore so it can decide at boot time.

Useful? React with 👍 / 👎.

@YBronst YBronst merged commit f42da64 into codex Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant