Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 39 additions & 90 deletions embedded-computers/ark-just-a-jetson/camera-overlays.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ The following camera overlays are available for the ARK Just A Jetson:
| Camera ARK IMX219 Quad | Four IMX219 cameras (using camera mux board) | Tested |
| Camera ARK IMX219 Single | Single IMX219 camera | Tested |
| Camera ARK IMX477 Single | Single IMX477 camera | Tested |
| Camera IMX477 Dual 4 lane | Dual IMX477 cameras using 4-lane CSI | Not Working |

{% hint style="warning" %}
**4-Lane CSI Mode Not Working on JetPack 6**

The 4-lane CSI overlays are currently non-functional due to a bug in the JetPack 6 kernel. This affects the "Camera IMX477 Dual 4 lane" overlay. See the [NVIDIA Developer Forum issue](https://forums.developer.nvidia.com/t/imx477-4lane-on-cam1/333270) for updates on a fix.
{% hint style="info" %}
**IMX477 4-lane mode is not supported.** The 4-lane overlays have been removed because the `nv_imx477` driver's 4-lane initialization is broken upstream. 2-lane mode delivers the full 12 MP at 30 fps. See the kernel repo's [camera documentation](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/docs/cameras.md) for details.
{% endhint %}

## Listing Available Overlays
Expand All @@ -40,12 +37,10 @@ Header 1 [default]: Jetson 40pin Header
6. ReSpeaker 4 Mic Linear Array
Header 2: Jetson 24pin CSI Connector
Available hardware modules:
1. ARK IMX477 Dual 4 lane
2. ARK IMX477 Single 4 lane
3. Camera ARK ARDUCAM Single
4. Camera ARK IMX219 Quad
5. Camera ARK IMX219 Single
6. Camera ARK IMX477 Single
1. Camera ARK ARDUCAM Single
2. Camera ARK IMX219 Quad
3. Camera ARK IMX219 Single
4. Camera ARK IMX477 Single
Header 3: Jetson M.2 Key E Slot
No hardware configurations found!
```
Expand Down Expand Up @@ -86,124 +81,78 @@ v4l2-ctl --set-fmt-video=width=3840,height=2160,pixelformat=RG10 --stream-mmap -

## Building and Installing Camera Overlays

There are two approaches for building and deploying camera overlays:

1. **Include in kernel build** - The overlay is built and included in the flashed image
2. **Build standalone** - Build the overlay separately and copy it to an already-flashed system

### Option 1: Include Overlay in Kernel Build

This approach includes the overlay in the kernel build so it's available immediately after flashing.

#### Step 1: Create the overlay source file
Camera overlays are built from the [ARK Jetson Kernel](https://github.com/ARK-Electronics/ark_jetson_kernel) repository. You can either include the overlay in a full kernel build/flash, or build it standalone and copy it onto an already-flashed Jetson. For the full list of tested cameras and test commands, see the kernel repo's [camera documentation](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/docs/cameras.md).

Create your `.dts` file in the device tree overlay directory:
Clone and set up the repository (one time):

```
device_tree/ark_jaj/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/
git clone https://github.com/ARK-Electronics/ark_jetson_kernel
cd ark_jetson_kernel
./setup.sh
```

You can use an existing ARK overlay as a template (e.g., `tegra234-p3767-camera-p3768-ark-imx477-single.dts`).
### Option 1: Include the Overlay in the Kernel Build

This bakes the overlay into the flashed image so it is available immediately after flashing.

#### Step 2: Add to the Makefile
#### Step 1: Create the overlay source file

Edit the Makefile in the same directory and add your overlay to the build:
Add your `.dts` to the overlay directory for this carrier, using an existing ARK overlay as a template (e.g. `tegra234-p3767-camera-p3768-ark-imx477-single.dts`):

```
device_tree/ark_jaj/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/Makefile
products/JAJ/device_tree/source/hardware/nvidia/t23x/nv-public/overlay/
```

Add a line like:
#### Step 2: Register it in the Makefile

Add your overlay to the `Makefile` in that same directory:

```makefile
dtbo-y += your-custom-overlay.dtbo
```

#### Step 3: Add to copy_dtbs_to_prebuilt.sh

Edit `copy_dtbs_to_prebuilt.sh` in the repository root to copy your overlay to the prebuilt directory. You'll need to add a section for JAJ builds (similar to the PAB section) with lines like:

```bash
sudo cp $DTBS_SOURCE_PATH/your-custom-overlay.dtbo $PREBUILT_PATH/rootfs/boot/
sudo cp $DTBS_SOURCE_PATH/your-custom-overlay.dtbo $PREBUILT_PATH/kernel/dtb/
```

#### Step 4: Build and flash

Run the build and flash scripts:
#### Step 3: Build and flash

```
./build_kernel.sh # Select JAJ when prompted
./flash.sh
./build.sh JAJ
./flash.sh JAJ
```

Your overlay will now be available via `config-by-hardware.py -l` after flashing.

### Option 2: Build Standalone and Copy to Flashed System
Your overlay will then be listed by `config-by-hardware.py -l` after flashing.

This approach builds an overlay and copies it to a Jetson that has already been flashed.
### Option 2: Build Standalone and Copy to a Flashed System

#### Step 1: Set up the build environment
This builds the overlay and copies it onto a Jetson that has already been flashed — no reflash required.

Clone and set up the repository:
#### Step 1: Build the device tree overlays

```
git clone https://github.com/ARK-Electronics/ark_jetson_kernel
cd ark_jetson_kernel
./setup.sh
```

#### Step 2: Copy device tree files and build

Copy the JAJ device tree files and build:

./build.sh JAJ
```
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export KERNEL_HEADERS=$PWD/source_build/Linux_for_Tegra/source/kernel/kernel-jammy-src

# Copy JAJ device tree files
cp -r device_tree/ark_jaj/Linux_for_Tegra/* source_build/Linux_for_Tegra/
The compiled `.dtbo` files land in:

cd source_build/Linux_for_Tegra/source/
make dtbs
```

The compiled `.dtbo` files will be in:

```
source_build/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/
staging/JAJ/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/
```

#### Step 3: Copy overlay to the Jetson
#### Step 2: Copy the overlay to the Jetson

Copy the overlay via USB-C (default IP when connected via USB):
Copy via USB-C (default IP when connected via USB):

```
DTB_PATH="$PWD/source_build/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs/"
OVERLAY_DTB=tegra234-p3767-camera-p3768-ark-imx219-quad.dtbo
DTB_PATH="staging/JAJ/Linux_for_Tegra/source/kernel-devicetree/generic-dts/dtbs"
OVERLAY_DTB=tegra234-p3767-camera-p3768-ark-imx219-single.dtbo
scp $DTB_PATH/$OVERLAY_DTB jetson@192.168.55.1:~
```

#### Step 4: Install the overlay on the Jetson
#### Step 3: Install and apply on the Jetson

SSH into the Jetson and move the overlay to `/boot`:
SSH in, move the overlay to `/boot`, apply it, and reboot:

```
ssh jetson@jetson.local
sudo mv tegra234-p3767-camera-p3768-ark-imx219-quad.dtbo /boot
```

#### Step 5: Apply and reboot

Verify the overlay is available:

```
sudo /opt/nvidia/jetson-io/config-by-hardware.py -l
```

Apply the overlay:

```
sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="Camera ARK IMX219 Quad"
ssh jetson@192.168.55.1
sudo mv tegra234-p3767-camera-p3768-ark-imx219-single.dtbo /boot
sudo /opt/nvidia/jetson-io/config-by-hardware.py -n 2="Camera ARK IMX219 Single"
sudo reboot
```
4 changes: 2 additions & 2 deletions embedded-computers/ark-just-a-jetson/flashing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ If you purchased a bundle the [Jetpack Ubuntu OS](https://developer.nvidia.com/e

## ARK Jetson Kernel GitHub Repository

This repository contains helper scripts to download and build the kernel. Please follow the README.\
The repository provides prebuilt flash packages (recommended) and scripts to build the kernel from source. Follow the README:\
[https://github.com/ARK-Electronics/ark\_jetson\_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel)

## Device Tree

The ARK Just A Jetson requires a custom device tree to enable all hardware features. The device tree files are located here:\
[https://github.com/ARK-Electronics/ark\_jetson\_kernel/tree/main/device\_tree/ark\_jaj](https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/device_tree/ark_jaj)
[https://github.com/ARK-Electronics/ark\_jetson\_kernel/tree/main/products/JAJ/device\_tree](https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/products/JAJ/device_tree)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion embedded-computers/ark-just-a-jetson/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ When you order an ARK Just A Jetson bundle:
The ARK Just A Jetson requires a custom device tree to enable all hardware features. If you reflash your Jetson, you must use the ARK kernel with the correct device tree.
{% endhint %}

Device tree files: [https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/device_tree/ark_jaj](https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/device_tree/ark_jaj)
Device tree files: [https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/products/JAJ/device_tree](https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/products/JAJ/device_tree)

See the [Flashing Guide](flashing-guide.md) for complete instructions.

Expand Down
2 changes: 1 addition & 1 deletion embedded-computers/ark-just-a-jetson/gpio-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For a complete working example, see the [i2s_gpio_example.py](https://github.com

## Creating Custom Overlays

To create your own overlay for different pins, refer to the annotated example overlay in the [ark_jetson_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/device_tree/ark_jaj/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/ark_i2s_gpio.dts) repository.
To create your own overlay for different pins, refer to the annotated example overlay in the [ark_jetson_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/products/JAJ/device_tree/source/hardware/nvidia/t23x/nv-public/overlay/ark_i2s_gpio.dts) repository.

The overlay file contains documentation explaining how to:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IMU ICM-42688P Guide

The ICM-42688P is connected to SPI1 on the Just a Jetson. See the [pinmux spreadsheet](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/device_tree/ark_jaj/Jetson_Orin_NX_and_Orin_Nano_series_Pinmux_Config_Jetpack_6.xlsm) for the GPIO assignments. 
The ICM-42688P is connected to SPI1 on the Just a Jetson. See the [pinmux spreadsheet](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/products/JAJ/Jetson_Orin_NX_and_Orin_Nano_series_Pinmux_Config_Jetpack_6.xlsm) for the GPIO assignments. 

The device shows up in linux under /dev/spidev1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ If you purchased a bundle the [Jetpack Ubuntu OS](https://developer.nvidia.com/e

## ARK Jetson Kernel GitHub Repository

This repository contains helper scripts to download and build the kernel. Please follow the README.\
The repository provides prebuilt flash packages (recommended) and scripts to build the kernel from source. Follow the README:\
[https://github.com/ARK-Electronics/ark\_jetson\_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel)

## Device Tree

The ARK Jetson PAB Carrier V3 requires a custom device tree to enable all hardware features. The device tree files are located here:\
[https://github.com/ARK-Electronics/ark\_jetson\_kernel/tree/main/products/PAB\_V3/device\_tree](https://github.com/ARK-Electronics/ark_jetson_kernel/tree/main/products/PAB_V3/device_tree)

## Overview

To flash the kernel you will need to connect the Jetson to your Host PC using the **USB C** connection. You must boot the Jetson while holding the **Force Recovery** button.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ For a complete working example, see the [i2s_gpio_example.py](https://github.com

## Creating Custom Overlays

To create your own overlay for different pins, refer to the annotated example overlay in the [ark_jetson_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/device_tree/ark_pab/Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/ark_i2s_gpio.dts) repository.
To create your own overlay for different pins, refer to the annotated example overlay in the [ark_jetson_kernel](https://github.com/ARK-Electronics/ark_jetson_kernel/blob/main/products/PAB_V3/device_tree/source/hardware/nvidia/t23x/nv-public/overlay/ark_i2s_gpio.dts) repository.

The overlay file contains documentation explaining how to:

Expand Down
Loading