Multi-container setup unable to detect picamera

Hi there, i’ve been trying to run a multi-container setup with picamera. However it seems that the container is unable to detect the camera even though i’ve set the HostOS config.txt

picamera container -
vcgencmd get_camera returns supported=0 detected=0
uname -a - Linux raspberrypi 5.10.83-v7 #1 SMP Tue Dec 7 13:42:57 UTC 2021 armv7l GNU/Linux

tried the following solutions:

  • sudo modprobe bcm2835-v4l2 inside the picamera container.
  • installed raspi-config turn on legacy camera. but it doesnt prompt reboot, with a manual reboot.

according to the documentation for the HostOS, the custom configuration settings.
BALENA_HOST_CONFIG_start_x = 1
BALENA_HOST_CONFIG_gpu_mem = 256
BALENA_HOST_CONFIG_fixup_file = fixup_x.dat
BALENA_HOST_CONFIG_start_file = start_x.elf

the docker-compose file for the multi-container setup

version: '2'
services:
  picamera:
    build: ./camera
    restart: always
    devices:
      - "/dev/mem:/dev/mem"
      - "/dev/vchiq:/dev/vchiq"
      - "/dev/vcsm-cma:/dev/vcsm-cma"
      - "/dev/i2c-0:/dev/i2c-0"
    privileged: true
    network_mode: "host"
    cap_add:
      - SYS_RAWIO
    ports:
      - "3030:3030"
    labels:
      io.balena.features.dbus: '1'
      io.balena.features.kernel-modules: '1'
      io.balena.features.firmware: '1'
  watchdog:
    image: ./logger
    restart: always
    devices:
      - "/dev/mem:/dev/mem"
    cap_add:
      - SYS_RAWIO
    volumes:
      - logs:/logs
volumes:
  logs:
  socks:
networks:
  local:

and the dockerfile to build the camera image.

FROM raspbian/stretch as camstreamer_build

RUN apt-get update \
    && apt-get install -y --no-install-recommends  --allow-unauthenticated \
    build-essential \
    curl \
    gnupg \
    ca-certificates \
    v4l-utils \
    git \
    cmake  \
    pkg-config  \
    libavcodec-dev \
    libavformat-dev \
    libdc1394-22-dev \
    libgtk2.0-dev \
    libjasper-dev \
    libjpeg-dev \
    libpng-dev \
    libswscale-dev \
    libtbb-dev \
    libtbb2 \
    libtiff-dev \
    # start
    libopus-dev \
    libvpx-dev \
    libilmbase12 \
    libopenexr22 \
    #ffmpeg
    libavdevice-dev \
    libavfilter-dev \
    libavcodec-dev
RUN mkdir /code \
    && cd /code \
  && git clone --single-branch --branch master https://github.com/raspberrypi/userland.git \
  && cd userland \
  && mkdir build \
  && cd build \
  && cmake -DCMAKE_BUILD_TYPE=Release .. \
  && make -j `nproc` \
  && make install \
  && cd /code \
  && git clone https://github.com/transcelestial/mjpg-streamer -b fix/client_infos \
  && cd mjpg-streamer/mjpg-streamer-experimental \
  && mkdir build \
  && cd build \
  && cmake -DENABLE_HTTP_MANAGEMENT=ON -DCMAKE_INSTALL_PREFIX=../out .. \
  && make -j`nproc` \
  && make install

FROM balenalib/raspberrypi3-debian:stretch AS camstreamer
COPY --from=camstreamer_build /code/mjpg-streamer/mjpg-streamer-experimental/out /mjpg-streamer
ENV LD_LIBRARY_PATH /mjpg-streamer/lib/mjpg-streamer
CMD ["balena-idle"]

i’ve also noticed that the builds do not include the binaries for /opt , not sure if that is intended for balenalib/raspberrypi3-debian builds. would be great if someone could clarify my doubts.

another question would be, should i be building my binaries on the HostOS layer instead of in the container layer? thinking that it’s meant to be shared in the future when i add more containers in.

Hi kayige

First I’d like to ask about which docs are you following? I’d like to confirm that you’re using an up to date source.

There’s a sample app at GitHub - balena-io-playground/libcamera-apps: Example repo to showcase Raspberry Pi's new libcamera stack on balenaOS that you can use to check that the camera can be detected. Could you try to run this and see if it works as expected?

You can also use this as a reference. For example, check libcamera-apps/balena.yml at master · balena-io-playground/libcamera-apps · GitHub you’ll see that there are specific fleet config vars defined.

If that one doesn’t work, there’s also another app at GitHub - balenalabs/balena-cam: Network Camera with Raspberry Pi and WebRTC. Tutorial:

And also could you share which OS version you’re running? And if none of the above works, the result of dmesg would be useful

Cheers
Ramiro

PS: Another thread that may be helpful: Unable to connect to Raspberry Pi camera on Zero W after OS update - #7 by Haila

Hi ramiorgm

I took references from the following sources:
sample app: balena-cam/balena-cam at master · balenalabs/balena-cam · GitHub
docker-compose: docker-compose.yml fields - Balena Documentation
base images: Balena base images - Balena Documentation
configuration: Advanced boot settings - Balena Documentation

Currently i’m running HostOS on version 2.94.4

This is the current dmesg from the build im working on.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.83-v7 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Tue Dec 7 13:42:57 UTC 2021
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 3 Plus Rev 1.0
[    0.000000] random: fast init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x13c00000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] On node 0 totalpages: 147456
[    0.000000]   DMA zone: 1296 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 147456 pages, LIFO batch:31
[    0.000000] percpu: Embedded 20 pages/cpu s51212 r8192 d22516 u81920
[    0.000000] pcpu-alloc: s51212 r8192 d22516 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 146160
[    0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 8250.nr_uarts=1 video=Composite-1:720x480@60i,margin_left=32,margin_right=32,margin_top=32,margin_bottom=32 smsc95xx.macaddr=B8:27:EB:CD:33:52 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait dwc_otg.lpm_enable=0 rootwait vt.global_cursor_default=0 console=null cgroup_enable=memory root=UUID=ba1eadef-0235-40ac-99c5-63159eb18640 rootwait
[    0.000000] cgroup: Enabling memory control group subsystem
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 294920K/589824K available (11264K kernel code, 1369K rwdata, 3292K rodata, 8192K init, 896K bss, 32760K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 35860 entries in 106 pages
[    0.000000] ftrace: allocated 106 pages with 4 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x3b0/0x598 with crng_init=1
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000004] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000014] Switching to timer-based delay loop, resolution 52ns
[    0.000175] Console: colour dummy device 80x30
[    0.000217] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000236] pid_max: default: 32768 minimum: 301
[    0.000342] LSM: Security Framework initializing
[    0.000484] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.000499] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001229] CPU: Testing write buffer coherency: ok
[    0.001528] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002193] Setting up static identity map for 0x100000 - 0x100060
[    0.002293] rcu: Hierarchical SRCU implementation.
[    0.002807] smp: Bringing up secondary CPUs ...
[    0.003494] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004455] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.005323] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.005603] smp: Brought up 1 node, 4 CPUs
[    0.005625] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.005634] CPU: All CPU(s) started in HYP mode.
[    0.005642] CPU: Virtualization extensions available.
[    0.006185] devtmpfs: initialized
[    0.014902] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.015140] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015160] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.021115] pinctrl core: initialized pinctrl subsystem
[    0.021807] NET: Registered protocol family 16
[    0.023968] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.026943] audit: initializing netlink subsys (disabled)
[    0.027106] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.027473] thermal_sys: Registered thermal governor 'step_wise'
[    0.027782] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.027796] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.027955] Serial: AMBA PL011 UART driver
[    0.038734] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.050077] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-01-20T13:59:16, variant start_x
[    0.060092] raspberrypi-firmware soc:firmware: Firmware hash is bd88f66f8952d34e4e0613a85c7a6d3da49e13e2
[    0.087631] Kprobes globally optimized
[    0.091599] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
[    0.092797] SCSI subsystem initialized
[    0.092946] usbcore: registered new interface driver usbfs
[    0.092989] usbcore: registered new interface driver hub
[    0.093028] usbcore: registered new device driver usb
[    0.094003] clocksource: Switched to clocksource arch_sys_counter
[    0.915022] VFS: Disk quotas dquot_6.6.0
[    0.915100] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.915210] FS-Cache: Loaded
[    0.915391] CacheFiles: Loaded
[    0.915853] simple-framebuffer 3eaf0000.framebuffer: framebuffer at 0x3eaf0000, 0x10a800 bytes, mapped to 0x(ptrval)
[    0.915865] simple-framebuffer 3eaf0000.framebuffer: format=a8r8g8b8, mode=656x416x32, linelength=2624
[    0.918410] Console: switching to colour frame buffer device 82x26
[    0.920668] simple-framebuffer 3eaf0000.framebuffer: fb0: simplefb registered!
[    0.926384] NET: Registered protocol family 2
[    0.926558] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.927587] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.927621] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.927683] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.927782] TCP: Hash tables configured (established 8192 bind 8192)
[    0.927891] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.927923] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.928107] NET: Registered protocol family 1
[    0.928538] RPC: Registered named UNIX socket transport module.
[    0.928548] RPC: Registered udp transport module.
[    0.928556] RPC: Registered tcp transport module.
[    0.928565] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.974473] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.976719] Initialise system trusted keyrings
[    0.976905] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.981848] zbud: loaded
[    0.982871] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.983067] FS-Cache: Netfs 'nfs' registered for caching
[    0.983555] NFS: Registering the id_resolver key type
[    0.983581] Key type id_resolver registered
[    0.983590] Key type id_legacy registered
[    0.983690] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.983700] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.985282] aufs 5.10.82-20220117
[    0.985469] Key type asymmetric registered
[    0.985480] Asymmetric key parser 'x509' registered
[    0.985514] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.985525] io scheduler mq-deadline registered
[    0.985534] io scheduler kyber registered
[    0.990908] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.992374] bcm2835-rng 3f104000.rng: hwrng registered
[    0.992634] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.993254] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    0.999753] brd: module loaded
[    1.007461] loop: module loaded
[    1.007835] zram: Added device: zram0
[    1.008769] Loading iSCSI transport class v2.0-870.
[    1.009796] libphy: Fixed MDIO Bus: probed
[    1.009909] tun: Universal TUN/TAP device driver, 1.6
[    1.010025] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.210456] Core Release: 2.80a
[    1.210468] Setting default values for core params
[    1.210490] Finished setting default values for core params
[    1.410694] Using Buffer DMA mode
[    1.410704] Periodic Transfer Interrupt Enhancement - disabled
[    1.410713] Multiprocessor Interrupt Enhancement - disabled
[    1.410722] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.410740] Dedicated Tx FIFOs mode

[    1.410982] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = 93d04000 dma = 0xd3d04000 len=9024
[    1.411006] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    1.411017] dwc_otg: Microframe scheduler enabled

[    1.411057] WARN::hcd_init_fiq:457: FIQ on core 1

[    1.411068] WARN::hcd_init_fiq:458: FIQ ASM at 808c32a8 length 36

[    1.411080] WARN::hcd_init_fiq:496: MPHI regs_base at a4810000
[    1.411097] dwc_otg 3f980000.usb: DWC OTG Controller
[    1.411121] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.411152] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    1.411194] Init: Port Power? op_state=1
[    1.411202] Init: Power Port (0)
[    1.411390] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.411402] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.411411] usb usb1: Product: DWC OTG Controller
[    1.411421] usb usb1: Manufacturer: Linux 5.10.83-v7 dwc_otg_hcd
[    1.411431] usb usb1: SerialNumber: 3f980000.usb
[    1.411853] hub 1-0:1.0: USB hub found
[    1.411899] hub 1-0:1.0: 1 port detected
[    1.412698] dwc_otg: FIQ enabled
[    1.412704] dwc_otg: NAK holdoff enabled
[    1.412711] dwc_otg: FIQ split-transaction FSM enabled
[    1.412721] Module dwc_common_port init
[    1.412873] usbcore: registered new interface driver usb-storage
[    1.412943] usbcore: registered new interface driver usbserial_generic
[    1.412966] usbserial: USB Serial support registered for generic
[    1.413101] mousedev: PS/2 mouse device common for all mice
[    1.413844] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.414931] sdhci: Secure Digital Host Controller Interface driver
[    1.414941] sdhci: Copyright(c) Pierre Ossman
[    1.415387] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    1.415663] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.416169] ledtrig-cpu: registered to indicate activity on CPUs
[    1.416312] hid: raw HID events driver (C) Jiri Kosina
[    1.416409] usbcore: registered new interface driver usbhid
[    1.416418] usbhid: USB HID core driver
[    1.416647] ashmem: initialized
[    1.419839] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[    1.419876] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
[    1.420181] IPVS: ipvs loaded.
[    1.420886] Initializing XFRM netlink socket
[    1.421268] NET: Registered protocol family 10
[    1.422018] Segment Routing with IPv6
[    1.422095] NET: Registered protocol family 17
[    1.422133] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.422210] Key type dns_resolver registered
[    1.422338] Registering SWP/SWPB emulation handler
[    1.422444] registered taskstats version 1
[    1.422465] Loading compiled-in X.509 certificates
[    1.422891] Key type ._fscrypt registered
[    1.422901] Key type .fscrypt registered
[    1.422910] Key type fscrypt-provisioning registered
[    1.431117] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    1.431188] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    1.432894] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 86, base_baud = 50000000) is a 16550
[    1.433460] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.435085] sdhost: log_buf @ (ptrval) (d3d07000)
[    1.482754] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.503194] of_cfs_init
[    1.503300] of_cfs_init: OK
[    1.503954] Warning: unable to open an initial console.
[    1.516051] Freeing unused kernel memory: 8192K
[    1.516341] Run /init as init process
[    1.516350]   with arguments:
[    1.516355]     /init
[    1.516360]   with environment:
[    1.516366]     HOME=/
[    1.516371]     TERM=linux
[    1.534149] Indeed it is in host mode hprt0 = 00021501
[    1.628692] mmc0: new high speed MMC card at address 0001
[    1.629342] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[    1.629628] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[    1.629872] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[    1.630095] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB, chardev (246:0)
[    1.632452]  mmcblk0: p1 p2 p3 p4 < p5 p6 >
[    1.744087] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.744236] Indeed it is in host mode hprt0 = 00001101
[    1.984349] usb 1-1: New USB device found, idVendor=0424, idProduct=9512, bcdDevice= 2.00
[    1.984370] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.984843] hub 1-1:1.0: USB hub found
[    1.984919] hub 1-1:1.0: 3 ports detected
[    2.252869] zram0: detected capacity change from 0 to 289411072
[    2.304068] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.434448] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    2.434468] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.534118] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    2.668974] usb 1-1.2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[    2.668994] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.669005] usb 1-1.2: Product: CP2102N USB to UART Bridge Controller
[    2.669015] usb 1-1.2: Manufacturer: Silicon Labs
[    2.669025] usb 1-1.2: SerialNumber: 7a4039648986eb1191f233739693f7bc
[    4.218112] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.246601] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[    4.709834] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.752700] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[    5.028640] systemd[1]: System time before build time, advancing clock.
[    5.464721] systemd[1]: /lib/systemd/system/balena-host.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-host.sock → /run/balena-host.sock; please update the unit file accordingly.
[    5.495622] systemd[1]: /lib/systemd/system/balena-engine.socket:7: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-engine.sock → /run/balena-engine.sock; please update the unit file accordingly.
[    5.760259] systemd[1]: /lib/systemd/system/plymouth-start.service:17: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    5.826460] random: systemd: uninitialized urandom read (16 bytes read)
[    5.861777] random: systemd: uninitialized urandom read (16 bytes read)
[    5.863981] random: systemd: uninitialized urandom read (16 bytes read)
[    5.976621] fuse: init (API version 7.32)
[    7.227965] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    7.229477] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    7.229494] [vc_sm_connected_init]: start
[    7.238920] mc: Linux media interface: v0.10
[    7.241569] [vc_sm_connected_init]: installed successfully
[    7.277961] videodev: Linux video capture interface: v2.00
[    7.312486] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.312490] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.313878] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.320853] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    7.323522] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    7.325095] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    7.325393] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    7.325680] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    7.325996] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    7.326018] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    7.326032] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    7.326043] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    7.326054] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    7.333743] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    7.333867] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    7.336995] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    7.337589] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    7.338824] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    7.338853] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    7.338868] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    7.338881] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    7.338903] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    7.339064] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    7.340345] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    7.340382] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    7.342366] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    7.342400] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    7.346235] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    7.346274] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    7.348240] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    7.348272] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    7.556083] usbcore: registered new interface driver cp210x
[    7.556147] usbserial: USB Serial support registered for cp210x
[    7.556256] cp210x 1-1.2:1.0: cp210x converter detected
[    7.559806] i2c i2c-11: Added multiplexed i2c bus 0
[    7.559964] i2c i2c-11: Added multiplexed i2c bus 10
[    7.563044] usb 1-1.2: cp210x converter now attached to ttyUSB0
[    7.565808] checking generic (3eaf0000 10a800) vs hw (0 ffffffff)
[    7.565825] fb0: switching to vc4drmfb from simple
[    7.566286] Console: switching to colour dummy device 80x30
[    7.567415] vc4-drm soc:gpu: bound 3f600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    7.567582] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    7.579277] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    7.621399] smsc95xx v2.0.0
[    7.622584] Console: switching to colour frame buffer device 90x30
[    7.636163] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[    7.697342] libphy: smsc95xx-mdiobus: probed
[    7.698381] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:cd:33:52
[    7.698605] usbcore: registered new interface driver smsc95xx
[    7.810609] zram: Can't change algorithm for initialized device
[    9.014188] Adding 282624k swap on /dev/zram0.  Priority:-2 extents:1 across:282624k SSFS
[    9.244105] random: crng init done
[    9.244120] random: 7 urandom warning(s) missed due to ratelimiting
[   11.591107] i2c /dev entries driver
[   13.346298] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=usb-001:003:01, irq=POLL)
[   13.346647] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   13.366440] smsc95xx 1-1.1:1.0 eth0: Link is Down
[   14.136561] uart-pl011 3f201000.serial: no DMA platform data
[   15.434841] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[   15.434881] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   32.094170] Bridge firewalling registered
[   34.544532] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   34.544552] br-480700d9dde5: port 1(vethfd1ea41) entered disabled state
[   34.545012] device vethfd1ea41 entered promiscuous mode
[   34.545650] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   34.545662] br-480700d9dde5: port 1(vethfd1ea41) entered forwarding state
[   34.545849] br-480700d9dde5: port 1(vethfd1ea41) entered disabled state
[   34.729721] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   34.729736] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[   34.729983] device veth5020a07 entered promiscuous mode
[   34.730837] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   34.730850] br-480700d9dde5: port 2(veth5020a07) entered forwarding state
[   34.731053] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[   35.908536] cgroup: cgroup: disabling cgroup2 socket matching due to net_prio or net_cls activation
[   37.978479] eth0: renamed from veth12ce86b
[   38.024634] IPv6: ADDRCONF(NETDEV_CHANGE): vethfd1ea41: link becomes ready
[   38.024832] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   38.024845] br-480700d9dde5: port 1(vethfd1ea41) entered forwarding state
[   38.025005] IPv6: ADDRCONF(NETDEV_CHANGE): br-480700d9dde5: link becomes ready
[   39.427804] eth0: renamed from veth8febdd4
[   39.477120] IPv6: ADDRCONF(NETDEV_CHANGE): veth5020a07: link becomes ready
[   39.477289] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   39.477298] br-480700d9dde5: port 2(veth5020a07) entered forwarding state
[   56.326815] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[63652.693661] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63652.694112] veth8febdd4: renamed from eth0
[63652.842827] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63652.844920] device veth5020a07 left promiscuous mode
[63652.844940] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63657.982178] br-480700d9dde5: port 2(vethb8f1764) entered blocking state
[63657.982199] br-480700d9dde5: port 2(vethb8f1764) entered disabled state
[63657.982523] device vethb8f1764 entered promiscuous mode
[63659.973946] eth0: renamed from veth69089d8
[63660.013989] IPv6: ADDRCONF(NETDEV_CHANGE): vethb8f1764: link becomes ready
[63660.014176] br-480700d9dde5: port 2(vethb8f1764) entered blocking state
[63660.014187] br-480700d9dde5: port 2(vethb8f1764) entered forwarding state

tried building with the example you’ve given to me. but it wasnt able to detect the camera either.

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.83-v7 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721) #1 SMP Tue Dec 7 13:42:57 UTC 2021
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 3 Plus Rev 1.0
[    0.000000] random: fast init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x13c00000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000023ffffff]
[    0.000000] On node 0 totalpages: 147456
[    0.000000]   DMA zone: 1296 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 147456 pages, LIFO batch:31
[    0.000000] percpu: Embedded 20 pages/cpu s51212 r8192 d22516 u81920
[    0.000000] pcpu-alloc: s51212 r8192 d22516 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 146160
[    0.000000] Kernel command line: coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 8250.nr_uarts=1 video=Composite-1:720x480@60i,margin_left=32,margin_right=32,margin_top=32,margin_bottom=32 smsc95xx.macaddr=B8:27:EB:CD:33:52 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait dwc_otg.lpm_enable=0 rootwait vt.global_cursor_default=0 console=null cgroup_enable=memory root=UUID=ba1eadef-0235-40ac-99c5-63159eb18640 rootwait
[    0.000000] cgroup: Enabling memory control group subsystem
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 294920K/589824K available (11264K kernel code, 1369K rwdata, 3292K rodata, 8192K init, 896K bss, 32760K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 35860 entries in 106 pages
[    0.000000] ftrace: allocated 106 pages with 4 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x3b0/0x598 with crng_init=1
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000004] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000014] Switching to timer-based delay loop, resolution 52ns
[    0.000175] Console: colour dummy device 80x30
[    0.000217] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000236] pid_max: default: 32768 minimum: 301
[    0.000342] LSM: Security Framework initializing
[    0.000484] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.000499] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001229] CPU: Testing write buffer coherency: ok
[    0.001528] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002193] Setting up static identity map for 0x100000 - 0x100060
[    0.002293] rcu: Hierarchical SRCU implementation.
[    0.002807] smp: Bringing up secondary CPUs ...
[    0.003494] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004455] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.005323] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.005603] smp: Brought up 1 node, 4 CPUs
[    0.005625] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.005634] CPU: All CPU(s) started in HYP mode.
[    0.005642] CPU: Virtualization extensions available.
[    0.006185] devtmpfs: initialized
[    0.014902] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.015140] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015160] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.021115] pinctrl core: initialized pinctrl subsystem
[    0.021807] NET: Registered protocol family 16
[    0.023968] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.026943] audit: initializing netlink subsys (disabled)
[    0.027106] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.027473] thermal_sys: Registered thermal governor 'step_wise'
[    0.027782] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.027796] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.027955] Serial: AMBA PL011 UART driver
[    0.038734] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.050077] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-01-20T13:59:16, variant start_x
[    0.060092] raspberrypi-firmware soc:firmware: Firmware hash is bd88f66f8952d34e4e0613a85c7a6d3da49e13e2
[    0.087631] Kprobes globally optimized
[    0.091599] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
[    0.092797] SCSI subsystem initialized
[    0.092946] usbcore: registered new interface driver usbfs
[    0.092989] usbcore: registered new interface driver hub
[    0.093028] usbcore: registered new device driver usb
[    0.094003] clocksource: Switched to clocksource arch_sys_counter
[    0.915022] VFS: Disk quotas dquot_6.6.0
[    0.915100] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.915210] FS-Cache: Loaded
[    0.915391] CacheFiles: Loaded
[    0.915853] simple-framebuffer 3eaf0000.framebuffer: framebuffer at 0x3eaf0000, 0x10a800 bytes, mapped to 0x(ptrval)
[    0.915865] simple-framebuffer 3eaf0000.framebuffer: format=a8r8g8b8, mode=656x416x32, linelength=2624
[    0.918410] Console: switching to colour frame buffer device 82x26
[    0.920668] simple-framebuffer 3eaf0000.framebuffer: fb0: simplefb registered!
[    0.926384] NET: Registered protocol family 2
[    0.926558] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.927587] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.927621] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.927683] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.927782] TCP: Hash tables configured (established 8192 bind 8192)
[    0.927891] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.927923] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.928107] NET: Registered protocol family 1
[    0.928538] RPC: Registered named UNIX socket transport module.
[    0.928548] RPC: Registered udp transport module.
[    0.928556] RPC: Registered tcp transport module.
[    0.928565] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.974473] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[    0.976719] Initialise system trusted keyrings
[    0.976905] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.981848] zbud: loaded
[    0.982871] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.983067] FS-Cache: Netfs 'nfs' registered for caching
[    0.983555] NFS: Registering the id_resolver key type
[    0.983581] Key type id_resolver registered
[    0.983590] Key type id_legacy registered
[    0.983690] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.983700] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.985282] aufs 5.10.82-20220117
[    0.985469] Key type asymmetric registered
[    0.985480] Asymmetric key parser 'x509' registered
[    0.985514] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.985525] io scheduler mq-deadline registered
[    0.985534] io scheduler kyber registered
[    0.990908] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.992374] bcm2835-rng 3f104000.rng: hwrng registered
[    0.992634] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    0.993254] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    0.999753] brd: module loaded
[    1.007461] loop: module loaded
[    1.007835] zram: Added device: zram0
[    1.008769] Loading iSCSI transport class v2.0-870.
[    1.009796] libphy: Fixed MDIO Bus: probed
[    1.009909] tun: Universal TUN/TAP device driver, 1.6
[    1.010025] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.210456] Core Release: 2.80a
[    1.210468] Setting default values for core params
[    1.210490] Finished setting default values for core params
[    1.410694] Using Buffer DMA mode
[    1.410704] Periodic Transfer Interrupt Enhancement - disabled
[    1.410713] Multiprocessor Interrupt Enhancement - disabled
[    1.410722] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.410740] Dedicated Tx FIFOs mode

[    1.410982] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = 93d04000 dma = 0xd3d04000 len=9024
[    1.411006] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    1.411017] dwc_otg: Microframe scheduler enabled

[    1.411057] WARN::hcd_init_fiq:457: FIQ on core 1

[    1.411068] WARN::hcd_init_fiq:458: FIQ ASM at 808c32a8 length 36

[    1.411080] WARN::hcd_init_fiq:496: MPHI regs_base at a4810000
[    1.411097] dwc_otg 3f980000.usb: DWC OTG Controller
[    1.411121] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.411152] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    1.411194] Init: Port Power? op_state=1
[    1.411202] Init: Power Port (0)
[    1.411390] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.411402] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.411411] usb usb1: Product: DWC OTG Controller
[    1.411421] usb usb1: Manufacturer: Linux 5.10.83-v7 dwc_otg_hcd
[    1.411431] usb usb1: SerialNumber: 3f980000.usb
[    1.411853] hub 1-0:1.0: USB hub found
[    1.411899] hub 1-0:1.0: 1 port detected
[    1.412698] dwc_otg: FIQ enabled
[    1.412704] dwc_otg: NAK holdoff enabled
[    1.412711] dwc_otg: FIQ split-transaction FSM enabled
[    1.412721] Module dwc_common_port init
[    1.412873] usbcore: registered new interface driver usb-storage
[    1.412943] usbcore: registered new interface driver usbserial_generic
[    1.412966] usbserial: USB Serial support registered for generic
[    1.413101] mousedev: PS/2 mouse device common for all mice
[    1.413844] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.414931] sdhci: Secure Digital Host Controller Interface driver
[    1.414941] sdhci: Copyright(c) Pierre Ossman
[    1.415387] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    1.415663] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.416169] ledtrig-cpu: registered to indicate activity on CPUs
[    1.416312] hid: raw HID events driver (C) Jiri Kosina
[    1.416409] usbcore: registered new interface driver usbhid
[    1.416418] usbhid: USB HID core driver
[    1.416647] ashmem: initialized
[    1.419839] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[    1.419876] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
[    1.420181] IPVS: ipvs loaded.
[    1.420886] Initializing XFRM netlink socket
[    1.421268] NET: Registered protocol family 10
[    1.422018] Segment Routing with IPv6
[    1.422095] NET: Registered protocol family 17
[    1.422133] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.422210] Key type dns_resolver registered
[    1.422338] Registering SWP/SWPB emulation handler
[    1.422444] registered taskstats version 1
[    1.422465] Loading compiled-in X.509 certificates
[    1.422891] Key type ._fscrypt registered
[    1.422901] Key type .fscrypt registered
[    1.422910] Key type fscrypt-provisioning registered
[    1.431117] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    1.431188] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
[    1.432894] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 86, base_baud = 50000000) is a 16550
[    1.433460] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.435085] sdhost: log_buf @ (ptrval) (d3d07000)
[    1.482754] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.503194] of_cfs_init
[    1.503300] of_cfs_init: OK
[    1.503954] Warning: unable to open an initial console.
[    1.516051] Freeing unused kernel memory: 8192K
[    1.516341] Run /init as init process
[    1.516350]   with arguments:
[    1.516355]     /init
[    1.516360]   with environment:
[    1.516366]     HOME=/
[    1.516371]     TERM=linux
[    1.534149] Indeed it is in host mode hprt0 = 00021501
[    1.628692] mmc0: new high speed MMC card at address 0001
[    1.629342] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[    1.629628] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[    1.629872] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[    1.630095] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB, chardev (246:0)
[    1.632452]  mmcblk0: p1 p2 p3 p4 < p5 p6 >
[    1.744087] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.744236] Indeed it is in host mode hprt0 = 00001101
[    1.984349] usb 1-1: New USB device found, idVendor=0424, idProduct=9512, bcdDevice= 2.00
[    1.984370] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.984843] hub 1-1:1.0: USB hub found
[    1.984919] hub 1-1:1.0: 3 ports detected
[    2.252869] zram0: detected capacity change from 0 to 289411072
[    2.304068] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    2.434448] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    2.434468] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.534118] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    2.668974] usb 1-1.2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[    2.668994] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.669005] usb 1-1.2: Product: CP2102N USB to UART Bridge Controller
[    2.669015] usb 1-1.2: Manufacturer: Silicon Labs
[    2.669025] usb 1-1.2: SerialNumber: 7a4039648986eb1191f233739693f7bc
[    4.218112] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.246601] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[    4.709834] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    4.752700] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[    5.028640] systemd[1]: System time before build time, advancing clock.
[    5.464721] systemd[1]: /lib/systemd/system/balena-host.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-host.sock → /run/balena-host.sock; please update the unit file accordingly.
[    5.495622] systemd[1]: /lib/systemd/system/balena-engine.socket:7: ListenStream= references a path below legacy directory /var/run/, updating /var/run/balena-engine.sock → /run/balena-engine.sock; please update the unit file accordingly.
[    5.760259] systemd[1]: /lib/systemd/system/plymouth-start.service:17: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    5.826460] random: systemd: uninitialized urandom read (16 bytes read)
[    5.861777] random: systemd: uninitialized urandom read (16 bytes read)
[    5.863981] random: systemd: uninitialized urandom read (16 bytes read)
[    5.976621] fuse: init (API version 7.32)
[    7.227965] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    7.229477] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    7.229494] [vc_sm_connected_init]: start
[    7.238920] mc: Linux media interface: v0.10
[    7.241569] [vc_sm_connected_init]: installed successfully
[    7.277961] videodev: Linux video capture interface: v2.00
[    7.312486] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.312490] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.313878] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.320853] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    7.323522] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    7.325095] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    7.325393] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    7.325680] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    7.325996] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    7.326018] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    7.326032] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    7.326043] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    7.326054] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    7.333743] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    7.333867] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    7.336995] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    7.337589] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    7.338824] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    7.338853] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    7.338868] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    7.338881] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    7.338903] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    7.339064] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    7.340345] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    7.340382] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    7.342366] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    7.342400] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    7.346235] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    7.346274] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    7.348240] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    7.348272] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    7.556083] usbcore: registered new interface driver cp210x
[    7.556147] usbserial: USB Serial support registered for cp210x
[    7.556256] cp210x 1-1.2:1.0: cp210x converter detected
[    7.559806] i2c i2c-11: Added multiplexed i2c bus 0
[    7.559964] i2c i2c-11: Added multiplexed i2c bus 10
[    7.563044] usb 1-1.2: cp210x converter now attached to ttyUSB0
[    7.565808] checking generic (3eaf0000 10a800) vs hw (0 ffffffff)
[    7.565825] fb0: switching to vc4drmfb from simple
[    7.566286] Console: switching to colour dummy device 80x30
[    7.567415] vc4-drm soc:gpu: bound 3f600000.firmwarekms (ops vc4_fkms_ops [vc4])
[    7.567582] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    7.579277] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[    7.621399] smsc95xx v2.0.0
[    7.622584] Console: switching to colour frame buffer device 90x30
[    7.636163] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[    7.697342] libphy: smsc95xx-mdiobus: probed
[    7.698381] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:cd:33:52
[    7.698605] usbcore: registered new interface driver smsc95xx
[    7.810609] zram: Can't change algorithm for initialized device
[    9.014188] Adding 282624k swap on /dev/zram0.  Priority:-2 extents:1 across:282624k SSFS
[    9.244105] random: crng init done
[    9.244120] random: 7 urandom warning(s) missed due to ratelimiting
[   11.591107] i2c /dev entries driver
[   13.346298] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=usb-001:003:01, irq=POLL)
[   13.346647] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   13.366440] smsc95xx 1-1.1:1.0 eth0: Link is Down
[   14.136561] uart-pl011 3f201000.serial: no DMA platform data
[   15.434841] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[   15.434881] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   32.094170] Bridge firewalling registered
[   34.544532] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   34.544552] br-480700d9dde5: port 1(vethfd1ea41) entered disabled state
[   34.545012] device vethfd1ea41 entered promiscuous mode
[   34.545650] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   34.545662] br-480700d9dde5: port 1(vethfd1ea41) entered forwarding state
[   34.545849] br-480700d9dde5: port 1(vethfd1ea41) entered disabled state
[   34.729721] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   34.729736] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[   34.729983] device veth5020a07 entered promiscuous mode
[   34.730837] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   34.730850] br-480700d9dde5: port 2(veth5020a07) entered forwarding state
[   34.731053] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[   35.908536] cgroup: cgroup: disabling cgroup2 socket matching due to net_prio or net_cls activation
[   37.978479] eth0: renamed from veth12ce86b
[   38.024634] IPv6: ADDRCONF(NETDEV_CHANGE): vethfd1ea41: link becomes ready
[   38.024832] br-480700d9dde5: port 1(vethfd1ea41) entered blocking state
[   38.024845] br-480700d9dde5: port 1(vethfd1ea41) entered forwarding state
[   38.025005] IPv6: ADDRCONF(NETDEV_CHANGE): br-480700d9dde5: link becomes ready
[   39.427804] eth0: renamed from veth8febdd4
[   39.477120] IPv6: ADDRCONF(NETDEV_CHANGE): veth5020a07: link becomes ready
[   39.477289] br-480700d9dde5: port 2(veth5020a07) entered blocking state
[   39.477298] br-480700d9dde5: port 2(veth5020a07) entered forwarding state
[   56.326815] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
[63652.693661] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63652.694112] veth8febdd4: renamed from eth0
[63652.842827] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63652.844920] device veth5020a07 left promiscuous mode
[63652.844940] br-480700d9dde5: port 2(veth5020a07) entered disabled state
[63657.982178] br-480700d9dde5: port 2(vethb8f1764) entered blocking state
[63657.982199] br-480700d9dde5: port 2(vethb8f1764) entered disabled state
[63657.982523] device vethb8f1764 entered promiscuous mode
[63659.973946] eth0: renamed from veth69089d8
[63660.013989] IPv6: ADDRCONF(NETDEV_CHANGE): vethb8f1764: link becomes ready
[63660.014176] br-480700d9dde5: port 2(vethb8f1764) entered blocking state
[63660.014187] br-480700d9dde5: port 2(vethb8f1764) entered forwarding state
[68167.823153] br-480700d9dde5: port 2(vethb8f1764) entered disabled state
[68167.823751] veth69089d8: renamed from eth0
[68167.987040] br-480700d9dde5: port 2(vethb8f1764) entered disabled state
[68167.989362] device vethb8f1764 left promiscuous mode
[68167.989388] br-480700d9dde5: port 2(vethb8f1764) entered disabled state
[68315.125832] br-480700d9dde5: port 2(vethfbadba5) entered blocking state
[68315.125855] br-480700d9dde5: port 2(vethfbadba5) entered disabled state
[68315.126163] device vethfbadba5 entered promiscuous mode
[68316.713694] eth0: renamed from vethb8e0a81
[68316.798272] IPv6: ADDRCONF(NETDEV_CHANGE): vethfbadba5: link becomes ready
[68316.798439] br-480700d9dde5: port 2(vethfbadba5) entered blocking state
[68316.798451] br-480700d9dde5: port 2(vethfbadba5) entered forwarding state

@kayige what example are you trying to run?

Could you please confirm the device you are using, the camera model plus the OS version? I will try to reproduce! Thanks!

i’m using a Raspberry pi 3 B+ Rev 1.0, Linux version 5.10.83-v7 (oe-user@oe-host) (arm-poky-linux-gnueabi-gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37.20210721)

Running HostOS Version: balenaOS 2.94.4

Hi @kayyige

The issue may be related to Pi3B+ running 64bit OS.

Can you go to the Device configuration tab on your device and tell me what the contents of Define DT overlays is? Or just share a screenshot of all the variables which are defined for the fleet or device

Thanks, Ramiro

Hi @ramirogm,

I’m currently running on Pi3B+ with HostOS thats 32bit though.
Here’s the device configuration and custom configuration screenshots.


so far i’ve managed to build the docker images on balenalib images.
balenalib/raspberrypi3-debian:stretch
but haven’t made any progress as to getting vcgencmd get_camera to detect the legacy camera on the container.

I cannot tell from your screenshot. Does

your dt-overlays contains vc4-fkms-v3d if so can you change it to vc4-kms-v3d (or add vc4-kms-v3d if there’s none).

yup it does have vc4-kms-v3d its set in my fleet configuration.

Not sure if this helps, tried a raspistill -v -o out.png

checked the HostOS container config.txt to confirm i have the vc4-kms-v3d

core_freq=400
force_turbo=1
gpu_mem_1024=448
gpu_mem_256=192
gpu_mem_512=256
start_x=1
test_cfg={"test":true}
dtoverlay=i2c1,pins_44_45
dtoverlay=disable-bt
dtoverlay=uart1,txd1_pin=14,rxd1_pin=15
dtoverlay=spi0-1cs
dtoverlay=vc4-kms-v3d
dtparam=i2c_vc=on
dtparam=watchdog=on
enable_uart=1
avoid_warnings=1
disable_splash=1

@aethernet @ramirogm after a week of testing it seems that the balena images are missing the dt-blob.bin inside the /boot directory on the HostOS.

Copying that into the HostOS resolves vcgencmd get_camera, its now able to detect the pi camera inside the camera container.
However I’m left with figuring out the mmal issue where the camera component could not be created.

Hi @kayige

Glad to hear that you’re making progress. One comment, the actual boot files are at /mnt/boot. Here’s a reference about that BalenaOS Masterclass - Balena Documentation

In that folder, you may have a dt-blob.bin file ( depending on the device ) along with others. For example cat /mnt/boot/config.txt which I think is the one you posted above.

About the mmal error, was any other container running at the same time that could have grabbed the camera?

Ramiro

@ramirogm i do have a log container running together with the camera one. tried to deploy with just the log container to see if there’s conflicts but still have the same set of mmal errors.

mmal_vc_shm_init: could not initialize vc shared memory service mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO) mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7) mmal: Failed to create camera_info component

Hi @kayige

It looks like the error is different now, it’s 7:EIO instead of 1:ENOMEM, so I’d like to understand what changed.

Could you share your docker-compose file? It would help us to understand the whole setup you have and try to find the issue. It would be useful also to have the last dmesg output when you get that error.

Thanks
Ramiro

@ramirogm i’ve managed to resolve the issue and got the legacy camera to work.

the 2 key points were,

  1. HostOS requires the dt-blob.bin in /mnt/boot for camera detection.
  2. Docker build requires a copy of the original /opt/vc during the build process. This is because libmmal requires the header files and the lib files to work properly.
1 Like

@kayige Thanks for letting us know how you resolved the issue and got the legacy camera to work. We’ll look at this in more detail and see if we can add this to one of our examples in case others are looking for the same.