habemus-papadum / kernel-grok

grok the kernel via a cmake shim
181 stars 32 forks source link

kernel-grok

grok the linux kernel via a cmake shim

I'm sure there are great ways to spelunk the kernel with an ide... This is my attempt to rig something together using a simple ruby script and a roll of duct tape.

Nutshell:

Possible steps

(Note: not fully tested. Requires some prior knowledge to work around typos etc)

OR

Note that we intercept the build

Either

bear make -j 12 ## create compile_commands.json

Or

~/.local/bin/intercept-build make -j 12 ## create compile_commands.json

cd ..


* Use our ruby script 
``` bash 
git clone https://github.com/habemus-papadum/kernel-grok.git

cd linux-stable
../kernel-grok/generate_cmake  ## creates CMakeLists.txt

## test that generated cmake is valid
mkdir build
cd build
cmake .. && make -j12

Theory of operation