I am trying to get the tx2 dev board camera to work. I have looked in this forum on how to do this and looked in the nvidia linux jetson developer guide but the guide is pretty confusing for someone without a deep linux background. I have the TX2 connected to an elroy board and I connected the ov5693 dev kit camera directly to the elroy.
Here’s what I did:
Running gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.145354857
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 340)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
(Argus) Error EndOfFile: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error EndOfFile: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 87)
I checked for the driver using dmesg | grep ov5693 and I got nothing.
Then I installed the linux sources from:
https://developer.nvidia.com/embedded/L4T/r32_Release_v4.4/r32_Release_v4.4-GMC3/Sources/T186/public_sources.tbz2
tar -xjf public_sources.tbz2
cd Linux_for_Tegra/source/public
tar –xjf kernel_src.tbz2
sudo apt install build-essential bc
TEGRA_KERNEL_OUT=/home/me/kernel_out
Then I create the .config file:
cd <kernel_source>
where kernel_source is ~/Downloads/Linux_for_Tegra/source/public/kernel_src/kernel/kernel-4.9
mkdir -p $TEGRA_KERNEL_OUT
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
then I don’t wanna build the whole kernel. I just wanna build the driver as an external module. I go to:
/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
and I look for CONFIG_VIDEO_OV5693=m and it is there with a bunch of other configs. So I change nothing and close the file. I probably didn’t need this step anyway.
Then:
make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2 modules_prepare
Now I go to where the driver file for the sensor is located at:
~/Downloads/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/media/i2c/ov5693.c
and I execute:
make ARCH=arm64 –C $TEGRA_KERNEL_OUT M=$(pwd)
and I get:
make: *** No rule to make target '–C'. Stop.
This is the makefile in the same directory:
subdir-ccflags-y += -Werror
ccflags-y += -I$(srctree)/drivers/media/platform/tegra
ccflags-y += -I$(srctree)/drivers/video/tegra/camera
obj-$(CONFIG_VIDEO_IMX185) += imx185.o
obj-$(CONFIG_VIDEO_IMX185) += imx185_v1.o
obj-$(CONFIG_VIDEO_IMX477) += imx477.o
obj-$(CONFIG_VIDEO_IMX219) += imx219.o
obj-$(CONFIG_VIDEO_IMX268) += imx268.o
obj-$(CONFIG_VIDEO_IMX274) += imx274.o
obj-$(CONFIG_VIDEO_IMX318) += imx318.o
obj-$(CONFIG_VIDEO_LC898212) += lc898212.o
obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
obj-$(CONFIG_VIDEO_OV9281) += ov9281.o
obj-$(CONFIG_VIDEO_OV10823) += ov10823.o
obj-$(CONFIG_VIDEO_OV23850) += ov23850.o
obj-$(CONFIG_I2C_IOEXPANDER_PCA9570) += pca9570.o
obj-$(CONFIG_VIDEO_TC358840) += tc358840.o
obj-$(CONFIG_I2C_IOEXPANDER_SER_MAX9295) += max9295.o
obj-$(CONFIG_I2C_IOEXPANDER_DESER_MAX9296) += max9296.o
obj-$(CONFIG_VIDEO_IMX390) += imx390.o
so I try the Kbuildmethod from eudyptula challenge - I'm unable to build the simple hello world kernel module from kernel 5.10.11 - Stack Overflow
I created a file named Kbuild in the same directory as ov5693.c with the following line:
obj-m += ov5693.o
then:
sudo make -C /lib/modules/$(uname -r)/build M=$(pwd)
I used sudo because I got permission denied somewhere.
Anyway it builds a bunch of files in that directory: here’s the output of ls:
built-in.o imx390.c ov23850.c
imx185.c imx390_mode_tbls.h ov23850_mode_tbls.h
imx185_mode_tbls.h imx477.c ov5693.c
imx185_v1.c imx477_mode_tbls.h ov5693.ko
imx185_v1_mode_tbls.h Kbuild ov5693.mod.c
imx214.c Kconfig ov5693_mode_tbls.h
imx219.c lc898212.c ov5693.mod.o
imx219_mode_tbls.h Makefile ov5693.o
imx268.c max9295.c ov9281.c
imx268_mode_tbls.h max9296.c ov9281_mode_tbls.h
imx274.c modules.order pca9570.c
imx274_mode_tbls.h Module.symvers tc358840.c
imx318.c ov10823.c tc358840_regs.h
imx318_mode_tbls.h ov10823_mode_tbls.h
so I get the ov5693.ko file.
then in the same directory I execute:
sudo insmod ov5693.ko
then dmesg | grep ov5693 returns nothing.
I run the command again and I get:
insmod: ERROR: could not insert module ov5693.ko: File exists
then I tried:
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! xvimagesink
and I got the same error message from above.
Please help :(
Thanks