This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11obj-m := helloworld.o
2- helloworld-objs := target/x86_64-linux-kernel-module/debug/libhello_world.a
3- EXTRA_LDFLAGS += --entry=init_module
2+ helloworld-objs := hello_world.rust.o
43KDIR ?= /lib/modules/$(shell uname -r) /build
54
5+ % .rust.o : target/x86_64-linux-kernel-module/debug/lib% .a
6+ $(LD ) -r -o $@ --whole-archive $<
7+
68all :
79 $(MAKE ) -C $(KDIR ) M=$(CURDIR )
810
Original file line number Diff line number Diff line change 11obj-m := testmodule.o
2- testmodule-objs := $(TEST_LIBRARY )
3- EXTRA_LDFLAGS += --entry=init_module
2+ testmodule-objs := $(TEST_NAME ) .rust.o
43KDIR ?= /lib/modules/$(shell uname -r) /build
54
5+ % .rust.o : target/x86_64-linux-kernel-module/debug/lib% .a
6+ $(LD ) -r -o $@ --whole-archive $<
7+
68all :
79 $(MAKE ) -C $(KDIR ) M=$(CURDIR )
810
Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ def main():
4545
4646 run (
4747 "make" , "-C" , BASE_DIR ,
48- "TEST_LIBRARY=target/x86_64-linux-kernel-module/debug/lib{}_tests.a" .format (
49- path .replace ("-" , "_" )
50- ),
48+ "TEST_NAME={}_tests" .format (path .replace ("-" , "_" )),
5149 )
5250 # TODO: qemu
5351 run (
You can’t perform that action at this time.
0 commit comments