# NVIDIA Tegra AGX Xavier

**URL:** https://hub.mender.io/t/nvidia-tegra-agx-xavier/2616
**Category:** Yocto Project
**Tags:** yocto, nvidia, dunfell
**Created:** [October 4, 2020, 6:24pm UTC](https://hub.mender.io/t/nvidia-tegra-agx-xavier/2616 "2020-10-04T18:24:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dwalkes](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dwalkes/32/41_2.png) [@dwalkes](https://hub.mender.io/u/dwalkes)
#### Post date: [October 4, 2020, 6:24pm UTC](https://hub.mender.io/t/nvidia-tegra-agx-xavier/2616/1 "2020-10-04T18:24:36Z")

</div>

The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is a board-specific complement to the official documentation.

# Device description

NVIDIA AGX Xavier hardware with computer vision, GPU and multimedia support.

 ![750px-Xavier-module-dev-kit-3qrtr-1945px](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/60e5a88f31bfcb6abe5c2ccd736a04bc51ae72ef.jpeg)  
URL: [https://www.nvidia.com/en-us/autonomous-machines/embedded-systems-dev-kits-modules/](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems-dev-kits-modules/)  
Wiki: [https://elinux.org/Jetson\_AGX\_Xavier](https://elinux.org/Jetson_AGX_Xavier)

# Support level

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| dunfell (3.1) | :test_works: | :test_works: |

## Prerequisites

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Yocto Mega Manual](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros)
  - NOTE. Instructions depend on which Yocto version you intend to use.

## Setup Yocto Environment

Use the [tegra-demo-distro](https://github.com/OE4T/tegra-demo-distro) to demonstrate a working mender configuration.

Please use the `setup-env` script in [tegra-demo-distro](https://github.com/OE4T/tegra-demo-distro) to setup and configure the `tegrademo-mender` distribution. Use the branch corresponding to the yocto version you plan to target. For instance, for the dunfell branch and NVIDIA L4T release 32.4.3, use these commands from the root of the cloned tree:

```auto
git submodule update --init
git checkout dunfell-l4t-r32.4.3

```

Then use

```auto
source ./setup-env --distro tegrademo-mender --machine jetson-xavier

```

To setup your build environment for Jetson AGX Xavier.

See the [OE4T/meta-tegra](https://github.com/OE4T/meta-tegra/wiki) wiki for more information about the meta-tegra project.

### Setup build environment

Initialize the build environment:

```auto
source ./setup-env --distro tegrademo-mender --machine jetson-xavier

```

or if you’ve already setup your initial environment you can use the simpler option:

```auto
source ./setup-env

```

### Building the image

You can now proceed with building an image:

```auto
bitbake demo-image-base

```

## Using the build output

After a successful build, the images and build artifacts are placed in `tmp/deploy/images/jetson-xavier`.

The disk image package for Jetson has a name like `demo-image-base-jetson-xavier.tegraflash.tar.gz`. This file can be used along with recovery mode to initially provision the device. To enter recovery mode:

- Power cycle
- Hold down the RST button and REC button.
- Release the RST button while continuing to hold the REC button.
- Wait two seconds, then release the REC BUTTON.

You should see your NVIDIA device listed in the `lsusb` device output.

Next, extract the .tar.gz file and then run the `./doflash.sh` script inside to flash the build to the device. The script at `repos/meta-mender-community/meta-mender-tegra/scripts/deploy.sh` can be customized to automate this step if desired. See the instructions on the [OE4T wiki](https://github.com/OE4T/meta-tegra/wiki/Flashing-the-Jetson-Dev-Kit) for additional details.

On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the [Mender Artifact](https://docs.mender.io/overview/artifact) files, which have `.mender` suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client [standalone mode](https://docs.mender.io/artifact-creation/standalone-deployment).

# References

- [meta-tegra](https://github.com/OE4T/meta-tegra): The base BSP layer with support for NVIDIA tegra.
- [meta-mender-tegra](https://github.com/mendersoftware/meta-mender-community/tree/dunfell/meta-mender-tegra) layer in meta-mender-community: Customization for mender on tegra, including u-boot and partitioning. See OE4T layer at [this link](https://github.com/OE4T/meta-mender-community) for any changes or to file issues against mender and NVIDIA support.
- The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is simply a board-specific complement to the official documentation.

# Known issues

[Let us know](https://github.com/OE4T/meta-mender-community/issues) if you find one!
