From 4592135696009bd89d2ed50a29cbcc82bcc6efae Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 11 Dec 2021 22:42:03 +0800 Subject: add comments --- xmake/rules/platform/linux/driver/driver_modules.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xmake/rules/platform/linux/driver/driver_modules.lua') 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 -- cgit v1.3.1