bookworm kernel headers for camera driver kernel module
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, linux, raspberry-pi
- Domain
- embedded-iot, operating-systems
Research direction
Start with the reported Kbuild and the external-module command using the 6.6.31 Bookworm headers, then compare it with the successful 6.1.21 build. Reproduce the missing imx219-overlay.dtbo target and inspect the kernel-header build behavior around the listed Kbuild entries. Done means the imx219 module and device-tree overlay build successfully against the Bookworm headers.
Written by the indexing model from the issue text.
Description
LINK TO FORUM:
https://forums.raspberrypi.com/viewtopic.php?p=2248093#p2248093
for a custom camera driver I'm trying to build a dkms module.
For sake of simplicity, let's reproduce it with the imx219 driver.
basically I have a folder structure like this:
pi@raspberrypi:~/ams_rpi_kernel/imx219/src $ tree
.
├── imx219.c
├── imx219.dtsi
├── imx219-overlay.dts
├── Kbuild
└── Makefile
pi@raspberrypi:~/ams_rpi_kernel/imx219/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/imx219/src/imx219.o
make[2]: *** No rule to make target '/home/pi/ams_rpi_kernel/imx219/src/imx219-overlay.dtbo', needed by '/home/pi/ams_rpi_kernel/imx219/src/'. Stop.
make[1]: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:1938: /home/pi/ams_rpi_kernel/imx219/src] Error 2
make: *** [/usr/src/linux-headers-6.6.31+rpt-common-rpi/Makefile:246: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.6.31+rpt-rpi-v8'
on older kernel versions, this command worked fine for me. (6.1.y headers + imx219.c from that kernel)
pi@raspberrypi:~/ams_rpi_kernel/imx219/src61 $ 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/imx219/src61/imx219.o
DTCO /home/pi/ams_rpi_kernel/imx219/src61/imx219.dtbo
MODPOST /home/pi/ams_rpi_kernel/imx219/src61/Module.symvers
CC [M] /home/pi/ams_rpi_kernel/imx219/src61/imx219.mod.o
LD [M] /home/pi/ams_rpi_kernel/imx219/src61/imx219.ko
make: Leaving directory '/usr/src/linux-headers-6.1.21-v8+'
more info:
I'm using pi4b, 64bit, bookworm. kernel 6.6.31.
pi@raspberrypi:~/ams_rpi_kernel/imx219/src $ uname -a
Linux raspberrypi 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
contents of the files:
Kbuild
obj-m := imx219.o
dtbo-y += imx219.dtbo
targets += $(dtbo-y)
always := $(dtbo-y)
always-y := $(dtbo-y)
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·