Skip to content

Instantly share code, notes, and snippets.

@royratcliffe
Last active June 3, 2025 12:32
Show Gist options
  • Save royratcliffe/9973dbe09be8fc5179a5d5c7f7ec86b3 to your computer and use it in GitHub Desktop.
Save royratcliffe/9973dbe09be8fc5179a5d5c7f7ec86b3 to your computer and use it in GitHub Desktop.
kbuild
{
"configurations": [
{
"name": "Linux ARM64",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-arm64"
},
{
"name": "Raspberry Pi Kernel",
"includePath": [
"${workspaceFolder}/*",
"/usr/src/linux-headers-6.12.25+rpt-rpi-2712/include",
"/usr/src/linux-headers-6.12.25+rpt-rpi-2712/include/generated",
"/usr/src/linux-headers-6.12.25+rpt-rpi-2712/arch/arm64/include/generated",
"/usr/src/linux-headers-6.12.25+rpt-common-rpi/include",
"/usr/src/linux-headers-6.12.25+rpt-common-rpi/arch/arm64/include"
],
"defines": [
"__KERNEL__",
"MODULE"
],
"forcedInclude": [
"/usr/src/linux-headers-6.12.25+rpt-rpi-2712/include/generated/autoconf.h"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "gnu++11",
"intelliSenseMode": "linux-gcc-arm64"
}
],
"version": 4
}

‎‎​

obj-m += foo.o
KDIR ?= /lib/modules/`uname -r`/build
default:
$(MAKE) -C $(KDIR) M=$$PWD
{
"files.associations": {
"*.h": "c"
},
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: LLVM, IndentWidth: 2, TabWidth: 2 }"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment