WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Raspberry Pi Zero W Camera not working  (Read 1214 times)

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14083
Re: Raspberry Pi Zero W Camera not working
« Reply #15 on: November 08, 2022, 07:33:55 AM »
Do you have access to the wiki?

Presumably yes, but there are only so many hours in a day...

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14083
Re: Raspberry Pi Zero W Camera not working
« Reply #16 on: November 08, 2022, 07:36:35 AM »
This is from piCore64, but you should see something similar when v4l-dvb-KERNEL loads:
Code: [Select]
$ lsmod
Module                  Size  Used by    Tainted: G 
bcm2835_isp            32768  0
bcm2835_codec          49152  0
bcm2835_v4l2           45056  0
bcm2835_mmal_vchiq     40960  3 bcm2835_codec,bcm2835_isp,bcm2835_v4l2
videobuf2_vmalloc      20480  1 bcm2835_v4l2
rpivid_hevc            49152  0
v4l2_mem2mem           40960  2 bcm2835_codec,rpivid_hevc
videobuf2_v4l2         32768  5 bcm2835_codec,bcm2835_isp,bcm2835_v4l2,rpivid_hevc,v4l2_mem2mem
videobuf2_common       61440  6 bcm2835_codec,bcm2835_isp,bcm2835_v4l2,rpivid_hevc,v4l2_mem2mem,videobuf2_v4l2
videodev              311296  7 bcm2835_codec,bcm2835_isp,bcm2835_v4l2,rpivid_hevc,v4l2_mem2mem,videobuf2_v4l2,videobuf2_common
mc                     61440  7 bcm2835_codec,bcm2835_isp,rpivid_hevc,v4l2_mem2mem,videobuf2_v4l2,videobuf2_common,videodev
videobuf2_dma_contig    24576  3 bcm2835_codec,bcm2835_isp,rpivid_hevc
videobuf2_memops       20480  2 videobuf2_vmalloc,videobuf2_dma_contig
snd_soc_hdmi_codec     20480  2
snd_bcm2835            28672  0
vc_sm_cma              36864  2 bcm2835_isp,bcm2835_mmal_vchiq
v3d                    81920  4
gpu_sched              45056  1 v3d
vc4                   282624 10
cec                    53248  1 vc4
...

Offline zharr

  • Newbie
  • *
  • Posts: 24
Re: Raspberry Pi Zero W Camera not working
« Reply #17 on: November 08, 2022, 09:55:54 AM »
Thanks for uploading, will try later.
One question, if I want to support both Pi Zero 1 and Pi Zero 2, do I need the KERNEL-specific packages twice, for both piCore and piCore-v7?
From my understanding, the normal packages are either the same, or the v6 packages also work for v7. But that might not be true for KERNEL specific ones.
Reason I'm asking is I use a custom tce-loader to create the image and load tce before even starting up and that might be part of the problem.
Also I just bricked my installation trying to manually update extensions so I'll have to test once a new SD Card reader arrives.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10418
Re: Raspberry Pi Zero W Camera not working
« Reply #18 on: November 08, 2022, 11:17:23 AM »
Hi zharr
The  piCore-VERSION.img  file contains kernels for V6, V7, and V7l.
The V6 software should run on all 3 processor types.
Yes, you do need the KERNEL specific packages twice. They can be
in the same directory. The dependency files list them as:
Code: [Select]
graphics-KERNEL.tczWhen  tce-load  sees that  KERNEL  in the name it looks for a filename
that matches the kernel you are running and loads that.


Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14083
Re: Raspberry Pi Zero W Camera not working
« Reply #19 on: November 08, 2022, 12:39:51 PM »
Yes, you need both kernel specific extensions, the other extensions are common to armv6, armv7 and armv7l.

Offline zharr

  • Newbie
  • *
  • Posts: 24
Re: Raspberry Pi Zero W Camera not working
« Reply #20 on: November 09, 2022, 02:10:28 PM »
Hi zharr
The  piCore-VERSION.img  file contains kernels for V6, V7, and V7l.
The V6 software should run on all 3 processor types.
Yes, you do need the KERNEL specific packages twice. They can be
in the same directory. The dependency files list them as:
Code: [Select]
graphics-KERNEL.tczWhen  tce-load  sees that  KERNEL  in the name it looks for a filename
that matches the kernel you are running and loads that.
Yes, you need both kernel specific extensions, the other extensions are common to armv6, armv7 and armv7l.
Thanks, updated my code to load KERNEL-specific tczs from both repositories. That might also have been the problem, initially I only loaded v4l-dvb-5.10.77-piCore.tcz or v4l-dvb-5.10.77-piCore-v7.tcz, never both at the same time.
I'll have to confirm that everything works tomorrow once I have a SD card reader.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10418
Re: Raspberry Pi Zero W Camera not working
« Reply #21 on: November 09, 2022, 02:24:05 PM »
Hi zharr
If you look through  /usr/bin/tce-load  you will find this:
Code: [Select]
KERNELVER=$(uname -r)$KERNELVER  now contains the kernel version that is currently running.
It then replaces  KERNEL  in the extension name with the value contained
in  $KERNELVER  so it loads the matching extension.

You will also see that it runs  depmod  when it detects kernel modules are
being installed.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7181
    • My Community Forum
Re: Raspberry Pi Zero W Camera not working
« Reply #22 on: November 11, 2022, 12:21:31 AM »
When kernel modules loaded from the repo in .tcz format depmod is executed by the system, no need manually. WWell, it doesn't hurt
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14083
Re: Raspberry Pi Zero W Camera not working
« Reply #23 on: November 14, 2022, 03:54:43 AM »
It took me a while to update my RPi0W to piCore-13.1, but I can confirm that that the video devices are created after the following:

Set dtoverlay=vc4-kms-v3d, reboot and then:
Code: [Select]
tce-load -i graphics-KERNEL
alsa-modules-5.10.77-piCore.tcz: OK
graphics-5.10.77-piCore.tcz: OK
tce-load -i v4l-dvb-KERNEL
v4l-dvb-5.10.77-piCore.tcz: OK
ls /dev/video*
/dev/video10  /dev/video12  /dev/video14  /dev/video16
/dev/video11  /dev/video13  /dev/video15  /dev/video18
ls /dev/media*
/dev/media0  /dev/media1