I am currently trying to get the Pi Camera Module 3 working on a Pi 4 B under NixOS, but I'm having some issues with the video core drivers (which I assume are needed to use the camera).
I'm seeing this output in dmesg (with verbose logging enabled for vchiq):
The interesting part is that no OPENACK is received from the video core after sending OPEN, and instead a CLOSE is received. Compare this to the dmesg output from Raspbian:
I am using u-boot and extlinux with the following config.txt:
And this extlinux entry:
I took the loaded device tree from Raspbian and copied it to my system (using dtc -I fs /sys/firmware/devicetree/base), and at runtime the only differences are below.
Anyone know what I might be doing wrong here?
I'm seeing this output in dmesg (with verbose logging enabled for vchiq):
Code:
[ 7.931808] [vc_sm_connected_init]: start[ 7.931832] vchiq: vchiq_initialise(00000000400cc7ad): returning 0[ 7.931842] vchiq: 0: qm CONNECT@ffffffc080a1f000,0 (0->0)[ 7.931850] vchiq: Sent Msg CONNECT(1) to ???? s:0 d:0 len:0[ 7.931856] vchiq: 0: DISCONNECTED->CONNECTING[ 7.931862] vchiq: 0: DISCONNECTED->CONNECTING[ 7.931866] vchiq: 0: CONNECTING->CONNECTED[ 7.931869] vchiq: 0: CONNECTING->CONNECTED[ 7.950045] vchiq: vchiq_connect(00000000400cc7ad): returning 0[ 7.950092] vchiq: 0: srv:0 FREE->OPENING[ 7.950096] vchiq: Open Service SMEM SrcPort:0[ 7.950106] vchiq: vchiq_use_internal SMEM:628 count 1, state count 1[ 7.950110] vchiq: vchiq_use_internal exit 0[ 7.950116] vchiq: 0: qm OPEN@ffffffc080a1f008,c (0->0)[ 7.950122] vchiq: vchiq_initialise(000000001ad62c41): returning 0[ 7.950128] vchiq: Sent Msg OPEN(2) to ???? s:0 d:0 len:12[ 7.950133] vchiq: vchiq_connect(000000001ad62c41): returning 0[ 7.950141] vchiq: 0: srv:1 FREE->LISTENING[ 7.950145] vchiq: Add Service KEEP SrcPort:1[ 7.950150] vchiq: vchiq_add_service(000000001ad62c41): returning 0[ 7.950201] vchiq: Rcvd Msg CLOSE(4) from SMEM s:0 d:0 len:0[ 7.950211] vchiq: 0: prs CLOSE@ffffffc0809ff008 (0->0)[ 7.950217] vchiq: 0: csi:0,1 (OPENING)[ 7.950222] vchiq: 0: srv:0 OPENING->CLOSEWAIT[ 7.950231] vchiq: Close Service SMEM s:0 d:4096[ 7.950245] vchiq: vchiq_release_internal SMEM:628 count 0, state count 0[ 7.950250] vchiq: vchiq_release_internal exit 0[ 7.950254] vchiq: 0: remove_service:0[ 7.950264] vchiq: 0: ps - remove 0<->4096[ 7.950268] vchiq: 0: csi:0,0 (CLOSEWAIT)[ 7.950273] vchiq: 0: fsi - (0)[ 7.950276] vchiq: 0: srv:0 CLOSEWAIT->FREE[ 7.950291] vchiq: vchiq_open_service(00000000400cc7ad): returning -22[ 7.950297] vc_sm_cma_vchi_init: failed to open VCHI service (-22)[ 7.950302] [vc_sm_connected_init]: failed to initialize shared memory service
Code:
[ 6.646137] [vc_sm_connected_init]: start[ 6.646152] vchiq: vchiq_initialise(00000000750b7580): returning 0[ 6.646171] vchiq: 0: qm CONNECT@00000000e854907b,0 (0->0)[ 6.646186] vchiq: Sent Msg CONNECT(1) to ???? s:0 d:0 len:0[ 6.646200] vchiq: 0: DISCONNECTED->CONNECTING[ 6.646209] vchiq: 0: DISCONNECTED->CONNECTING[ 6.646218] vchiq: 0: CONNECTING->CONNECTED[ 6.646225] vchiq: 0: CONNECTING->CONNECTED[ 6.672839] vchiq: vchiq_connect(00000000750b7580): returning 0[ 6.672880] vchiq: vchiq_initialise(00000000f665176a): returning 0[ 6.672884] vchiq: 0: srv:0 FREE->OPENING[ 6.672896] vchiq: vchiq_connect(00000000f665176a): returning 0[ 6.672896] vchiq: Open Service SMEM SrcPort:0[ 6.672911] vchiq: vchiq_use_internal SMEM:294 count 1, state count 1[ 6.672914] vchiq: 0: srv:1 FREE->LISTENING[ 6.672921] vchiq: Add Service KEEP SrcPort:1[ 6.672923] vchiq: vchiq_use_internal exit 0[ 6.672930] vchiq: vchiq_add_service(00000000f665176a): returning 0[ 6.672934] vchiq: 0: qm OPEN@00000000175f550f,c (0->0)[ 6.672949] vchiq: Sent Msg OPEN(2) to ???? s:0 d:0 len:12[ 6.673006] vchiq: Rcvd Msg OPENACK(3) from SMEM s:27 d:0 len:2[ 6.673033] vchiq: Rcvd: 00000000: 01 00 ..[ 6.673046] vchiq: 0: prs OPENACK@000000004f4d45dd,2 (27->0) v:1 [ 6.673060] vchiq: 0: srv:0 OPENING->OPEN[ 6.673396] vchiq: vchiq_open_service(00000000750b7580): returning 0[ 6.679098] vchiq: vchiq_release_internal SMEM:294 count 0, state count 0[ 6.679122] vchiq: vchiq_release_internal exit 0[ 6.712143] [vc_sm_connected_init]: installed successfully
Code:
[all]arm_64bit=1enable_uart=1gpu_mem=16[pi3]core_freq=250kernel=u-boot-rpi3.bin[pi4]kernel=u-boot-rpi4.bin
Code:
LABEL nixos-default MENU LABEL NixOS - Default LINUX ../nixos/rg7i3dv53qzz4jk8npwkpmb9cdsjhcwh-linux-rpi-aarch64-unknown-linux-gnu-6.6.51-stable_20241008-Image INITRD ../nixos/757ifsz1s30gx6aqdbrdfd69x3m30c1i-initrd-linux-rpi-aarch64-unknown-linux-gnu-6.6.51-stable_20241008-initrd APPEND init=/nix/store/61g4mq1h2fx9zzncqaa0w48058jzi8ma-nixos-system-25.05.20241203.566e53c/init vchiq.arm_log_level=7 vchiq.core_log_level=7 vchiq.core_msg_log_level=7 vchiq.susp_log_level=7 vchiq.sync_log_level=7 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ipv6.disable=1 loglevel=4 FDT ../nixos/gkr4zbf76w0w3dywlkrjfd26s59bkn3r-device-tree/broadcom/bcm2711-rpi-4-b.dtb
Code:
/ { #address-cells = <0x02>;- memreserve = <0x3b400000 0x4c00000>;+ memreserve = <0x3e600000 0x1000000>; model = "Raspberry Pi 4 Model B Rev 1.5"; serial-number = "100000006f5829b9"; #size-cells = <0x01>;@@ -47,7 +47,7 @@ memory@0 { device_type = "memory";- reg = <0x00 0x00 0x3b400000 0x00 0x40000000 0xbc000000>;+ reg = <0x00 0x00 0x3e600000 0x00 0x40000000 0xbc000000>; }; scb {@@ -2270,14 +2270,20 @@ i2c10 = "/soc/i2c0mux/i2c@1"; }; + framebuffer {+ compatible = "simple-framebuffer";+ status = "disabled";+ };+ chosen {- linux,initrd-end = <0x2efff38d>;- bootargs = "coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 smsc95xx.macaddr=D8:3A:DD:4F:BF:8E vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=f8dd84b5-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=GB vchiq.arm_log_level=7 vchiq.core_log_level=7 vchiq.core_msg_log_level=7 vchiq.susp_log_level=7 vchiq.sync_log_level=7";+ u-boot,version = "2024.04";+ linux,initrd-end = <0x00 0x60d3641>;+ bootargs = "init=/nix/store/61g4mq1h2fx9zzncqaa0w48058jzi8ma-nixos-system-25.05.20241203.566e53c/init vchiq.arm_log_level=7 vchiq.core_log_level=7 vchiq.core_msg_log_level=7 vchiq.susp_log_level=7 vchiq.sync_log_level=7 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 ipv6.disable=1 loglevel=4"; os_prefix = [00]; kaslr-seed = <0x00 0x00>; log = <0x3ff80000 0x7ffe0>; rpi-boardrev-ext = <0x00>;- linux,initrd-start = <0x2e4bc000>;+ linux,initrd-start = <0x00 0x5800000>; overlay_prefix = "overlays/"; phandle = <0x54>; stdout-path = "serial0:115200n8";@@ -2655,7 +2661,7 @@ #size-cells = <0x01>; compatible = "raspberrypi,bootloader-config", "nvmem-rmem"; status = "okay";- reg = <0x00 0x3ef65360 0x36>;+ reg = <0x00 0x3f177f00 0x36>; phandle = <0x5e>; no-map; };
Statistics: Posted by jf_uu — Sat Dec 07, 2024 3:20 pm