diff options
| author | ruki <[email protected]> | 2021-12-29 22:30:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-12-29 22:30:38 +0800 |
| commit | 70e03f735c6f27e5e0d97c2c0bbeb03d239a6574 (patch) | |
| tree | 150506d5d79abad272ee56a7bda293244317e62b /xmake/rules/platform/linux/driver | |
| parent | e1ef31c2ab61b06a31adac981cfd67c873b33829 (diff) | |
improve toolchain and linux driver
Diffstat (limited to 'xmake/rules/platform/linux/driver')
| -rw-r--r-- | xmake/rules/platform/linux/driver/driver_modules.lua | 3 | ||||
| -rw-r--r-- | xmake/rules/platform/linux/driver/xmake.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua index 121f391ba..b9c48e163 100644 --- a/xmake/rules/platform/linux/driver/driver_modules.lua +++ b/xmake/rules/platform/linux/driver/driver_modules.lua @@ -192,6 +192,9 @@ function load(target) -- we need only need binary kind, because we will rewrite on_link target:set("kind", "binary") target:set("extension", ".ko") +end + +function config(target) -- get and save linux-headers sdk local linux_headers = _get_linux_headers_sdk(target) diff --git a/xmake/rules/platform/linux/driver/xmake.lua b/xmake/rules/platform/linux/driver/xmake.lua index 78ba6d089..8192b9a7f 100644 --- a/xmake/rules/platform/linux/driver/xmake.lua +++ b/xmake/rules/platform/linux/driver/xmake.lua @@ -24,6 +24,9 @@ rule("platform.linux.driver") on_load(function (target) import("driver_modules").load(target) end) + on_config(function (target) + import("driver_modules").config(target) + end) on_link(function (target, opt) import("driver_modules").link(target, opt) end) |
