Skip to content

Conversation

@startergo
Copy link
Contributor

🚀 Enhanced Innie - Complete Build System Overhaul

What This PR Does

Transforms Enhanced Innie into a complete, self-contained build environment that works perfectly on fresh systems without any manual setup.

🔧 Key Features Added

  • Automatic MacKernelSDK Initialization: Both build systems detect missing submodules and initialize them automatically
  • Dual Build Systems: Enhanced build.sh script + professional Makefile with dependency management
  • Fresh System Compatibility: Works on any fresh git clone without manual intervention
  • Comprehensive Error Handling: Clear error messages and recovery guidance
  • Professional Build Infrastructure: Complete signing, packaging, and installation scripts

🛠️ Technical Implementation

  • build.sh: 372 lines with automatic git submodule update --init --recursive
  • Makefile: 127 lines with init-submodule target and dependency chains
  • MacKernelSDK: Properly configured as git submodule with automated initialization
  • Complete Build Environment: Self-contained system requiring no manual setup

✅ Testing Results

  • ✅ Automatic submodule initialization on simulated fresh systems
  • ✅ Both build systems work flawlessly: ./build.sh and make build
  • ✅ Enhanced Innie kernel extension builds successfully with comprehensive RAID support
  • ✅ Professional error handling with clear user guidance

🎯 Problem Solved

This completely addresses the original goal: "how to make raid device appear as internal on hackintosh" with a professional, zero-setup build system.

📋 Fresh System Workflow

# Clone and build - that's it!
git clone https://github.com/startergo/Innie.git
cd Innie
./build.sh          # Everything works automatically

- Fixed early exit bug: removed break statement to process ALL storage devices
- Enhanced property override: force update existing properties instead of conditional checks
- Added timeout handling: prevent infinite loops during device configuration
- Multiple update passes: 3-pass property updates to catch late-loading drivers
- RAID controller support: added class code 0x010400 for RAID devices
- Robust built-in property: use proper OSData format instead of raw bytes
- Force Physical Interconnect Location: always set to Internal regardless of existing value
- Create missing properties: generate Protocol Characteristics if not present
- Comprehensive logging: detailed debug output for better troubleshooting
- Property coverage: set built-in at both device and driver levels

These enhancements address inconsistency issues where some storage devices
would randomly appear as external instead of internal, particularly for
complex PCIe storage configurations like RAID controllers.
- Enhanced build.sh with automatic submodule detection and initialization
- Added init-submodule target to Makefile with dependency management
- Improved fresh system compatibility - no manual setup required
- Both build systems now automatically handle MacKernelSDK dependencies
- Added comprehensive error handling and user guidance

Features:
- Dual build systems: ./build.sh and make build
- Automatic git submodule update --init --recursive
- Enhanced environment checking and validation
- Complete self-contained build environment
- Ready for comprehensive RAID device internal designation
Copilot AI review requested due to automatic review settings August 21, 2025 02:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR transforms Enhanced Innie into a complete, self-contained build environment with automatic MacKernelSDK submodule initialization, enabling it to work perfectly on fresh systems without manual setup.

  • Adds automatic MacKernelSDK submodule initialization in both build systems
  • Implements dual build systems: enhanced build.sh script and professional Makefile
  • Includes comprehensive signing, packaging, and installation infrastructure

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
build.sh 372-line build script with automatic submodule initialization and complete build pipeline
Makefile 127-line alternative build system with dependency management and submodule auto-init
MacKernelSDK Git submodule added for kernel development SDK
.gitmodules Git submodule configuration for MacKernelSDK
Innie.cpp Enhanced RAID controller support with timeout handling and multiple update passes
Innie.hpp Added RAID device class code constant
README.md Complete documentation overhaul with build instructions and feature descriptions
sign_kext.sh Professional code signing script with certificate management
install_innie*.sh Installation scripts with signed and unsigned variants
Innie.entitlements Kernel extension entitlements for code signing
Code-Signing-Guide.md Comprehensive guide for Apple Developer certificate setup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Fixed installation script paths in build.sh (corrected '../' to current directory)
- Improved timeout comments in Innie.cpp for better code clarity:
  * Bridge config timeout: 10 seconds (1000 iterations of 10ms each)
  * Device resource timeout: 20 seconds (2000 iterations of 10ms each)

Code Quality Improvements:
- More descriptive timeout documentation for maintainability
- Consistent path handling across build systems
- Better code readability for future developers

These changes improve the Enhanced Innie build system reliability and
code documentation quality for comprehensive RAID device internalization.
- Fixed build.sh argument parsing to properly handle DEBUG/RELEASE configurations
- Modified parse_arguments() function to return both command and config via pipe-separated string
- Corrected variable scoping issues that prevented BUILD_CONFIG from propagating to xcodebuild
- Enhanced Makefile with debug-build target that sets DEBUG=1 preprocessor macro
- Both build systems now properly enable DBGLOG statements in debug builds
- Added comprehensive documentation for DEBUG functionality
- Verified both './build.sh DEBUG' and 'make debug-build' work correctly

Fixes:
- BUILD_CONFIG variable not being set from command line arguments
- DEBUG preprocessor definition not being passed to compiler
- Inconsistent debug build behavior between Makefile and build script

Features:
- Case-insensitive DEBUG/debug argument support
- Flexible argument order (DEBUG build-only or build-only DEBUG)
- Debug archive naming with -DEBUG suffix
- Runtime status indicating debug vs release configuration
- Comprehensive help documentation with examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant