mastermakrela / kernel-dev

Template for Linux Kernel development on Apple Silicon (aarch64) using VS Code
2 stars 0 forks source link

Kernel Programming Template for macOS + arm64 + VS Code

This repository is a template for developing Linux kernel and/or modules on macOS running on a Mac with Apple Silicon (arm64) using VS Code.

Each part of this equation is optional, but it's what I used in the tutorial for compiling the kernel on macOS.

Setup

This repository assumes you have cloned the kernel source (v6.5.7) into a sibling directory, i.e.:

.
├── kernel-dev
└── linux

Quickstart

  1. Clone this repository git clone https://github.com/mastermakrela/kernel-dev.git

  2. Clone the kernel and compile it

  3. get an image for the VM

  4. run the VM

Recommended extensions

  1. C/C++ from Microsoft

    Corresponding config file: c_cpp_properties.json

  2. Clang-Format

    Corresponding config file: .clang-format It's a symlink to file that will exist after you get the kernel source.

  3. Makefile Tools

  4. checkpatch

    automatically checks your code for kernel style violations