Skip to content

Instantly share code, notes, and snippets.

View pmj's full-sized avatar

Phil Dennis-Jordan pmj

View GitHub Profile
@steven-michaud
steven-michaud / ThirdPartyKexts.md
Last active July 17, 2024 21:06
Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to

@antoniofrighetto
antoniofrighetto / build-xnu.sh
Last active August 6, 2020 12:59
Script to build any XNU kernel version.
# !/bin/bash
# 2k20 ~antoniofrighetto
# Build any XNU kernel version. Make sure you have the related MacOSX SDK version installed
#
# macOS 10.15.4 kernel compilation successfully tested on macOS 10.15.6 and Xcode 11.6
#
# MACOS_VERSION=10.15.4 BACKUP_SDK=1 OPTIONS=RELEASE,DEVELOPMENT ./build-xnu.sh
# XNU_VERSION=xnu-4570.41.2 ./build-xnu.sh
set_macos_version() {
@klutzy
klutzy / Makefile
Last active April 6, 2016 13:41
Rust/C++ ffi
all: a
a: a.rs libda.so
rustc a.rs -o $@ -L .
libda.so: da.cpp
clang++ $< -fPIC -shared -o $@
run: a libda.so
LD_LIBRARY_PATH=. ./a
@klutzy
klutzy / main.rs
Last active December 23, 2015 12:19
for extern "C++"
extern mod syntax;
extern mod rustc;
pub use syntax::ast;
pub use rustc::middle::ty;
pub use rustc::middle::ty::t;
fn cpp_arg_mangle(arg: t) -> ~str {
let arg = ty::get(arg);
match arg.sty {