Trouble integrating tty0tty in custom linux kernel
redeexpressos opened this issue · 4 comments
redeexpressos commented
Hi. Im trying to integrate this software into a custom linux image built with yocto for tegra devices. I am using meta-tegra kirkstone, however, I'm getting these errors:
ERROR: tty0tty-module-1.4+gitAUTOINC+355b051e95-r0 do_compile: oe_runmake failed
ERROR: tty0tty-module-1.4+gitAUTOINC+355b051e95-r0 do_compile: ExecutionError('/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/temp/run.do_compile.2972656', 1, None, None)
ERROR: Logfile of failure stored in: /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/temp/log.do_compile.2972656
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 10 KERNEL_SRC=/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source KERNEL_PATH=/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source KERNEL_VERSION=5.10.192-l4t-35.5.0+gdb857ecdbe10 CC=aarch64-poky-linux-gcc -fuse-ld=bfd -fmacro-prefix-map=/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0=/usr/src/debug/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0 -fdebug-prefix-map=/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0=/usr/src/debug/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0 -fdebug-prefix-map=/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/recipe-sysroot= -fdebug-prefix-map=/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source=/usr/src/kernel -fdebug-prefix-map=/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-build-artifacts=/usr/src/kernel LD=aarch64-poky-linux-ld.bfd AR=aarch64-poky-linux-ar O=/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-build-artifacts KBUILD_EXTRA_SYMBOLS=
| make -C /home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source M=/home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module modules
| make[1]: Entering directory '/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source'
| make[2]: Entering directory '/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-build-artifacts'
| CC [M] /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module/tty0tty.o
| /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module/tty0tty.c: In function 'tty0tty_ioctl_tcsets':
| /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module/tty0tty.c:737:22: error: implicit declaration of function 'tty_check_change' [-Werror=implicit-function-declaration]
| 737 | int retval = tty_check_change(tty);
| | ^~~~~~~~~~~~~~~~
| /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module/tty0tty.c:762:32: error: implicit declaration of function 'tty_termios_input_baud_rate'; did you mean 'tty_termios_encode_baud_rate'? [-Werror=implicit-function-declaration]
| 762 | tmp_termios.c_ispeed = tty_termios_input_baud_rate(&tmp_termios);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| | tty_termios_encode_baud_rate
| cc1: some warnings being treated as errors
| make[3]: *** [/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source/scripts/Makefile.build:287: /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module/tty0tty.o] Error 1
| make[2]: *** [/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source/Makefile:1854: /home/ubuntu/user/builder/build/tmp/work/p3768_0000_p3767_0001-poky-linux/tty0tty-module/1.4+gitAUTOINC+355b051e95-r0/git/module] Error 2
| make[2]: Leaving directory '/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-build-artifacts'
| make[1]: *** [Makefile:210: __sub-make] Error 2
| make[1]: Leaving directory '/home/ubuntu/user/builder/build/tmp/work-shared/p3768-0000-p3767-0001/kernel-source'
| make: *** [Makefile:30: all] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command
```
Is this a kernel issue?
lcgamboa commented
What exact version of the kernel are you using? This line below solves this problem for kernels with versions greater than or equal to 5.13.0.
Lines 73 to 77 in bca8008
Maybe moving the declaration outside of define will solve the problem.
redeexpressos commented
The kernel version is 5.10...: https://github.com/OE4T/linux-tegra-5.10
lcgamboa commented
Try to edit the version of line 74 to KERNEL_VERSION(5, 10, 0) instead KERNEL_VERSION(5, 13, 0) before compilation.
Line 74 in bca8008
redeexpressos commented
Thanks, that fixed it.