diff options
| author | ruki <[email protected]> | 2021-12-11 22:42:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-12-11 22:42:03 +0800 |
| commit | 4592135696009bd89d2ed50a29cbcc82bcc6efae (patch) | |
| tree | 6031490cc621585a6c35ee12804fb7f4254f5947 | |
| parent | 18455773a1e0fa2377e6a05cf99c735066a8390c (diff) | |
add comments
| -rw-r--r-- | xmake/rules/platform/linux/driver/driver_modules.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua index 60fb14a22..710a6464f 100644 --- a/xmake/rules/platform/linux/driver/driver_modules.lua +++ b/xmake/rules/platform/linux/driver/driver_modules.lua @@ -121,6 +121,7 @@ module_exit(hello_exit); ]]) local argv = {"-C", sdkdir, "V=1", "M=" .. tmpdir, "modules"} if target:is_plat("cross") then + -- e.g. $(MAKE) -C $(KERN_DIR) V=1 ARCH=arm64 CROSS_COMPILE=/mnt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- M=$(PWD) modules local arch if target:is_arch("arm", "armv7") then arch = "arm" @@ -154,9 +155,11 @@ module_exit(hello_exit); if ldflag:startswith("--build-id=") or ldflag:startswith("-T ") then break end + -- e.g. aarch64-linux-gnu-ld -r -EL -maarch64elf --build-id=sha1 -T scripts/module.lds -o hello.ko hello.o hello.mod.o ldflags_ko = ldflags_ko or {} table.insert(ldflags_ko, ldflag) else + -- e.g. aarch64-linux-gnu-ld -EL -maarch64elf -r -o hello.o xxx.o ldflags_o = ldflags_o or {} table.insert(ldflags_o, ldflag) end |
