Running seeed-linux-dtoverlays in reTerminal fails to build device driver

Even if you run seeed-linux-dtoverlays on the latest Raspberry Pi OS image [1] updated on March 12th, 2024, an error occurs when building the device driver.
[1]: Image I tried
WXWorkCapture_1710383789770

It seems that the kernel version has been changed and the i2c_driver.probe arguments etc. have been changed.

pi@raspberrypi:~/seeed-linux-dtoverlays $ sudo ./scripts/reTerminal.sh

### Current Debian version is bookworm or later

### Install required tool packages
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Fetched 55.4 kB in 1s (45.8 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dkms is already the newest version (3.0.10-8+deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

### Will compile with the latest kernel...

### Sync kernel and userland

### Uninstall previous dkms module
Module ltr30x-0.1 for kernel 6.6.20+rpt-rpi-v8 (aarch64).
Before uninstall, this module version was ACTIVE on this kernel.

als_ltr30x.ko.xz:
 - Uninstallation
   - Deleting from: /lib/modules/6.6.20+rpt-rpi-v8/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod....
Deleting module ltr30x-0.1 completely from the DKMS tree.

### Install required kernel package
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-image-rpi-v8 is already the newest version (1:6.6.20-1+rpt1).
linux-headers-rpi-v8 is already the newest version (1:6.6.20-1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
KBUILD: /lib/modules/6.6.20+rpt-rpi-v8/build
Sign command: /lib/modules/6.6.20+rpt-rpi-v8/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/mipi_dsi/0.1/source -> /usr/src/mipi_dsi-0.1

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 all KVERSION=6.6.20+rpt-rpi-v8......(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.6.20+rpt-rpi-v8 (aarch64)
Consult /var/lib/dkms/mipi_dsi/0.1/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel
DKMS make.log for mipi_dsi-0.1 for kernel 6.6.20+rpt-rpi-v8 (aarch64)
Thu 14 Mar 12:17:33 JST 2024
make -C /lib/modules/6.6.20+rpt-rpi-v8/build M=/var/lib/dkms/mipi_dsi/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.20+rpt-rpi-v8'
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: In function ‘i2c_md_probe’:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:380:19: error: ‘struct drm_panel’ has no member named ‘prepare_upstream_first’; did you mean ‘prepare_prev_first’?
  380 |         md->panel.prepare_upstream_first = true;
      |                   ^~~~~~~~~~~~~~~~~~~~~~
      |                   prepare_prev_first
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: At top level:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:462:18: error: initialization of ‘int (*)(struct i2c_client *)’ from incompatible pointer type ‘int (*)(struct i2c_client *, const struct i2c_device_id *)’ [-Werror=incompatible-pointer-types]
  462 |         .probe = i2c_md_probe,
      |                  ^~~~~~~~~~~~
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:462:18: note: (near initialization for ‘i2c_md_driver.probe’)
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248: /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:1938: /var/lib/dkms/mipi_dsi/0.1/build] 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:15: all] Error 2
1 Like

I have the same issue with recent upgrade to 6.6.20 kernel and on reboot the ReTerminal DM display no longer starts.

I get an error with the compiling of the CH343 module

kustere@eggpi:~/seeed-linux-dtoverlays $ sudo ./scripts/reTerminal.sh --device reTerminal-plus

### Current Debian version is bookworm or later

### Install required tool packages
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 https://download.docker.com/linux/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 http://deb.debian.org/debian bookworm-updates InRelease
Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dkms is already the newest version (3.0.10-8+deb12u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

### Will compile with the latest kernel...

### Sync kernel and userland

### Uninstall previous dkms module
Module ili9881d-0.1 for kernel 6.6.20+rpt-rpi-v8 (aarch64).
Before uninstall, this module version was ACTIVE on this kernel.

ili9881d.ko.xz:
 - Uninstallation
   - Deleting from: /lib/modules/6.6.20+rpt-rpi-v8/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod....
Deleting module ili9881d-0.1 completely from the DKMS tree.
Module ltr30x-0.1 for kernel 6.6.20+rpt-rpi-v8 (aarch64).
Before uninstall, this module version was ACTIVE on this kernel.

als_ltr30x.ko.xz:
 - Uninstallation
   - Deleting from: /lib/modules/6.6.20+rpt-rpi-v8/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod....
Deleting module ltr30x-0.1 completely from the DKMS tree.
Deleting module ch34x-0.1 completely from the DKMS tree.

### Install required kernel package
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-image-rpi-v8 is already the newest version (1:6.6.20-1+rpt1).
linux-headers-rpi-v8 is already the newest version (1:6.6.20-1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
KBUILD: /lib/modules/6.6.20+rpt-rpi-v8/build
Sign command: /lib/modules/6.6.20+rpt-rpi-v8/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/ltr30x/0.1/source -> /usr/src/ltr30x-0.1

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 all KVERSION=6.6.20+rpt-rpi-v8....
Signing module /var/lib/dkms/ltr30x/0.1/build/als_ltr30x.ko
Cleaning build area...

als_ltr30x.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.6.20+rpt-rpi-v8/updates/dkms/
depmod....
Sign command: /lib/modules/6.6.20+rpt-rpi-v8/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/ili9881d/0.1/source -> /usr/src/ili9881d-0.1

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 all KVERSION=6.6.20+rpt-rpi-v8....
Signing module /var/lib/dkms/ili9881d/0.1/build/ili9881d.ko
Cleaning build area...

ili9881d.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.6.20+rpt-rpi-v8/updates/dkms/
depmod....
Sign command: /lib/modules/6.6.20+rpt-rpi-v8/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/ch34x/0.1/source -> /usr/src/ch34x-0.1

Building module:
Cleaning build area...
make -j4 KERNELRELEASE=6.6.20+rpt-rpi-v8 all KVERSION=6.6.20+rpt-rpi-v8....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.6.20+rpt-rpi-v8 (aarch64)
Consult /var/lib/dkms/ch34x/0.1/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel
DKMS make.log for ch34x-0.1 for kernel 6.6.20+rpt-rpi-v8 (aarch64)
Sun 17 Mar 17:48:25 ACDT 2024
make -C /lib/modules/6.6.20+rpt-rpi-v8/build M=/var/lib/dkms/ch34x/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.20+rpt-rpi-v8'
  CC [M]  /var/lib/dkms/ch34x/0.1/build/ch343.o
/var/lib/dkms/ch34x/0.1/build/ch343.c:1811:18: error: initialization of ‘ssize_t (*)(struct tty_struct *, const u8 *, size_t)’ {aka ‘long int (*)(struct tty_struct *, const unsigned char *, long unsigned int)’} from incompatible pointer type ‘int (*)(struct tty_struct *, const u8 *, size_t)’ {aka ‘int (*)(struct tty_struct *, const unsigned char *, long unsigned int)’} [-Werror=incompatible-pointer-types]
 1811 |         .write = ch343_tty_write,
      |                  ^~~~~~~~~~~~~~~
/var/lib/dkms/ch34x/0.1/build/ch343.c:1811:18: note: (near initialization for ‘ch343_ops.write’)
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/scripts/Makefile.build:248: /var/lib/dkms/ch34x/0.1/build/ch343.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.20+rpt-common-rpi/Makefile:1938: /var/lib/dkms/ch34x/0.1/build] 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:13: all] Error 2

This could be a kernel update causing the driver to not install properly. We are currently working on an urgent fix to ensure that everyone can use it normally. We apologize for the inconvenience and thank you for your patience!

Hello everyone,

We are pleased to announce that we have officially packaged the latest kernel version 6.6.20 into an image package, which includes both 64-bit and 32-bit versions. After conducting thorough testing, by flashing this image, you can resolve the issue of the LCD screen not turning on. We apologize for the delay and hope that this update can be of assistance to all of you.

1 Like