Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка при сборке драйвера на ядре 6.6.18 #10

Open
jeecrypt opened this issue Feb 24, 2024 · 3 comments
Open

Comments

@jeecrypt
Copy link

Здравсвуйте! Возникла проблема при сборке ядра, из-за несовместимости типов указателей функций при инициализации структуры в макросе FBTFT_REGISTER_DRIVER

Железо:
Orange Pi+ 2

Система:

uname -a
Linux orangepiplus 6.6.18-current-sunxi #3 SMP Fri Feb 23 08:25:28 UTC 2024 armv7l GNU/Linux

Ход компиляции:

make[1]: Entering directory '/usr/src/linux-headers-6.6.18-current-sunxi'
  CC [M]  /home/pi/fb_st7796s/kernel_module/fb_st7796s.o
In file included from /home/pi/fb_st7796s/kernel_module/fb_st7796s.c:8:
/home/pi/fb_st7796s/kernel_module/fbtft.h:315:19: error: initialization of ‘void (*)(struct spi_device *)’ from incompatible pointer type ‘int (*)(struct spi_device *)’ [-Werror=incompatible-pointer-types]
  315 |         .remove = fbtft_driver_remove_spi,                                 \
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
/home/pi/fb_st7796s/kernel_module/fb_st7796s.c:196:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  196 | FBTFT_REGISTER_DRIVER(DRVNAME, "sitronix,st7796s", &display);
      | ^~~~~~~~~~~~~~~~~~~~~
/home/pi/fb_st7796s/kernel_module/fbtft.h:315:19: note: (near initialization for ‘fbtft_driver_spi_driver.remove’)
  315 |         .remove = fbtft_driver_remove_spi,                                 \
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
/home/pi/fb_st7796s/kernel_module/fb_st7796s.c:196:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  196 | FBTFT_REGISTER_DRIVER(DRVNAME, "sitronix,st7796s", &display);
      | ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /home/pi/fb_st7796s/kernel_module/fb_st7796s.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.18-current-sunxi/Makefile:1915: /home/pi/fb_st7796s/kernel_module] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.18-current-sunxi'
make: *** [Makefile:8: default] Error 2

Заранее огромное спасибо!

@Sergey1560
Copy link
Owner

Посмотрите вот тут https://github.com/evgs/fb_st7796s/tree/master там уже есть исправления под 6.* ядро + ещё какие-то правки.

@jeecrypt
Copy link
Author

jeecrypt commented Mar 2, 2024

К сохалению Unknown kernel architecture
Для ядра 6.6.18

@jeecrypt
Copy link
Author

jeecrypt commented Mar 2, 2024

Проблема была в архитектуре
Помогла правка скрипта устрановки

#armbian, https://www.armbian.com/orangepi3-lts/
- echo "$UN" | grep sunxi64 && LHEADERS=linux-headers-current-sunxi64
- echo "$UN" | grep sunxi64 && OVL=armbian-add-overlay

+ echo "$UN" | grep sunxi && LHEADERS=linux-headers-current-sunxi
+ echo "$UN" | grep sunxi && OVL=armbian-add-overlay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants