Giter Club home page Giter Club logo

d3-jetson-bsp's Introduction

NOTICE

The D3 Jetson BSP has been replaced by D3 Jetson Modules, which is a package that contains loadable kernel modules for D3's cameras and device tree overlays for D3's interface and carrier boards. The supported Jetpack version is 5.1.3 as of 5/1/2024. Visit D3engineering.com to purchase D3's Jetson supported products and D3 Jetson Modules source code and documentation will be provided as a download with your purchase. Please contact [email protected] with any questions. Thank you!!

Overview

This project serves two purposes:

  1. To make building and developing for the Nvidia Jetson kernel easier.

  2. To publish D3 Jetson modifications to the public in a clean and easy-to-use manner.

Please note that this hasn't been used extensively with Nano and likely has some issues.

Getting the Code

This project uses git submodules to pull in repositories publish by Nvidia. The use of git submodules requires extra steps that are not needed for git repositories that do not use submodules.

After the initial clone choose a branch corresponding to the release you would like to build. The master branch only provides this documentation; all working code is contained in branches. D3 specific code will be added on different branches in the near future. The following will checkout the nvidia branch with Linux for Tegra r32.2.1 submodules.

git checkout nvidia/r32.2.1
git submodule update --init

The --init flag is only needed one time.

Anytime a branch is changed be sure to update the submodules as git does not do this automatically by default!

git submodule update

Use of git-prompt is recommended as it will alert you when your submodules need updating.

Dependencies

  • Ubuntu 16.04 or 18.04.

  • Linux For Tegra host-side tools as installed by Nvidia's SDK Manager

  • rsync: for efficiently transferring files to the Jetson target

  • TODO: track down the required Ubuntu packages

Building

Autoconf is utilized to make it easier to choose different systems and various other options. The basic steps required are below.

./bootstrap
./configure
make linux-defconfig
make -j8

There are options for customizing the build. If, for example, you are developing for Xavier you would execute:

./bootstrap
./configure --with-system-type=xavier
make linux-defconfig
make -j8

Configure Options

--with-system-type

The choices are xavier, tx2, or nano. The default is tx2. This option influences the L4T directory. If you have installed the L4T host utilities in the default locations from Nvidia's SDK Manager then this will choose the correct path and there is no need to specify --with-l4t.

--with-dtb

Specifies a path to a device tree blob. This is used for the make target 'flash-dtb'. Normally a path to the build directory is used:

./configure --with-dtb=$(realpath build/deploy/boot/tegra186-quill-e3313-1000-a00-00-e2598.dtb)

--with-target-host

Normally this is not required. This specifies an IP address or hostname that is used when sending files to the target Jetson device. The default is 192.168.55.1 which is the default IP address for the USB connection to the Jetson.

--with-kconfig

Optionally specify a non-default location for the kernel configuration file.

--with-l4t

Normally this is not required as a suitable default is chosen based on the system type (see --with-system-type). If you have installed L4T in a non-standard location you can use this to direct the build tools to the correct location. This situation might arise, for example, on a dedicated build server.

Installing

The only step required to install the kernel, modules, and dtb is make sync. This target copies the required files to the target device, taking into account differences between Xavier, Tx2, and Nano.

Makefile Targets

all             - alias for deploy which builds everything
clean           - deletes build artifacts in the kernel and deployment trees
deploy          - builds kernel and DTB
deploy-clean    - deletes build artifacts in the deployment tree
sync            - rsyncs kernel, kernel modules, and dtb to target
sync-debug      - rsyncs debug/ to target
sync-kernel     - (Xavier only) copies signed kernel image to device and dd's it to the kernel memory partition
sync-modules    - rsyncs kernel modules to target
sync-dtb        - copies signed dtb to device and dd's it to the kernel-dtb memory partition
flash-dtb       - flashes dtb to target via USB (device in recovery mode)
flash-kernel    - (Xavier only) flashes kernel to target via USB (device in recovery mode)
linux-defconfig - prepares kernel with default D3 configuration
linux-menuconfig- launches curses based kernel config editor
linux-dtbs      - builds dtbs
linux-dtbs-install- installs dtbs
linux-clean     - deletes build artifacts in the kernel tree
reboot          - reboots target
shutdown        - halts target
sign-dtb        - signs dtb file with L4T
sign-kernel     - (Xavier only) signs kernel image with L4T
bin-kernel      - creates kernel .deb package
show-config     - show the configuration supplied to configure

d3-jetson-bsp's People

Contributors

d3-growe avatar jenslin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

d3-jetson-bsp's Issues

problems with .gitmodules

Ive got some problems with the URLs in .gitmodules. After i change the URLs to:
url = https://github.com/D3Engineering/ ....

it works for me

jmm api and patch in release 5.0.0

Hi,
I've noticed the release 5.0.0 is now out. I've been trying to use it with jetpack 4.6 and 4.6.1, It seems to not like the jmm build step. Having a look at the d3-build-tegra-media-api I can see that the

declare -A JMM_API_VERSION_ARRAY=( \
    ["32.3.1"]="32.3.1-20191209225816"  # JP 4.3
    ["32.4.2"]="32.4.2-20200408182620"  # JP 4.4 EA
    ["32.4.3"]="32.4.3-20200625213407"  # JP 4.4
    ["32.4.4"]="32.4.4-20201016123640"  # JP 4.4.1
)

string is not yet updated for 4.6(.1) The patch is for 4.4 as well. Does this mean installing the jetpack supported mm api is sufficient without having to run the d3-build-tegra-media-api script or is there a trick that is not in the readme?

Cheers

Probe function not called

Hello i want to write my own camera driver, i changed the device tree and also some parts of the driver. Nevermind i also added some debug functions to the original driver code of the camera ov10640 just for example the lines :

pr_info("ov10640 probe");
printk(KERN_ALERT "DEBUG: Passed %s %d \n",FUNCTION,LINE);
dev_dbg(&client->dev, "ov10640 probe enter");

because i wan to to see if the overlay loader respective the kernel of the jetson xavier is executing the function, i did't not see any message but i also execute the line

echo "7" > /proc/sys/kernel/printk

so for example i must see the line

pr_info("ov10640 probe");

in the kernel messages (dmesg) because i also see some informations from the overlay-loader.

The probe function still has the body:

static int ov10640_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
int err = 0;
struct camera_common_data *common_data;
struct ov10640 *self = NULL;
int tries;

pr_info("ov10640 probe");
printk(KERN_ALERT "DEBUG: Passed %s %d \n",__FUNCTION__,__LINE__);
dev_dbg(&client->dev, "ov10640 probe enter");

TRY_MEM(common_data, devm_kzalloc(&client->dev, sizeof(*common_data),
			GFP_KERNEL));
TRY_MEM(self, devm_kzalloc(&client->dev, sizeof(*self), GFP_KERNEL));
self->client = client;
self->dev = &client->dev;

common_data->priv = self;
common_data->ops = &ov10640_common_ops;
common_data->ctrl_handler = &self->ctrl_handler;
common_data->dev = &client->dev;
common_data->frmfmt = &ov10640_formats[0];
common_data->numfmts = ov10640_formats_len;
common_data->colorfmt = camera_common_find_datafmt(MEDIA_BUS_FMT_SBGGR12_1X12);

common_data->power = &self->power;
common_data->ctrls = self->ctrls;

common_data->priv = self;
common_data->numctrls = ov10640_ctrls_count();

common_data->def_mode = common_data->frmfmt[OV10640_MODE_DEFAULT].mode;
common_data->def_width = common_data->frmfmt[OV10640_MODE_DEFAULT].size.width;
common_data->def_height =
	common_data->frmfmt[OV10640_MODE_DEFAULT].size.height;
/* common_data->def_clk_freq = 48000000; */
common_data->fmt_width = common_data->def_width;
common_data->fmt_height = common_data->def_height;

self->s_data = common_data;
self->s_data->sensor_mode_id = OV10640_MODE_DEFAULT;
self->s_data->mode = OV10640_MODE_DEFAULT;
self->subdev = &common_data->subdev;
self->subdev->dev = self->dev;
self->s_data->dev = self->dev;

self->pdata = ov10640_parse_dt(self, common_data);
if (!self->pdata)
	return -EFAULT;

TRY_MEM(self->map, devm_regmap_init_i2c(self->client, &ov10640_regmap_cfg));

for (tries = 50; --tries >= 0; ) {
	/* regmap_write(self->map, OV10640_REG_SOFTWARE_CTRL2, */
	/*	     OV10640_REG_SOFTWARE_CTRL2_RESET); */

	err = regmap_multi_reg_write(self->map, mode_table[OV10640_MODE_DEFAULT].reg_sequence, mode_table[OV10640_MODE_DEFAULT].size);

	if (err >= 0)
		err = regmap_write(self->map, OV10640_REG_SOFTWARE_CTRL1, OV10640_REG_SOFTWARE_CTRL1_SW_STBY);

	if (err < 0) {
		dev_dbg(self->dev, "Giving device more time to settle\n");
		usleep_range(50 * 1000, 50 * 1000);
	} else
		break;
}
if (err < 0) {
	dev_err(self->dev, "Failed to find device\n");
	return err;
}

TRY(err, camera_common_initialize(common_data, "ov10640"));

v4l2_i2c_subdev_init(self->subdev, client, &ov10640_subdev_ops);
TRY(err, ov10640_ctrls_init(self));

self->subdev->internal_ops = &ov10640_subdev_internal_ops;
self->subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;

TRY(err, ov10640_media_init(self));
TRY(err, v4l2_async_register_subdev(self->subdev));

dev_dbg(self->dev, "probe success");
return 0;

}

....

wheras the compatible is just:

static struct of_device_id ov10640_of_match[] = {
{ .compatible = "d3,ov10640"},
{ },
};

.....

In the extlinux.conf i also added the lines

active_overlays=ov10640_0,ov10640_1,ov10640_2,ov10640_3,ov10640_4,ov10640_5

for activating the drive, the driver tree now looks like for example:

	mux@70 {
		status = "okay";
		compatible = "nxp,pca9546";
		reg = <0x70>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		vcc-supply = <0x2d>;
		vcc-pullup-supply = <0x2d>;

		i2c@0 {
			status = "okay";
			reg = <0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			i2c-mux,deselect-on-exit;
			linux,phandle = <0x1a5>;
			phandle = <0x1a5>;

			ub960@32 {
				status = "okay";
				compatible = "d3,ub960";
				reg = <0x32>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				iovdd-supply = <0x2d>;
				avdd-supply = <0x39>;
				pdb-gpios = <0x13 0x9e 0x1>;
				csi-tx-speed-mbps = <0x640>;
				csi-lane-count = <0x4>;
				csi-continuous-clock = <0x1>;
				linux,phandle = <0x3a>;
				phandle = <0x3a>;

				link@0 {
					status = "okay";
					reg = <0x0>;
					#address-cells = <0x1>;
					#size-cells = <0x0>;
					linux,phandle = <0x1a6>;
					phandle = <0x1a6>;

					ub953@30 {
						compatible = "d3,ub953";
						status = "disabled";
						physical-addr = <0x30>;
						#address-cells = <0x1>;
						#size-cells = <0x0>;
						reg = <0x30>;
						csi-lane-count = <0x4>;
						csi-continuous-clock = <0x1>;
						i2c-voltage-sel = <0x0>;
						linux,phandle = <0x14b>;
						phandle = <0x14b>;

						ov10640@20 {
							status = "disabled";
							compatible = "d3,ov10640";
							#address-cells = <0x1>;
							#size-cells = <0x0>;
							reg = <0x20>;
							physical-addr = <0x32>;
							devnode = "video0";
							mclk = "extperiph1";
							physical_w = "5.41";
							physical_h = "4.57";
							sensor_model = "ov10640";
							use_decibel_gain = "false";
							use_sensor_mode_id = "true";
							deserializer = <0x3a>;
							linux,phandle = <0x149>;
							phandle = <0x149>;

							mode0 {
								mclk_khz = "25000";
								mclk_multiplier = "22.0";
								num_lanes = [34 00];
								tegra_sinterface = "serial_a";
								discontinuous_clk = "no";
								dpcm_enable = "false";
								cil_settletime = [30 00];
								csi_pixel_bit_depth = "12";
								pixel_phase = "bggr";
								active_w = "1280";
								active_h = "1080";
								readout_orientation = [30 00];
								line_length = "1450";
								inherent_gain = [31 00];
								serdes_pix_clk_hz = "535000000";
								pix_clk_hz = "71428571";
								min_framerate = "30";
								max_framerate = "30";
								embedded_metadata_height = [30 00];
								vc_id = [30 00];
								mode_type = "bayer";
								min_gain_val = "1.0";
								max_gain_val = "8.0";
								min_exp_time = "20";
								max_exp_time = "33698";
								min_hdr_ratio = [31 00];
								max_hdr_ratio = [31 00];
							};

							ports {
								#address-cells = <0x1>;
								#size-cells = <0x0>;
								status = "disabled";

								port@0 {
									reg = <0x0>;

									endpoint {
										vc-id = <0x0>;
										status = "disabled";
										port-index = <0x0>;
										bus-width = <0x4>;
										remote-endpoint = <0x2e>;
										linux,phandle = <0x14a>;
										phandle = <0x14a>;
									};
								};
							};
						};

In the device tree there is still this node for ov10640 for activating the corresponding driver should it be renamed to d3_ov10640_0 in the boot/extlinux/extlinux.conf ? to see the probe function is called ? and how can i check if the the overlay-loader realy tries to start the driver from getting some statuse ? is there any was to get some feedback like with checking the status and so on. Is there a problem with the overlay loader ? The probe function should be always called and it must be called to start streaming of the camera, i didn't changed any part of the original code, i only added some debug informations in the probe function.

Kind regards

D3_BUILDID doesn't build with recent compiler

Hello,

D3_JETSON_BSP_BUILDID is set by using uuidgen and it's used in build-id.c to check if the kernel and devicetree have the same build_id.

$ uuidgen -r
f2319915-fbb7-4c98-ae41-67292acdd866

https://github.com/D3Engineering/d3-jetson-bsp/blob/d3/3.0.1/kernel/d3/drivers/d3/build-id/build-id.c#L25

But there is a problem with the format used by MODULE_VERSION() macro:

The may contain only alphanumerics and the character '.'
https://github.com/D3Engineering/nvidia-kernel-kernel-4.9/blob/d3/3.0.1/include/linux/module.h#L226

This break the build with gcc 8.

Best regards,
Romain

AGX Orin support

Hi I'm using the D3 16 camera board,
Can I use this BSP(5.0.0/with jetpack 4.6.1) with the new Jetson Orin Developer kit?

Cheers,
Ganindu.

IMX390RCM sunex DSL239 192 HFOV (1000843-R) Dewarping using Deepstream

Hello team,
I am trying to dewarp video feed/stream from IMX390RCM sunex DSL239 192 HFOV (1000843-R) sensor, using Nvidia Deepstream on Nvidia Jetson Xavier AGX.
I am using following configuration for nvdewarper

[property]
#dewarp-dump-frames=10
output-width=1936
output-height=1096
num-batch-buffers=1

#########################################

Note - Max 4 surfaces are supported

#########################################

[surface0]

1=PushBroom, 2=VertRadCyl, 3=PerspectivePerspective

projection-type=3
width=1936
height=1096
focal-length=652.136118843
#src-fov=180
#top-angle=30
#bottom-angle=-30
distortion=-0.3002562235144459;0.0783848772023062;-0.008314964125280827;-0.0003913208983429832;5.759098689473573e-05
src-x0=966.5794318241657
src-y0=558.2694892223593

0=cudaAddressModeClamp, 1=cudaAddressModeBorder

#cuda-address-mode=0

And the pipeline is as follows

gst-launch-1.0 nvarguscamerasrc sensor-id=0 bufapi-version=true ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvideoconvert compute-hw=1 ! tee name=t0 t0. ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 leaky=2 ! nvdewarper config-file=config.txt source-id=0 nvbuf-memory-type=4 ! nvegltransform ! nveglglessink sync=false t0. ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=0 leaky=2 ! nvegltransform ! nveglglessink sync=false

The resulting output is
wrap-dewarp

The issue is that dewarped feed is not as crisp as the fish-eye and also suitable amount of information is being lost. Can you please provide optimised configurations for config file in order to grasp more details and increase sharpness of the output.
Thanks in advance.

Problem with DTS configuration

  1. serdes_pix_clk_hz
    In the device tree of the UB960, the csi-tix-speed-mbps is configured as 1600. According to the calculation method given by nvidia, the serdes_pix_clk_hz of the sensor should be configured as 800000000. However, both ov10640 and imx390 are configured at 500000000 and imx490 at 535000000. Why is this?
  2. mclk_multiplier
    mclk_multiplier=serdes_pix_clk_hz/mclk_khz = 500000000/25000000=20, but the DTS configuration in ov10640 is 22. Why is this?

FATAL ERROR: Unable to parse input tree

Hello.
I'm trying to build from source. I execute commands according to README.md.

./bootstrap
./configure
make linux-defconfig
make -j4

After a while I get an error:

DTC     arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb
Error: arch/arm64/boot/dts/../../../../../../hardware/d3/d3-tx2-rsp-fpdlink.dts:40.27-29 syntax error
FATAL ERROR: Unable to parse input tree
/home/svl/d3-jetson-bsp-3.0.1/d3-jetson-bsp-src-3.0.1/l4t-submodules/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:135: recipe for target 'arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb' failed
make[4]: *** [arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb] Error 1
arch/arm64/Makefile:154: recipe for target 'dtbs' failed
make[3]: *** [dtbs] Error 2

here is the output of show-config it is correct, L4T Directory is true.

Makefile:666: ---------------- Build ID is 43ee5fef-37d2-44a7-89eb-6fd68b710ed6
        -D3 Configuration-
   Version          : 3.0.1
   System Type      : tx2
   Target Host      : 192.168.55.1
   Kernel config    : <default>
   DTB File         : /home/svl/d3-jetson-bsp-3.0.1/d3-jetson-bsp-src-3.0.1/build/deploy/boot/d3-tx2-cic.dtb
   L4T Directory    : /home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra
   Build ID of most recent build: 95a3d690-5315-4b50-ac77-89f594e4f3f5

Can someone help me and point out where I'm wrong?
Thanks.

D3 Release 5.0.0 Not working with M.2 NvMe memory card attached to Xavier

Hi,
I'm using the 16 Camera board (FPD-LINK III) I can confirm it is working with the new release but it is not booting with the M.2 Memory attached (when I remove the memory card it starts to work fine again,) . Used to work fine (Having a M.2 Memory ) with the old 4.0.0 Release with JP 4.4 Can you have a look please.

I've used the debian installer for this (didn't build from the source this time)

Cheers,
Ganindu.

Help required to install BSP in my Jetson Xavier AGX for SerDes sensor interface card

Hi @D3-growe @D3-jwatts @d3-sdunnington ,

Problem Statement: How to flash SerDes Sensor Interface Card with D3 BSP v5.0 on Jetson Xavier AGX?

Configuration:
1> Target Device : Jetson Xavier AGX (Jetpack 4.6.1)
2> D3 Hardware to flash: D3 Jetson SerDes Sensor Interface Card
3> D3 BSP: D3 Jetson BSP v5.0
4> Hardware Setup: D3 Jetson SerDes Sensor Interface Card is mounted on Jetson Xavier AGX and power is ON.

Pre-requisites:
1> Target Device Jetson Xavier AGX is flashed with Jetpack 4.6.1.
2> SerDes card is mounted on Jetson Xavier AGX.
3> SerDes interface Card jumpers J13 and J14 are connected to 12V.
4> Power supply is ON for Jetson Xavier AGX and SerDes Card. SerDes LED D26, D27, D28, D29 are solid ON (green).
5> Host PC is not connected. I am trying to flash SerDes via terminal on Target Device (Jetson Xavier AGX ).

Description:
Document (D3 Jetson BSP v5.0.0 Release Note) Provided is confusing and I am really struggling hard to flash SerDes interface card with D3 BSP 5.0.

Requesting if you can help on how to flash it with correct procedure....

6.1.0 not working tegra-xusb

Hello,
I tried version 6.1.0 and encountered not working tegra-xusb on Jetson Xavier NX dev-kit compatible board:

[    3.524474] tegra-xusb 3610000.xhci: Direct firmware load for nvidia/tegra194/xusb.bin failed with error -2
[    3.524496] tegra-xusb 3610000.xhci: Falling back to sysfs fallback for: nvidia/tegra194/xusb.bin

And it was fixed when I added initrd line in extlinux.conf file from original Jetpack 5.0.2 extlinux entry.
But I couldn't find a correct way to build initrd with your bsp.
Or maybe I do something wrong.

What I did:

  1. Install default Jetpack 5.0.2 via Nvidia SDKManager - everything works fine
  2. Download d3/6.1.0 and configure it with line:
./configure --with-system-type=nx --with-dtb="$(pwd)/build/deploy/boot/d3-nxc-emmc.dtb" --with-target-host="jetson-usb"
  1. Build it with default kernel config:
make linux-defconfig && make -j8
  1. Download it:
make sync
  1. Put an extlinux entry for this:
LABEL d3
    MENU LABEL D3
    LINUX /boot/d3-image
    FDT /boot/d3-nxc-emmc.dtb
    APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 nv-auto-config
  1. Reboot it

P.S.: Everything was fine on version 4.0.0 and dev/jp4.6

Best regards,
Grigoriy

Set up os support on target

Hi I'm not familiar with automake and I'm trying to understand this

I've done the rest and the part I don't get is running this ".in" file.


#!/bin/bash
# @configure_input@

TARGET="@TARGET_HOST@"

ssh-copy-id @USERNAME_AT@"$TARGET"
ssh @USERNAME_SSH@ -t "$TARGET" 'sudo apt-get -y update && sudo apt-get install -y rsync'
make sync-debug
ssh @USERNAME_SSH@ -t "$TARGET" 'cd debug; sudo ./prep-new-debug-system'
ssh @USERNAME_SSH@ -t "$TARGET" 'debug/disable-screen-lock'
ssh @USERNAME_SSH@ -t "$TARGET" 'cd debug; ./build-tm-api'

To run this file I think I need to fill the @...@'s and I'm just wondering what's the best way to do this.

Do I need to do something before I run bin/prep-new-system-from-host

Cheers.

Connection with a self-designed Radar board

Dear D3 Team,

We have a self-designed Radar board which could output data by MIPI-CSI.
Is it possible that we connect this Radar board with NVIDIA Jetson with the interface card product.
We have purchased the interface card and where should we start?

Building D3 branch

I am attempting to test a D3RCM-OV10640-953 with a Jetson carrier board fitted with a DS90UB960. I am trying to work out how to do that with the BSP; if I follow the instructions and checkout the nvidia/r32.2.1 branch, it doesn't contain the modules for the OV10640, DS90UB953 nor the DS90UB960.

I assume that I should be using one of the D3 branches, but if I check out d3/4.0.0, the make linux-defconfig stage fails with the following error:

user@user-System-Product-Name:~/D3Engineering/d3-jetson-bsp$ make linux-defconfig
/bin/bash: /home/user/D3Engineering/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9/scripts/config: No such file or directory
/bin/bash: line 0: [: ==: unary operator expected
/bin/bash: /home/user/D3Engineering/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9/scripts/config: No such file or directory
/bin/bash: line 0: [: ==: unary operator expected
Makefile:677: ---------------- Build ID is 8c428187-20dd-4df9-b973-39bbf59c2fc4
make[1]: Entering directory '/home/user/D3Engineering/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9'
make[1]: *** No rule to make target 'd3_defconfig'. Stop.
make[1]: Leaving directory '/home/user/D3Engineering/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9'
Makefile:809: recipe for target 'linux-defconfig' failed
make: *** [linux-defconfig] Error 2

Support for FPD Link iii.

Hi Team,

I am trying to bring up the D3RCM-OV10640-953 Camera Module in the Jetson Xavier NX board with DS90UB954 deserializer. I am using the following drivers (https://github.com/D3Engineering/d3-jetson-bsp/tree/d3/3.0.1/kernel/d3/drivers/d3). The Ser/Des connection is up and the sensor registered the /dev/video0 node. But when I issued the camera preview command I got the following error.
[ +2.479975] tegra194-vi5 15c10000.vi: no reply from camera processor
[ +0.000151] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms

Could you please give some pointers to solve this issue, Does the following driver is enough to add support for the D3RCM-OV10640-953 Camera Module (https://github.com/D3Engineering/d3-jetson-bsp/tree/d3/3.0.1/kernel/d3/drivers/d3)?

Thanks,
Ajith.

Adding set_mode_delay_ms in the camera sensor device-tree for IMX390RCM sunex DSL239 192 HFOV (1000843-R)

Hi,
Hardware setup
-IMX390RCM sunex DSL239 192 HFOV (1000843-R) with DesignCore® NVIDIA® Jetson AGX Xavier FPD-Link™ III Interface Card.
-BSP using 5.0 version on Jetpack 4.6.1.
-Jetson AGX Xavier Development Kit.
Problem Statement:
I am using Deepstream to live stream 7 cameras and successfully received them on the receiving end. But whenever i launch the pipeline on freshly booted system, it throws an error. Upon consulting with Nvidia(https://forums.developer.nvidia.com/t/nvarguscamerasrc-timeout-error/241339), they suggested a solution(https://forums.developer.nvidia.com/t/jetson-nano-nvarguscamerasrc-capture-can-not-get-hw-buffer-error/190884/7?u=vnawani), which requires your guidance in implementation, as i couldn't find the streaming initialisation time taken by the sensor or how to set the property in camera sensor device-tree.
Any help will be highly appreciated.
Best Regards,
-Shams

Build ID mismatch

In the 2.0.0 release the build ID for the DTB does not match the build ID for the kernel. The mismatch can safely be ignored.

The build ID for the kernel is: 98dbeefb-81a9-44d2-ab75-65d02c784d1e. If /sys/module/build_id/version contains that build ID then the kernel has successfully been installed.

This problem has been corrected for our next release.

Rebuilding Device Tree with Kernel

If the the device tree is changed in hardware/d3/* how can these files (templates) for camera can be used if also the the debian package is rebuild ?

Kind regards

control using v4l library

Hello,

is it possible to control the cameras using the v4l library? I have issues taking shots using the v4l sample script for image capturing.

Best regards

Yocto support for D3

Hello,

It would be great if you can provide D3 kernel sources for Yocto.

What about working on top of linux-tegra-4.9 from OE4T ?
This kernel is actively maintained for Tegra CPU and Nvidia stack.
The OE4T maintainer merged the nvidia sources into the kernel repository in order to build the kernel into Yocto kernel recipe [1].

I used the same method with D3 sources but it's a difficult maintenance on our side...

[1] https://github.com/OE4T/linux-tegra-4.9/commits/oe4t-patches-l4t-r32.4?after=87e09c14b15ad302b451f40f4237bb14f553c1e0+69&branch=oe4t-patches-l4t-r32.4

Best regards,
Romain

Argus Installation on Jetson Xavier AGX

Hi @D3-growe @D3-jwatts @D3-jwatts ,

This is regarding installation of Argus on Jetson Xavier AGX.
Can you confirm the below steps are correct to install Argus:

Step 1> Go to to Terminal.
S2> sudo apt update # this will update the repositories.
S3> sudo apt install argus-server # this will install the argus server on agx.
S4> d3-build-tegra-media-api
Note: Step 4 instruction will install Argus and message will appear “Terga Multimedia API Installed”.

S5> argus_camera& #This step will execute/start Argus Camera Use.

But the argus_camera application did not started. Can you help how can I activate camera streaming using argus? Do I need to perform some extra setting for it?

ln: **failed to create hard link '/boot/active-dtb' => './d3-xavier-6x-serdes.dtb': Operation not permitted**

Hi @D3-growe , @D3-jwatts , @d3-sdunnington ,

I am trying to flash D3 Jetson SerDes Sensor Interface Card with D3 Jetson BSP v5.0 on a target device (Jetson Xavier AGX).

Configuration:
1> Target Device : Jetson Xavier AGX (Jetpack 4.6.1)
2> D3 Hardware to flash: D3 Jetson SerDes Sensor Interface Card
3> D3 BSP: D3 Jetson BSP v5.0
4> Hardware Setup: D3 Jetson SerDes Sensor Interface Card is mounted on Jetson Xavier AGX and power is ON.

Procedure Implemented:
Step 1: sudo rm -f /etc/dpkg/dpkg.cfg.d/excludes

Step 2: sudo apt update

Step 3: sudo apt install
./linux-image-4.9.253+5.0.0-d3+_1_arm64.deb
./d3-jetson-util_5.0.0-1_arm64.deb

At the end of step 3, following error observed: "d3-install-dtb] failed to link dtb! (file ./d3-xavier-6x-serdes.dtb)"

Step 4: uname -a
Linux jayben-desktop 4.9.253-tegra #1 SMP PREEMPT Sun Apr 17 02:37:44 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

Question to D3: Is the BSP installed successfully? As mentioned above, uname -a shows "4.9.253-tegra #1 SMP PREEMPT Sun Apr 17 02:37:44 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux".

How can I verify that BSP is successfully installed?

-------- Below is my terminal log for your analysis--------

jayben@jayben-desktop: ~$
jayben@jayben-desktop : ~$ uname -a
Linux jayben-desktop 4.9.253-tegra #1 SMP PREEMPT Sun Apr 17 02:37:44 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux
jayben@jayben-desktop : ~$ d3-install-dtb
[d3-install-dtb] Choose an installed D3 BSP release

  1. ./linux-image-4.9.253+5.0.0-d3+
    #? 1
    [d3-install-dtb] Choose a dtb to install
  2. NVIDIA Jetson NX on DesignCore NVIDIA Jetson Xavier NX 12-Camera Carrier Board (d3-nxc-fpdlink.dtb)
  3. NVIDIA Jetson TX2 with DesignCore NVIDIA Jetson SerDes Sensor Interface Card (d3-tx2-6x-serdes.dtb)
  4. DesignCore NVIDIA Jetson RSP-TX2 FPD-Link (d3-tx2-rsp-fpdlink.dtb)
  5. NVIDIA Jetson AGX Xavier with DesignCore NVIDIA Jetson AGX Xavier FPD-Link III Interface Card (d3-xavier-16x-fpdlink.dtb)
  6. NVIDIA Jetson AGX Xavier with DesignCore NVIDIA Jetson SerDes Sensor Interface Card (d3-xavier-6x-serdes.dtb)
    #? 5
    ln : failed to create hard link '/boot/active-dtb' => './d3-xavier-6x-serdes.dtb': Operation not permitted
    [d3-install-dtb] failed to link dtb! (file ./d3-xavier-6x-serdes.dtb)
    jayben@jayben-desktop : ~$ uname -a
    Linux jayben-desktop 4.9.253-tegra #1 SMP PREEMPT Sun Apr 17 02:37:44 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux
    jayben@jayben-desktop: ~$

Distortion coeficient for IMX390 (1000843-R)

Hi,
I am using your IMX390RCM sunex DSL239 192 HFOV (1000843-R) with DesignCore® NVIDIA® Jetson AGX Xavier FPD-Link™ III Interface Card.
BSP using 5.0 version on Jetpack 4.6.1.
Hardware Jetson AGX Xavier Development Kit.

Problem Statement:
I am using Deepstream to live stream 7 cameras and successfully received them on the receiving end. After receiving i want to de-warp the received stream in order to get a flat 2D image.
In order to correct the distortion and correctly configure nvdewarper element of deepstream, i need to know the exact distortion co-efficient s and camera matrix values as shown in picture below.
Screenshot from 2023-01-13 12-28-03
The distortion co-efficient s will be used for correction the nvdewarper configuration file, who has a template like below

[property]
#dewarp-dump-frames=10
output-width=3680
output-height=2428
num-batch-buffers=1

#########################################

Note - Max 4 surfaces are supported

#########################################

[surface0]

1=PushBroom, 2=VertRadCyl, 3=PerspectivePerspective

projection-type=3
width=3680
height=2428
focal-length=1721.592
#src-fov=180
#top-angle=30
#bottom-angle=-30
### distortion=-0.09787;0.00574;-0.00013;0;0 (The distortion co-coefficient's values will go in here)
src-x0=1861.88
src-y0=1216.04

0=cudaAddressModeClamp, 1=cudaAddressModeBorder

#cuda-address-mode=0


Expected Support:
1> Please share these distortion coefficients to get flat 2D image?
2> Can we get any support or suggestion on how to obtain flat 2D images out of IMX390 camera modules?

Any help will be highly appreciated.
Regards

White pixel line

We have a pixel line in our images.
What is it ? Or what are we doing wrong?

image003

nvgstcapture-1.0: fence issue

Hello,

I'm running nvgstcapture-1.0 just after booting the d3 rsp-tx2 board with a fpdlink camera connected to SIN2.
$ nvgstcapture-1.0

Everything seems ok and I get the video on the screen.
Then I stop the nvgstcapture-1.0 application.

Starting a second time fail and some message appear on dmesg

$ nvgstcapture-1.0

[11916.062618] host1x 13e10000.host1x: CaptureSchedule: syncpoint id 37 (15600000.isp_nvargus-daemon_4) stuck waiting 49422, timeout=-1

[11919.902610] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 33 (15600000.isp_nvargus-daemon_0) clientid 14134, HW thresh 14112, done 14114
[11919.915569] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 34 (15600000.isp_nvargus-daemon_1) clientid 14134, HW thresh 7056, done 7057
[11919.928349] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 35 (15600000.isp_nvargus-daemon_2) clientid 14134, HW thresh 7056, done 7057
[11919.941125] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 36 (15600000.isp_nvargus-daemon_3) clientid 14134, HW thresh 7056, done 7057
[11919.953898] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 38 (15600000.isp_nvargus-daemon_5) clientid 14134, HW thresh 7056, done 7057
[11919.966669] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 37 (15600000.isp_nvargus-daemon_4) clientid 14134, HW thresh 49419, done 49419

[11920.158597] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 47 (15700000.vi_2) clientid 14143, HW thresh 7056, done 7057
[11920.169988] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 46 (15700000.vi_1) clientid 14143, HW thresh 7056, done 7057
[11920.181376] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 45 (15700000.vi_0) clientid 14143, HW thresh 7139, done 7139

[11930.142614] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 33 (15600000.isp_nvargus-daemon_0) clientid 14134, HW thresh 14116, done 14118
[11930.155573] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 34 (15600000.isp_nvargus-daemon_1) clientid 14134, HW thresh 7058, done 7059
[11930.168351] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 35 (15600000.isp_nvargus-daemon_2) clientid 14134, HW thresh 7058, done 7059
[11930.181128] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 36 (15600000.isp_nvargus-daemon_3) clientid 14134, HW thresh 7058, done 7059
[11930.193902] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 38 (15600000.isp_nvargus-daemon_5) clientid 14134, HW thresh 7058, done 7059
[11930.206673] host1x 13e10000.host1x: cdma_handle_timeout: timeout: 37 (15600000.isp_nvargus-daemon_4) clientid 14134, HW thresh 49435, done 49435

It seems an issue with host1x (nvidia) driver that use sync_fence_wait() (from drivers/staging/android/sync.c !) related to CONFIG_TEGRA_GRHOST_SYNC kernel option and NVHOST32_IOCTL_CTRL_SYNC_FENCE_CREATE IOCTL.

I'm using the d3-jetson-3.0.1 SDK.
Can you reproduce this issue with an ar0820 fpdlink camera?

Best regards,
Romain

DS90UB960-Q1 no signal output

We use the NVIDIA Jetson SerDes sensor interface card. The four registers CSI_PORT_SEL, FWD_CTL1, CSI_PLL_CTL and CSI_CTL are now configured, the ub960 is set as the pattern generation mode, which means that the ub960 will generate video test patterns for the CSI-2 transmitter outputs. However, the CSI signal could not be probed with an oscilloscope on the pin of the ub960, nor could data be read using the v4l2 interface on the Orin.

Could you tell me what the problem is?

.dts file missing from submodules? (when making the kernel)

Hi, I'm trying to make the kernel but it seems a file is missing from the submodules?
However I'm not sure if I've understood the error fully. I've linked the make output file for clues. @D3-growe (not sure if you're the right person)

--with-dtb='build/deploy/boot/d3-xavier-2xocto-ov10640.dtb' <-- build/deploy/boot is empty

P.S. but I can see it here Maybe I'm not puling it correctly.

Cheers,
Ganindu.

DS90UB960 output abnormal voltage during CSI2 HS transmission

Dear team,

We are using the NVIDIA Jetson SerDes Sensor Interface card and it was connected to an Jetson AGX Orin. A UB953 serialiser is used to transfer the CSI2 signal (4096*512, 10FPS, RAW8, 400Mbps, 4lane+1CLK) from the sensor to the FPD3.

We connect only one sensor and the UB960 outputs the stream on port0. The correct frame size was obtained from the UB960 registers on the interface card. No registers that indicate errors had been set.

However, we got "LP Sequence Error" ("status:0x00000088" and "status:0x00000080") when trying to use V4L2 to read the CSI2 input stream on Orin.

We had checked 2 things by using an oscilloscope:

  • We checked the signal global time parameters from the wavefrom of the UB960 CSI output pins, they are all within the required range as defined in the MIPI Alliance Specification for D-PHY.
  • We have calculated the time it takes to transmit our 4096 byte frame line using single long packets per lane, the actual time taken in the waveform for long packet transfers was the same.

But one strange thing we found from the waveform was the voltage.

The signal voltage level on the data lanes during high-speed transmission ranges from 0-500mV, but when it has switched to low-power mode and the voltage is in the normal range (1.2V).

We wonder if this voltage problem is due to the fact that we didn't choose the right place (960 CSI2 out pins directly) to test the signals?

And could you please give us some ideas on how to overcome the errors that we have encountered and how to read the stream correctly at the end of Orin?

Best,
Lee

make sync fails with "Permission denied"

When trying to use make sync to update a Jetson TX2 module with the updated kernel, modules and device tree, I see:

rsync: mkdir "/lib/modules/4.9.140+" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(675) [Receiver=3.1.2]
Makefile:705: recipe for target 'sync-modules' failed
make: *** [sync-modules] Error 11

I assume that this is because the standard user doesn't have the required privileges to write to /lib/modules. However, if I use sudo, it requires the root password for the Jetson system, which also gives a Permission denied error. Is there a way to use the make sync command or do I have to copy everything manually?

Camera images from D3 Hardware > libargus > GStreamer pipeline

Hi,

I'm trying to make a DL pipeline for an automotive product and it seems using GStreamer is the most suitable. Now I'm pretty familiar with the argus capture control API, EGLStreams and nv_buffers. I think it makes sense to create a gstreamer srcbin with argus as the image provider (even potentially with feedback paths to control sensor/ISP parameters on the fly). I'm just wondering before committing if there are better options or there is any guidance available? for example I know nvarguscamerasrc source is public . but I'm not sure where the files are?. My thoughts are based on the camera architecture diagram published by nvidia.

Also I found this nvidia forum post where @D3-growe (I think) may have touched something in the neighbourhood of this problem, but not directly linked as we are still in the early stages of getting an image pipeline to work.

Extra question:
currently working with the D3 16 camera board and it is great! However sometimes it doesn't recognise the cameras at boot and sometimes I need to restart/move/wiggle things around (if it happens usually happens only once a day) we don't mind if this is purely a dev board connection issue (which we can fix in a more production ready form factor I assume) ?
Cheers,
Ganindu.

UPDATE: I think I found the sources here (following the answer to this post I made on the forum), Now wondering mostly if my approach is correct and whether I can use newer versions than this (as of now I've patched R32-4.4 source for the memory leak bug and the multi camera bug and it seem to be working :) Furthermore if it's ok I'd like to know how you twiddle sensor-CSI/ISP parameters such as various gains etc. via gstreamer pipelines. Do we need to recreate a nvarguscamerasrc with some alternate feedback routes though libargus?

Finally how can I simultaneously open up multiple/different cameras with nvarguscamerasrc? (e.g. do sensor-id or name map to D3 ports?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.