I have it now that it recognizes the camera.
vi-output, imx477 7-001a (platform:54080000.vi:0):
/dev/video0
v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx477 7-001a
Bus info : platform:54080000.vi:0
Driver version: 4.9.253
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: no power)
Format Video Capture:
Width/Height : 3840/2160
Pixel Format : 'RG10'
Field : None
Bytes per Line : 7680
Size Image : 16588800
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Camera Controls
group_hold 0x009a2003 (bool) : default=0 value=0 flags=execute-on-write
sensor_mode 0x009a2008 (int64) : min=0 max=0 step=0 default=0 value=0 flags=slider
gain 0x009a2009 (int64) : min=0 max=0 step=0 default=0 value=16 flags=slider
exposure 0x009a200a (int64) : min=0 max=0 step=0 default=0 value=13 flags=slider
frame_rate 0x009a200b (int64) : min=0 max=0 step=0 default=0 value=2000000 flags=slider
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (bool) : default=0 value=0
sensor_signal_properties 0x009a2069 (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=3 flags=read-only
I did this with the following steps:
downloaded deb file from this list https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/imx477_links.txt
unpacked deb file ar x {name}.deb
inside the deb file there is a data tar. I unpacked it and copied everything to a jetson with regular OS.
Then I copied the files to the sd card according to the directory structure.
there is a file called control/postinst
which can be executed:
#!/bin/bash
# set -x
RED='\033[0;31m'
NC='\033[0m' # No Color
pushd /boot/extlinux &> /dev/null
EXTLINUX=$(ls extlinux.conf)
if [ -n "${EXTLINUX}" ]; then
if [ ! -e ${EXTLINUX}_bak ]; then
cp ${EXTLINUX} ${EXTLINUX}_bak
fi
cp /boot/arducam/extlinux.conf ${EXTLINUX}
popd &> /dev/null
fi
pushd /boot &> /dev/null
IMAGE=$(ls Image)
if [ -n "${IMAGE}" ]; then
if [ ! -e ${IMAGE}.bak ]; then
cp ${IMAGE} ${IMAGE}.bak
fi
popd &> /dev/null
fi
result=$(sudo /opt/arducam/jetson-io/config-by-hardware.py --list | grep -E "Header\s*([0-9]+).*Jetson Nano CSI Connector")
regex="Header\s*([0-9]+)?.*:\s*Jetson Nano CSI Connector"
headerNumber=2
if [[ $result =~ $regex ]]
then
headerNumber=${BASH_REMATCH[1]}
else
echo "Jetson Nano CSI Connector not found."
sudo /opt/arducam/jetson-io/config-by-hardware.py --list
fi
echo $headerNumber
/opt/arducam/jetson-io/config-by-hardware.py -n $headerNumber="Camera IMX477 Dual" &> /dev/null
if [ $? -ne 0 ]; then
/opt/arducam/jetson-io/config-by-hardware.py -n $headerNumber="Camera IMX477" &> /dev/null
if [ $? -ne 0 ]; then
echo ""
echo -e "${RED}An unknown error occurred while installing dtoverlays.${NC}"
exit -1
fi
fi
exit 0
Or you can run te jetson-io UI:
I executed sudo /opt/adrucam/jetson-io/jetson-io.py
which shows the menu. I installed the drivers. It generated a custom dtb file inside /boot/arducam
and set this in set it in extlinux.conf
as FDT /boot/tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb
on BalenaOS 2.103.2
dockerfile is jetson-examples/Dockerfile at master · balena-io-examples/jetson-examples · GitHub
docker-compose:
version: '2'
volumes:
resin-data: { }
services:
demo:
hostname: "demo"
build: ./
user: root
privileged: true
cap_add:
- SYS_RAWIO
environment:
- UDEV=1
expose:
- 19912
devices:
- "/dev:/dev"
labels:
io.balena.features.sysfs: '1'
io.balena.features.kernel-modules: '1'
io.balena.features.firmware: '1'
io.balena.features.supervisor-api: '1'
io.balena.features.balena-api: '1'
io.balena.features.dbus: '1'
export DISPLAY=:0.0
jetson_clocks
nvargus-daemon &
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v
libEGL warning: DRI2: failed to authenticate
=== NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== nvgstcapture[3258]: Connection established (7F666EF1D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
NvPclHwScanExternalCameras: Failed to stat '/dev//log'; No such file or directory
NvPclHwScanExternalCameras: Failed to stat '/dev//initctl'; No such file or directory
NvPclHwScanExternalCameras: Failed to stat '/dev//log'; No such file or directory
NvPclHwScanExternalCameras: Failed to stat '/dev//initctl'; No such file or directory
NvPclHwScanExternalCameras: Failed to stat '/dev//log'; No such file or directory
NvPclHwScanExternalCameras: Failed to stat '/dev//initctl'; No such file or directory
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 593)
SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 305)
SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 471)
Acquiring SCF Camera device source via index 1 has failed. === nvgstcapture[3258]: CameraProvider initialized (0x7f5094cc90)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
(Argus) Error NotSupported: Failed to get function:eglCreateStreamKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
(Argus) Error NotSupported: Failed to get function:eglDestroyStreamKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
(Argus) Error NotSupported: Failed to get function:eglQueryStreamKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
(Argus) Error NotSupported: Failed to get function:eglStreamAttribKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
(Argus) Error NotSupported: Failed to get function:eglGetStreamFileDescriptorKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
(Argus) Error NotSupported: Failed to get function:eglCreateStreamFromFileDescriptorKHR
(in src/eglutils/EGLUtils.cpp, function ext(), line 199)
Segmentation fault (core dumped