Seeed-Studio / seeed-linux-usbdisp

USB monitor Linux kernel driver.
GNU General Public License v2.0
8 stars 1 forks source link

error: ‘FBINFO_DEFAULT’ undeclared (first use in this function) #15

Open mirkokral opened 7 months ago

mirkokral commented 7 months ago

Hello! During compilation i get the error "error: ‘FBINFO_DEFAULT’ undeclared (first use in this function)"

Log:

make -C /lib/modules/`uname -r`/build KCPPFLAGS="-I/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src -I/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/../common" M=/home/mirko/seeed-linux-usbdisp/drivers/linux-driver modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.20+rpt-rpi-v8'
  CC [M]  /home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.o
In file included from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/asm-generic/bug.h:22,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/bug.h:26,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/bug.h:5,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/cpufeature.h:23,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/hwcap.h:9,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/arch_timer.h:12,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/timex.h:8,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/timex.h:67,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/time32.h:13,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/time.h:60,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/arch/arm64/include/asm/stat.h:12,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/stat.h:6,
                 from /usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/module.h:13,
                 from /home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:19,
                 from /home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.c:14:
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.c: In function ‘_bitblt_encoder_init’:
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/kern_levels.h:5:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/printk.h:427:25: note: in definition of macro ‘printk_index_wrap’
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:115:28: note: in expansion of macro ‘printk’
  115 | #define err(format,arg...) printk(KERN_ERR format, ## arg)
      |                            ^~~~~~
/usr/src/linux-headers-6.6.20+rpt-common-rpi/include/linux/kern_levels.h:11:25: note: in expansion of macro ‘KERN_SOH’
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/inc/common.h:115:35: note: in expansion of macro ‘KERN_ERR’
  115 | #define err(format,arg...) printk(KERN_ERR format, ## arg)
      |                                   ^~~~~~~~
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.c:437:9: note: in expansion of macro ‘err’
  437 |         err("required_tickets_count (%d)>RPUSBDISP_MAX_TRANSFER_TICKETS_COUNT(%d)\n", required_tickets_count, RPUSBDISP_MAX_TRANSFER_TICKETS_COUNT);
      |         ^~~
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.c: At top level:
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/usbhandlers.c:773:13: warning: ‘_on_release_disp_tickets_pool’ defined but not used [-Wunused-function]
  773 | static void _on_release_disp_tickets_pool(struct rpusbdisp_dev * dev)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.o
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c: In function ‘_on_create_new_fb’:
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:379:23: error: ‘FBINFO_DEFAULT’ undeclared (first use in this function)
  379 |     fb->flags       = FBINFO_DEFAULT | FBINFO_VIRTFB;
      |                       ^~~~~~~~~~~~~~
/home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.c:379:23: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248: /home/mirko/seeed-linux-usbdisp/drivers/linux-driver/src/fbhandlers.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:1938: /home/mirko/seeed-linux-usbdisp/drivers/linux-driver] Error 2
make[1]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:246: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.20+rpt-rpi-v8'
make: *** [Makefile:30: modules] Error 2
bigbearishappy commented 1 month ago

Kernel 6.6 had removed the FBINFO_DEFAULT. I will fix it and feed back to you~

bigbearishappy commented 1 month ago

@mirkokral Have you tried to fix this error by yourself? If not, I will have a try to fix it.

bigbearishappy commented 1 month ago

I did a quick fix in here and it works fine now.

mirkokral commented 1 month ago

@mirkokral Have you tried to fix this error by yourself? If not, I will have a try to fix it.

currently cant try it as neither of my 2 rpis (a 4 and a 5) are working

bigbearishappy commented 1 month ago

I tried it with my raspberrypi CM4 and it work fine~

mirkokral commented 2 weeks ago

I tried it with my raspberrypi CM4 and it work fine~

try upgrading your kernel, but for me downgrading to kernel ver 5 worked

bigbearishappy commented 6 days ago

Sounds good. Please let me know if you have problem with upgrading to linux kernel 6.