unipi-kernel-modules-dkms does not generate modules on upgrade
-
Hi @martin-kudláček,
thanks for the reward.Can't find the testing repository url, can you please send it?
Thanks,
Achilleas -
Hi @achilleas-kotsis,
the change has been merged to the 1.2.18.The testing repository has the same url, just make sure to add component test:
deb https://repo.unipi.technology/debian buster main test
To prefer packages from main, add file
/etc/apt/preferences.d/10-unipi-prefer-main
with this content:Package: * Pin: release o=unipi,c=main Pin-Priority: 900
All of that is preconfigured in our images.
-
One more patch against the latest version that renames the old file during package configuration, because if it gets upgraded on a live system, the previously inserted code is not executed (script exits early if devices are found)
--- setbootconfig.sh.orig 2019-12-19 21:39:51.490185707 +0200 +++ setbootconfig.sh 2019-12-19 22:04:27.094799784 +0200 @@ -9,6 +9,10 @@ if [ "$1" = "--noreboot" -o -n "${DESTDIR}" ]; then ## called from package install MNTDIR=/boot + # Move old file using '-' instead of '_' + [ -f "${MNTDIR}/config-unipi.inc" ] && mv -f "${MNTDIR}/config-unipi.inc" "${MNTDIR}/config_unipi.inc" + # Change include using '-' instead of '_' + sed -i "s/include config-unipi\.inc/include config_unipi.inc/" "${MNTDIR}/config.txt" # check if running from "real" Neuron system grep -q '^/dev/mmcblk[[:digit:]]p1 /boot ' /proc/mounts && IS_REAL_SYSTEM=1 else
This cleaned up my system perfectly doing a
dpkg-reconfigure unipi-common
so I suppose it should be working on the package being upgraded also. I can test one of my systems if you generate a testing package to see if it applies cleanly. -
Hi @achilleas-kotsis,
thank you for the testing. Your patch is included in the testing version 1.2.19.test.20191220083937 available in the testing repository.Best regards,
Martin -
@martin-kudláček said in unipi-kernel-modules-dkms does not generate modules on upgrade:
1.2.19.test.20191220083937
I can confirm the package works as intended on my systems.
Thanks,
Achilleas -
Hi @Martin-Kudláček,
found another issue on latest rpi kernel.
Building initial module for 4.19.93+ Error! Build of unipi.ko failed for: 4.19.93+ (armv7l) Consult the make.log in the build directory /var/lib/dkms/unipi/1.36/build/ for more information. root@vkplc-home:~# cat /var/lib/dkms/unipi/1.36/build/make.log DKMS make.log for unipi-1.36 for kernel 4.19.93+ (armv7l) Wed 22 Jan 2020 12:33:22 PM EET make: Entering directory '/usr/src/linux-headers-4.19.93+' CC [M] /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_spi.o CC [M] /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_iio.o CC [M] /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_gpio.o CC [M] /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.o /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.c: In function ‘neuronspi_uart_handle_rx’: /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.c:320:31: error: passing argument 1 of ‘uart_handle_sysrq_char’ from incompatible pointer type [-Werror=incompatible-pointer-types] if (uart_handle_sysrq_char(port, ch)) ^~~~ In file included from /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_common.h:36, from /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.h:22, from /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.c:19: ./include/linux/serial_core.h:514:42: note: expected ‘struct uart_port *’ but argument is of type ‘struct neuronspi_port *’ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) { return 0; } ~~~~~~~~~~~~~~~~~~^~~~ CC [M] /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_sysfs.o cc1: some warnings being treated as errors make[1]: *** [scripts/Makefile.build:303: /var/lib/dkms/unipi/1.36/build/unipi/src/unipi_uart.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1522: _module_/var/lib/dkms/unipi/1.36/build/unipi] Error 2 make: Leaving directory '/usr/src/linux-headers-4.19.93+' make: Entering directory '/usr/src/linux-headers-4.19.93+' CC [M] /var/lib/dkms/unipi/1.36/build/rtc-unipi/rtc-unipi.o /var/lib/dkms/unipi/1.36/build/rtc-unipi/rtc-unipi.c: In function ‘rtc_unipi_probe’: /var/lib/dkms/unipi/1.36/build/rtc-unipi/rtc-unipi.c:666:6: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] struct nvmem_config nvmem_cfg = { ^~~~~~ Building modules, stage 2. MODPOST 1 modules CC /var/lib/dkms/unipi/1.36/build/rtc-unipi/rtc-unipi.mod.o LD [M] /var/lib/dkms/unipi/1.36/build/rtc-unipi/rtc-unipi.ko make: Leaving directory '/usr/src/linux-headers-4.19.93+'```
Line 320 in unipi_uart.c
if (uart_handle_sysrq_char(port, ch))
passes "port" as an arqument to uart_handle_sysrq_char, which is of type "struct neuronspi_port", but uart_handle_sysrq_char expects a type of "struct uart_port", which is part of struct neuronspi_port as seen on unipi_common.h.
Changing line 320 as below seems to fix the issue.
if (uart_handle_sysrq_char(&port->port, ch))
-
Hi @achilleas-kotsis,
thanks again for the fix:) We have merged it into a testing repository alongside with fix of the Makefile, which masked this error to the Gitlab CI and allowed building it in the first place. We will test it and soon merge into the master branch. -
Hi @achilleas-kotsis , @Martin-Kudláček ,
has it been fixed in the master branch? I am facing to the same problem.
Thank you
-
Hi @pmandeli,
not yet, but the change is available for testing here: https://repo.unipi.technology/debian/pool/test/u/unipi-kernel-modules/unipi-kernel-modules-dkms_1.37.test.20200122161658_all.deb -
Thank you