I'm trying to build a kernel module on RPI4, I installed kernel headers with
sudo apt-get install raspberrypi-kernel-headers
the Makefile is the following:
obj-m += soft_uart.o
soft_uart-objs := module.o raspberry_soft_uart.o queue.o
RELEASE = $(shell uname -r)
LINUX = /home/m3s/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70
all:
$(MAKE) -C $(LINUX) M=$(PWD) modules
clean:
$(MAKE) -C $(LINUX) M=$(PWD) clean
install:
sudo install -m 644 -c soft_uart.ko /lib/modules/$(RELEASE)
simply compiling with make in the directory this is the error:
make -C /home/m3s/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70 M=/home/m3s/application/soft_uart modules
make[1]: Entering directory '/home/m3s/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70'
CC [M] /home/m3s/application/soft_uart/module.o
CC [M] /home/m3s/application/soft_uart/raspberry_soft_uart.o
CC [M] /home/m3s/application/soft_uart/queue.o
LD [M] /home/m3s/application/soft_uart/soft_uart.o
Building modules, stage 2.
MODPOST 1 modules
ERROR: "__sanitizer_cov_trace_cmp4" [/home/m3s/application/soft_uart/soft_uart.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp1" [/home/m3s/application/soft_uart/soft_uart.ko] undefined!
ERROR: "__sanitizer_cov_trace_pc" [/home/m3s/application/soft_uart/soft_uart.ko] undefined!
ERROR: "__sanitizer_cov_trace_const_cmp4" [/home/m3s/application/soft_uart/soft_uart.ko] undefined!
ERROR: "__sanitizer_cov_trace_switch" [/home/m3s/application/soft_uart/soft_uart.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[1]: *** [Makefile:1622: modules] Error 2
make[1]: Leaving directory '/home/m3s/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70'
make: *** [Makefile:10: all] Error 2
the module soft_uart.ko is not created but there aren't other errors. Any idea where's the problem with module creation?