diff options
| author | ruki <[email protected]> | 2022-01-02 10:32:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-01-02 10:32:22 +0800 |
| commit | 57c342168e37e909741012bb03adfb18f91a10d5 (patch) | |
| tree | f484a99b943d1ad6025f33fd7d4c52c9e31b1254 /xmake/rules/platform/linux/driver | |
| parent | 6332548fd3948b25a5287b244d7f93471684bf40 (diff) | |
fix linux driver for kernel 4.x
Diffstat (limited to 'xmake/rules/platform/linux/driver')
| -rw-r--r-- | xmake/rules/platform/linux/driver/driver_modules.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua index a8e4636aa..8d46c8c55 100644 --- a/xmake/rules/platform/linux/driver/driver_modules.lua +++ b/xmake/rules/platform/linux/driver/driver_modules.lua @@ -99,8 +99,11 @@ function _get_cflags_from_make(target, sdkdir) local make = assert(find_tool("make"), "make not found!") local tmpdir = os.tmpfile() .. ".dir" local makefile = path.join(tmpdir, "Makefile") - local stubfile = path.join(tmpdir, "stub.c") - io.writefile(makefile, "obj-m := stub.o") + local stubfile = path.join(tmpdir, "src/stub.c") + local foofile = path.join(tmpdir, "src/foo.c") + io.writefile(makefile, [[obj-m := stub.o +stub-objs := src/stub.o src/foo.o]]) + io.writefile(foofile, "") io.writefile(stubfile, [[ #include <linux/init.h> #include <linux/module.h> |
