Hi folks,
for a certain camera called ams mira050 - I've developed a driver, which is installed as a kernel module.
pi@raspberrypi:~/ams_rpi_kernel/mira050/src $ tree
├── Kbuild
├── Makefile
├── mira050.c
├── mira050color.c
├── mira050color-overlay.dts
├── mira050.inl
├── mira050_mono_color-overlay.dtsi
├── mira050-overlay.dts
I can run make - or run this command (does same thing)
HOWEVER
if I do this, no error, using older kernel headers.:
Kernel version
Makefile:
for a certain camera called ams mira050 - I've developed a driver, which is installed as a kernel module.
pi@raspberrypi:~/ams_rpi_kernel/mira050/src $ tree
├── Kbuild
├── Makefile
├── mira050.c
├── mira050color.c
├── mira050color-overlay.dts
├── mira050.inl
├── mira050_mono_color-overlay.dtsi
├── mira050-overlay.dts
I can run make - or run this command (does same thing)
Code:
pi@raspberrypi:~/ams_rpi_kernel/mira050/src $ make -C /lib/modules/6.6.31+rpt-rpi-v8/build M=$PWD CPATH=/usr/src/linux-headers-6.6.31+rpt-common-rpi/include/ make: Entering directory '/usr/src/linux-headers-6.6.31+rpt-rpi-v8' CC [M] /home/pi/ams_rpi_kernel/mira050/src/mira050.oIn file included from /home/pi/ams_rpi_kernel/mira050/src/mira050.c:10:...[color=#FF0000]make[2]: *** No rule to make target '/home/pi/ams_rpi_kernel/mira050/src/mira050.dtbo', needed by '/home/pi/ams_rpi_kernel/mira050/src/'. Stop.[/color]make[1]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:1938: /home/pi/ams_rpi_kernel/mira050/src] Error 2make: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:246: __sub-make] Error 2make: Leaving directory '/usr/src/linux-headers-6.6.31+rpt-rpi-v8'
if I do this, no error, using older kernel headers.:
Code:
pi@raspberrypi:~/ams_rpi_kernel/mira050/src $ make -C /lib/modules/6.1.21-v8+/build M=$PWD CPATH=/usr/src/linux-headers-6.1.21-v8+/include/make: Entering directory '/usr/src/linux-headers-6.1.21-v8+'warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc (Debian 10.2.1-6) 10.2.1 20210110 You are using: gcc (Debian 12.2.0-14) 12.2.0 CC [M] /home/pi/ams_rpi_kernel/mira050/src/mira050.oIn file included from /home/pi/ams_rpi_kernel/mira050/src/mira050.c:10:
Kernel version
Code:
pi@raspberrypi:~/ams_rpi_kernel/mira050/src $ uname -r6.6.31+rpt-rpi-v8
Makefile:
Code:
# SPDX-License-Identifier: GPL-2.0KERNELRELEASE ?= $(shell uname -r)KERNELRELEASE_NR=$(shell echo $(KERNELRELEASE) | cut -d "-" -f 1)KDIR ?= /lib/modules/$(KERNELRELEASE)/buildINCDIR ?= /usr/src/linux-headers-$(KERNELRELEASE)/include:/usr/src/linux-headers-$(KERNELRELEASE_NR)-rpi8-common-rpi/includeKERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/buildMODSRC := $(shell pwd)/INSTALL_MOD_PATH ?= /usrINSTALL_MOD_DIR ?= /kernel/drivers/media/i2c/default:$(MAKE) -C $(KDIR) M=$$PWD CPATH=$(INCDIR)install:$(MAKE) INSTALL_MOD_PATH=${INSTALL_MOD_PATH} INSTALL_MOD_DIR=${INSTALL_MOD_DIR} -C $(KERNEL_SRC) M=$(MODSRC) CONFIG_MODULE_COMPRESS_XZ=y modules_installpost_intall:depmod -Aclean:$(MAKE) -C $(KERNEL_SRC) M=$(MODSRC) clean
Statistics: Posted by pbaetens — Tue Aug 27, 2024 3:42 pm — Replies 1 — Views 43