#linux-kernel #kernel-module #kernel #linux #mainlining

app downstream_dependency_map

一个列出下游内核各个模块及其包含和依赖项的工具

1 个不稳定版本

0.1.0 2024年7月23日

#273可视化

Download history 112/week @ 2024-07-19 16/week @ 2024-07-26 1/week @ 2024-08-02

每月 129 次下载

无许可

31KB
552

下游依赖映射

分析下游内核模块及其依赖项

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

如何使其工作

  1. 使用 Clang 编译您的下游内核,从构建中生成 "compile_commands.json",我建议使用
bear -- [./build_script.sh]
  1. 下载与此版本完全相同的主线内核
  2. 使用此工具生成依赖和包含树

依赖项

~0.5–1MB
~21K SLoC