Open HyeokThing opened 1 year ago
hi, It gave a compilation error as below, I think it's a kernel incompatibility.
~/soft_uart $ make
make -C /usr/src/linux-headers-6.1.21-v8+ M=/home/v2x/soft_uart modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v8+'
CC [M] /home/v2x/soft_uart/module.o
/home/v2x/soft_uart/module.c:52:22: error: initialization of ‘void ()(struct tty_struct , const struct ktermios )’ from incompatible pointer type ‘void ()(struct tty_struct , struct ktermios )’ [-Werror=incompatible-pointer-types]
52 | .set_termios = soft_uart_set_termios,
| ^~~~~
/home/v2x/soft_uart/module.c:52:22: note: (near initialization for ‘soft_uart_operations.set_termios’)
cc1: some warnings being treated as errors
make[2]: [scripts/Makefile.build:250: /home/v2x/soft_uart/module.o] Error 1
make[1]: [Makefile:2012: /home/v2x/soft_uart] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
make: *** [Makefile:9: all] Error 2
$(shell uname -r) = 5.10.103-v7+, This is raspberry pi Zero 2W.
command -> sudo make console text -> make -C /usr/src/linux-headers-5.10.103-v7+ M= modules make[1]: Enter directory '/usr/src/linux-headers-5.10.103-v7+' make[2]: No rule to create required target 'arch/arm/tools/syscall.tbl' in 'arch/arm/include/generated/uapi/asm/unistd-common.h'. stoppage. make[1]: [arch/arm/Makefile:307: archheaders] error 2 make[1]: Exit directory '/usr/src/linux-headers-5.10.103-v7+' make: *** [Makefile:9: all] error 2
command -> sudo make clean console text -> make -C /usr/src/linux-headers-5.10.103-v7+ M= clean make[1]: Enter directory '/usr/src/linux-headers-5.10.103-v7+' arch/arm/Makefile:57: The recursive 'KBUILD_CFLAGS' variable is (eventually) referencing itself. stoppage. make[1]: [Makefile:1832: _clean_arch/arm] error 2 make[1]: Exit directory '/usr/src/linux-headers-5.10.103-v7+'
Looking at other issues, it seems that the kernel version is 4.x. Should I lower my kernel version?
Please fix the error,,