NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Raspberrypi camera in NetBSD



On Fri, 2024-09-13 at 20:43 +0200, Ramiro Aceves wrote:
> Hello,
> 
> Do you have some hints on how to make the raspberrypi camera work
> (if 
> possible) on NetBSD? I have a RaspberrypiZeroW with NetBSD running
> fine 
> but the only information I have found in internet about the camera is
> 
> http://mail-index.netbsd.org/port-arm/2024/06/24/msg008778.html
> 
> and
> 
> http://mail-index.netbsd.org/current-users/2021/11/16/msg041683.html
> 
> but it is not enough for me to make it work. I have connected it to
> the 
> Pi but I do not see any clues on dmesg. Not sure if a module must be 
> loaded.
> 
> 
> Thanks so much.
> Ramiro.
> 

Hi Ramiro,

I have a camera on a plain Raspberry pi B running at present. It's on
9.99.92 which pre-dates 10.0 but this should work OK.

The most important thing is to make sure you have start_x.elf and
fixup_x.elf in the boot directory. NetBSD didn't normally ship with
these so you may have to pull them off a linux distro. 

my /boot contains:

LICENCE.broadcom
bootcode.bin
cmdline.txt
config.txt
dtb
fixup.dat
fixup_cd.dat
fixup_db.dat
fixup_x.dat
kernel.img
kernel7.img
start.elf
start_cd.elf
start_db.elf
start_x.elf

and config.txt contains:

upstream_kernel=1
os_prefix=dtb/
cmdline=../cmdline.txt
# UART settings, see 
https://www.raspberrypi.org/documentation/configuration/uart.md
enable_uart=1
force_turbo=0
start_x=1
gpu_mem=128
disable_camera_led=1
# Default kernel for BCM2836 and later
kernel=/kernel7.img
# Override kernel for BCM2835 based boards
[pi0]
kernel=/kernel.img
[pi0w]
kernel=/kernel.img
[pi1]
kernel=/kernel.img
[all]

The start_x=1 means the rpi loads the Broadcom microcode supporting the
camera.

I have a simple script to grab a snapshot and ftp it to a server:

#!/bin/ksh
while (( 1 ))
do
raspistill -n -w 960 -h 720 -q 100 -e png -mm matrix -th none -ss 5000
-o /var/shm/garden.png
scp -q -oport=222 /var/shm/garden.png user%host.org.uk@localhost:/WWW/garden.png
sleep 300
done

The camera does not appear in the dmesg as its handled by the Broadcom
chip rather than the arm cpu

HTH,
Dave


Home | Main Index | Thread Index | Old Index