Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4760

Advanced users • How to downgrade bookworm kernel from 6.6 to 6.1?

$
0
0
I need to go down to kernel 6.1 in order to be able to install the kernel module required by a Moxa USB to RS485 adapter. The module provided by Moxa warns on installation with

Code:

**********************************WARNING******************************* The lastest supported kernel is 6.2.0 That may not be compatible with Linux Kernel version 6.6.31+rpt-rpi-v8.
and fails to build with

Code:

/home/me/mxuport/driver/mxuport/mx-uport.c:201:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  201 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:201:41: note: (near initialization for ‘mxserial_2p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:229:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  229 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:229:41: note: (near initialization for ‘mxserial_3p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:257:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  257 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:257:41: note: (near initialization for ‘mxserial_4p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:285:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  285 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:285:41: note: (near initialization for ‘mxserial_6p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:313:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  313 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:313:41: note: (near initialization for ‘mxserial_8p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:341:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  341 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:341:41: note: (near initialization for ‘mxuportg2_2p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:369:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  369 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:369:41: note: (near initialization for ‘mxuportg2_4p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:397:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  397 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:397:41: note: (near initialization for ‘mxuportg2_8p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:425:41: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  425 |                 .break_ctl            = mxuport_break_ctl,      |                                         ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:425:41: note: (near initialization for ‘mxuport_2p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:453:37: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  453 |                 .break_ctl        = mxuport_break_ctl,      |                                     ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:453:37: note: (near initialization for ‘mxuport_4p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:481:37: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  481 |                 .break_ctl        = mxuport_break_ctl,      |                                     ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:481:37: note: (near initialization for ‘mxuport_8p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c:509:37: error: initialization of ‘int (*)(struct tty_struct *, int)’ from incompatible pointer type ‘void (*)(struct tty_struct *, int)’ [-Werror=incompatible-pointer-types]  509 |                 .break_ctl        = mxuport_break_ctl,      |                                     ^~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:509:37: note: (near initialization for ‘mxuport_16p_device.break_ctl’)/home/me/mxuport/driver/mxuport/mx-uport.c: In function ‘com_preserver_com_store’:/home/me/mxuport/driver/mxuport/mx-uport.c:594:24: warning: unused variable ‘flashcount’ [-Wunused-variable]  594 |         unsigned short flashcount;      |                        ^~~~~~~~~~In file included from /usr/src/linux-headers-6.6.31+rpt-common-rpi/include/linux/kernel.h:30,                 from /home/me/mxuport/driver/mxuport/mx-uport.c:26:/home/me/mxuport/driver/mxuport/mx-uport.c: In function ‘mx_load_firmware’:/home/me/mxuport/driver/mxuport/mx-uport.c:2447:40: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=] 2447 |                                 printk("NOT REMAP_TO_SRAM, remap_bit value = %d", (sys_reg_value >> 24) & PWR_REMAP_BIT);      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/src/linux-headers-6.6.31+rpt-common-rpi/include/linux/printk.h:427:25: note: in definition of macro ‘printk_index_wrap’  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \      |                         ^~~~/home/me/mxuport/driver/mxuport/mx-uport.c:2447:33: note: in expansion of macro ‘printk’ 2447 |                                 printk("NOT REMAP_TO_SRAM, remap_bit value = %d", (sys_reg_value >> 24) & PWR_REMAP_BIT);      |                                 ^~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:2447:79: note: format string is defined here 2447 |                                 printk("NOT REMAP_TO_SRAM, remap_bit value = %d", (sys_reg_value >> 24) & PWR_REMAP_BIT);      |                                                                              ~^      |                                                                               |      |                                                                               int      |                                                                              %ld/home/me/mxuport/driver/mxuport/mx-uport.c: In function ‘mx_set_serial_info’:/home/me/mxuport/driver/mxuport/mx-uport.c:3348:33: warning: unused variable ‘port’ [-Wunused-variable] 3348 |         struct usb_serial_port *port = mxport->port;      |                                 ^~~~/home/me/mxuport/driver/mxuport/mx-uport.c: In function ‘com_preserver_com_store’:/home/me/mxuport/driver/mxuport/mx-uport.c:623:9: warning: ignoring return value of ‘kstrtol’ declared with attribute ‘warn_unused_result’ [-Wunused-result]  623 |         kstrtol(com_buf, 10, &comNo);      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c: At top level:/home/me/mxuport/driver/mxuport/mx-uport.c:3917:12: warning: ‘mx_get_string’ defined but not used [-Wunused-function] 3917 | static int mx_get_string (struct usb_device *dev, int Id, char *string)      |            ^~~~~~~~~~~~~/home/me/mxuport/driver/mxuport/mx-uport.c:3465:13: warning: ‘mx_send_break’ defined but not used [-Wunused-function] 3465 | static void mx_send_break(struct usb_serial_port *port, int period)      |             ^~~~~~~~~~~~~cc1: some warnings being treated as errorsmake[5]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/scripts/Makefile.build:248: /home/me/mxuport/driver/mxuport/mx-uport.o] Error 1make[4]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/scripts/Makefile.build:485: /home/me/mxuport/driver/mxuport] Error 2make[3]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:1938: /home/me/mxuport/driver] Error 2make[2]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:246: __sub-make] Error 2
I can see that there's still a bunch of 6.1 kernels available in the bookworm repo, so it should be possible to downgrade, but how do I ensure that I get all the associated RPi firmwares?

Statistics: Posted by Lomax — Fri Aug 30, 2024 4:37 pm — Replies 6 — Views 142



Viewing all articles
Browse latest Browse all 4760

Trending Articles