1 unstable release
0.1.0 | Jul 23, 2024 |
---|
#290 in Visualization
31KB
552 lines
Downstream Dependency Map
Analyze downstream kernel's modules and their dependencies
Usage: downstream_dependency_map [downstream_compile_commands.json] [downstream kernel directory] [relative build directory name (must be in the high source tree)] [mainline kernel directory] [option] ...
Example: downstream_dependency_map downstream_kernel/build/compile_commands.json downstream_kernel/ build/ mainline_kernel/ -pd
Options:
--path-absolute, -a : Use absolute path to the source directory
--print-dependencies, -pd : Print dependencies tree
--print-includes, -pi : Print includes
--dependencies-json, -dj [output.json] : Export dependencies tree to a .json file
--dependencies-dot, -dd [output.dot] : Export dependencies tree to a .dot file
--includes-json, -ij [output.json] : Export includes to a .json file
--includes-dot, -id [output.dot] : Export includes to a .dot file
How to make it work:
- Compile your downstream kernel with Clang, generate "compile_commands.json" from the build, I recommend using
bear -- [./build_script.sh]
- Download the mainline kernel of the exact same version
- Use the utility to generate the dependencies and includes trees
Dependencies
~0.5–1MB
~21K SLoC