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

Issues on kernel 6.1.21-v7+ #1

Open
starmaid opened this issue Jan 15, 2024 · 1 comment
Open

Issues on kernel 6.1.21-v7+ #1

starmaid opened this issue Jan 15, 2024 · 1 comment

Comments

@starmaid
Copy link

Hello, I am trying to get my v6.2 screen working and am running into a build issue.

System: Raspberry Pi 3B+

Linux keys 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110

Error:

make -C /lib/modules/`uname -r`/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v7+'
  CC [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fbtft-core.o
  CC [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fbtft-sysfs.o
  CC [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fbtft-bus.o
  CC [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fbtft-io.o
  LD [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fbtft.o
  CC [M]  /home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.o
/home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c: In function ‘write_vmem’:
/home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c:92:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   92 |     int i;
      |     ^~~
In file included from /home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c:13:
/home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c: At top level:
/home/keys/FBTFT_KeDei_35_lcd_v62/fbtft.h:315:12: 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/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c:205:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  205 | FBTFT_REGISTER_DRIVER(DRVNAME, "kedei62", &display);
      | ^~~~~~~~~~~~~~~~~~~~~
/home/keys/FBTFT_KeDei_35_lcd_v62/fbtft.h:315:12: note: (near initialization for ‘fbtft_driver_spi_driver.remove’)
  315 |  .remove = fbtft_driver_remove_spi,                                 \
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.c:205:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  205 | FBTFT_REGISTER_DRIVER(DRVNAME, "kedei62", &display);
      | ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:250: /home/keys/FBTFT_KeDei_35_lcd_v62/fb_kedei62.o] Error 1
make[1]: *** [Makefile:2012: /home/keys/FBTFT_KeDei_35_lcd_v62] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v7+'
make: *** [Makefile:54: default] Error 2

I'm seeing if i can get it to ignore that warning, but as of right now the code doesn't compile on the latest software.

@starmaid
Copy link
Author

starmaid commented Jan 15, 2024

I tried editing line 282 of fbtft.h to be:

static void fbtft_driver_remove_spi(struct spi_device *spi)                 \
{                                                                          \
	struct fb_info *info = spi_get_drvdata(spi);                       \
									   \
	return;                       \
}                                                                          \

But ran into another error:

/home/keys/FBTFT_KeDei_35_lcd_v62/fbtft_device.c:1093:11: error: implicit declaration of function ‘spi_busnum_to_master’ [-Werror=implicit-function-declaration]
 1093 |  master = spi_busnum_to_master(spi->bus_num);
      |           ^~~~~~~~~~~~~~~~~~~~

And this has a less-solvable root problem : spi_busnum_to_master was removed from kernel version 6.1.21-v7+

@starmaid starmaid changed the title Initialization of void* from incompatible pointer int* Issues on kernel 6.1.21-v7+ Jan 15, 2024
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

1 participant