Repository navigation
raspinfo: Fix camera listing and vcgencmd errors on current images - #218
Conversation
libcamera-hello was renamed rpicam-hello, and current images only ship the new name. raspinfo therefore never listed cameras and fell back to "vcgencmd get_camera", which Pi 5 firmware does not register, printing "Command not registered" instead of camera information. Prefer rpicam-hello, keep libcamera-hello for older images, and only call get_camera and mem_reloc_stats when the firmware registers them (Pi 5 has no relocatable heap, so mem_reloc_stats does not exist). Fixes raspberrypi#39, fixes raspberrypi#137. Signed-off-by: Roy <rongh7426@gmail.com>
|
Thanks looks fine. When testing I noticed the regex on the EEPROM section missed pi500 and cm5. |
The revision-code regex only matches board types 0x11, 0x13, 0x14, 0x15 and 0x17, so Pi 500 (0x19) and CM5 (0x18) never reported their bootloader EEPROM. Also match any board whose device tree is compatible with bcm2712, which covers every current and future BCM2712 board, and keep the regex for the Pi 4 family. Signed-off-by: Roy <rongh7426@gmail.com>
|
Thanks for testing. Added in b8dd07a: the EEPROM section now also runs when Checked on the Pi 5 (EEPROM section shown as before), and with fake cpuinfo/compatible files for the other cases:
|
|
Also confirmed on real CM5 hardware (Compute Module 5 Rev 1.0, revision
With b8dd07a the section shows the |
|
I'd drop the regex and use bcm2711 in compatible for Pi4 family (and bcm2712 for pi5). |
Match bcm2711 (Pi 4, Pi 400, CM4) or bcm2712 (Pi 5, Pi 500, CM5) in /proc/device-tree/compatible and drop the revision-code regex. Signed-off-by: Roy <rongh7426@gmail.com>
|
Done in 8b71871: the regex is gone, and the EEPROM section now runs when Checked on the Pi 5 (section shown, |
|
Thanks! |
raspinfoprintsCommand not registeredtwice on a Pi 5, and on current images it never lists cameras on any model.libcamera-hellowas renamedrpicam-hello, and trixie images ship only the new name. raspinfo therefore always fell back tovcgencmd get_camera, which Pi 5 firmware does not register. It now triesrpicam-hello --listfirst and keepslibcamera-hello --listfor older images. It callsget_cameraonly if the firmware lists it.mem_reloc_statsis called only whenvcgencmd commandslists it. As noted in vcgencmd mem_reloc_status: "Command not registered" #137, Pi 5 has no relocatable heap.A small
vcgencmd_has()helper checksvcgencmd commandsand matches whole words, sogetdoes not matchget_config.Tested on a Pi 5 Rev 1.1, trixie, raspinfo 20260626-1:
Command not registered: 2 -> 0.No cameras available!(no camera attached).sh -npasses.Fixes #39
Fixes #137