All Projects → droe → example.kext

droe / example.kext

Licence: Unlicense License
Makefile for building macOS kernel extensions

Programming Languages

Makefile
30231 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to example.kext

taskit
A Task Runner in Bash
Stars: ✭ 35 (-46.97%)
Mutual labels:  make
Jsonify
♨️A delightful JSON parsing framework.
Stars: ✭ 42 (-36.36%)
Mutual labels:  macosx
XNU
Research into porting the XNU kernel to ARM devices.
Stars: ✭ 76 (+15.15%)
Mutual labels:  kext
giant-sur
🍏 macOS Big Sur UI clone for the web built with React, Next.js, TypeScript, and Tailwind CSS
Stars: ✭ 73 (+10.61%)
Mutual labels:  macosx
python-makefun
Dynamically create python functions with a proper signature.
Stars: ✭ 62 (-6.06%)
Mutual labels:  make
packages
Cloud Posse DevOps distribution of linux packages for native apps, binaries, alpine packages, debian packages, and redhat packages.
Stars: ✭ 107 (+62.12%)
Mutual labels:  make
osxapp vers
Get product name, exact product version and build version from an Apple Install [Mac OS X|OS X|macOS]*.app or from a mounted Mac OS X Install CD/DVD image
Stars: ✭ 12 (-81.82%)
Mutual labels:  macosx
lets
CLI task runner for developers - a better alternative to make
Stars: ✭ 50 (-24.24%)
Mutual labels:  make
docker-mdns
Simple mDNS/ZeroConf demonstration of a nginx container, acessible at http://nginx.local
Stars: ✭ 25 (-62.12%)
Mutual labels:  make
hosting-handbook
Hosting Handbook
Stars: ✭ 41 (-37.88%)
Mutual labels:  make
MacOSX-FileSystem-Filter
A file system filter for Mac OS X
Stars: ✭ 72 (+9.09%)
Mutual labels:  kext
rktmachine
Menu bar macOS app for running rkt in a macOS hypervisor CoreOS VM.
Stars: ✭ 31 (-53.03%)
Mutual labels:  macosx
mac-notes
macOS notes
Stars: ✭ 92 (+39.39%)
Mutual labels:  kext
PowerShell-FeatureFlags
PowerShell module containing a Feature Flags implementation based on a local config file.
Stars: ✭ 15 (-77.27%)
Mutual labels:  macosx
Sculpt-Comfort-Mission-Control
Switch desktops on your Mac with any mouse
Stars: ✭ 117 (+77.27%)
Mutual labels:  macosx
cloud-player-desktop
Desktop music player built with electron to play youtube, soundcloud and mixcloud tracks
Stars: ✭ 51 (-22.73%)
Mutual labels:  macosx
Mac-OS-Setup-Applications
👾 All I need to setup a new Mac and the applications I use everyday as a Web Developper
Stars: ✭ 96 (+45.45%)
Mutual labels:  macosx
mksqlite
A MATLAB Mex-DLL to access SQLite databases
Stars: ✭ 25 (-62.12%)
Mutual labels:  macosx
mark
mark is an markdown editor app for mac
Stars: ✭ 47 (-28.79%)
Mutual labels:  macosx
hackintosh-list
Hackintosh EFI and Kext, Clover theme, macOS installer image, mac Free App ...
Stars: ✭ 84 (+27.27%)
Mutual labels:  kext

Makefile for building macOS kernel extensions

Authored 2018, Daniel Roethlisberger
https://github.com/droe/example.kext

Overview

Mk/kext.mk is a makefile for building macOS kernel extensions without the opaque Xcode project bloat. This example kernel extension for macOS demonstrates how to use Mk/kext.mk.

Mk/xcode.mk is a makefile for Xcode selection, macOS min version targeting and SDK selection. While it is used by Mk/kext.mk internally, it can also be used standalone in makefiles for userspace code on macOS.

All this is by no means rocket science, but since there exists very little up-to-date documentation on how to build kernel extensions manually, this might provide other inclined kernel hackers with a dislike for GUI based build configuration some relief.

Mk/kext.mk and Mk/xcode.mk were originally written for xnumon, but have been made available in this separate project under a less restrictive license.

Requirements

There are no requirements beyond Xcode.

For building kernel extensions, Apple recommends that you use the latest Xcode version containing the SDK for the oldest macOS release you target. That translates to using latest Xcode 7 for targeting 10.11+, latest Xcode 8 for targeting 10.12+, latest Xcode 9 for targeting 10.13+ and latest Xcode 10 for targeting 10.14+. This is different from the recommendation for userland code, where the recommendation is to use the latest Xcode version available regardless of which macOS release you target. Wikipedia maintains mappings of Xcode and their SDK versions in their Xcode article. Use xcode-select -s to enable a specific Command Line Developer Tools base directory as system-wide default or set SDK to the respective SDK name or path.

Kext Installation

As of OS X 10.10 Yosemite, kernel extensions need to be signed by default. You need to enable kext-dev-mode in order to load unsigned kernel extensions:

  1. Run sudo nvram boot-args=kext-dev-mode=1
  2. Reboot

As of OS X 10.11 El Capitan, kext-dev-mode no longer has any effect. You need to disable the kext protection part of System Integrity Protection (SIP) in order to load unsigned kernel extensions:

  1. Boot into Recovery OS by pressing cmd⌘+r during boot
  2. Run csrutil enable --without kext
  3. Reboot

To create a signed kext that will load in default system configuration with SIP enabled, you will need to obtain a Developer ID certificate specifically for signing kernel extensions.

As of macOS 10.13 High Sierra, all kexts need to be explicitly approved by the user before they can be loaded. Workarounds include disabling user approval or allowing your Team ID to bypass user approval using spctl kext-consent from Recovery OS or NetBoot/NetInstall/NetRestore images, or using Mobile Device Management (MDM). For details, refer to TN2459.

Support

There is no support whatsoever. No communication except in the form of Github pull requests or issues pertaining to bugs or missing features.

Bugs

  • Mk/kext.mk is currently limited to compiling c sources into a generic kext. Adding C++ for IOKit drivers should be easy enough to add (tested pull request appreciated!).
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].