Skip to content

Commit

Permalink
jetson/agx: add SKIFF_NVIDIA_BOARD setting
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@aperture.us>
  • Loading branch information
paralin committed Jan 19, 2024
1 parent 8ea3e0c commit 630d7f6
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 13 deletions.
67 changes: 58 additions & 9 deletions configs/jetson/agx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,76 @@ The recovery mode of the Jetson AGX is used to flash SkiffOS. Entering recovery:
- Wait a moment.
- Release the Force Recovery button.

SkiffOS uses the Tegra for Linux package to flash over USB.
SkiffOS uses Linux4Tegra `flash.sh` to flash via USB.

To flash over USB:
Select your board and set it to `SKIFF_NVIDIA_BOARD` below:

- `jetson-orin-nano-devkit`: Jetson Orin Nano Devkit
- `jetson-agx-orin-devkit`: Jetson AGX Orin Devkit

To flash via USB:

```
export SKIFF_NVIDIA_USB_FLASH=confirm
export SKIFF_NVIDIA_BOARD=jetson-agx-orin-devkit
make cmd/jetson/agx/flashusb
```

This will run the `flash.sh` script from L4T, and will setup the kernel, u-boot,
persist + boot-up partition mmcblk0p1.

After Skiff is installed, the system can be OTA updated by using the
`scripts/push_image.sh` script:
The flash script will overwrite the entire persist partition. This is due to a
limitation in the flashing process: the jetson internal EMMC partition layout
has a single "app" partition. The recovery mode is used to flash a ext4 image to
that partition containing the system files. Partial flashing would need separate
partitions to work correctly. Please use the `push_image.sh` script to update
after the initial install, see OTA Updates below.

## OTA Updates

After SkiffOS is installed and booted, the system can be over-the-air updated by
using the `scripts/push_image.sh` script:

```
./scripts/push_image.sh root@myjetsonagx
```

The flash script will overwrite the entire persist partition. This is due to a
limitation in the flashing process: the jetson internal EMMC partition layout
has a single "app" partition. The recovery mode is used to flash a ext4 image to
that partition containing the system files. Partial flashing would need separate
partitions to work correctly. Please use the `push_image.sh` script to update.
## Available Boards

The following configurations are available in Linux4Tegra:

```
igx-orin-devkit
jetson-agx-orin-devkit-as-jao-32gb
jetson-agx-orin-devkit-as-nano4gb
jetson-agx-orin-devkit-as-nano8gb
jetson-agx-orin-devkit-as-nx-16gb
jetson-agx-orin-devkit-as-nx-8gb
jetson-agx-orin-devkit-industrial-maxn
jetson-agx-orin-devkit-industrial-qspi
jetson-agx-orin-devkit-industrial
jetson-agx-orin-devkit-maxn
jetson-agx-orin-devkit
jetson-orin-nano-devkit-nvme
jetson-orin-nano-devkit
```

These can be passed with `SKIFF_NVIDIA_BOARD` when flashing.

```
export SKIFF_NVIDIA_BOARD=jetson-agx-orin-devkit-industrial
```

The default is `jetson-agx-orin-devkit`.

`maxn` mode refers to the maximum power mode for NVIDIA's Jetson AGX Orin
modules. It allows the module to operate at its highest power and performance
levels. For example, in the case of the 32GB Orin module, the MAXN mode
corresponds to the 40W power mode. When the module is set to MAXN mode, it
operates at its maximum performance capabilities. This mode is typically set
using commands such as sudo /usr/sbin/nvpmodel -m 01 but can be set in the board
configuration environment variable as well by using:

```
export SKIFF_NVIDIA_BOARD=jetson-agx-orin-devkit-maxn
```
11 changes: 7 additions & 4 deletions configs/jetson/agx/scripts/flash_usb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ if [ ! -f $flash_path ]; then
exit 1
fi

cd ${IMAGES_DIR}/linux4tegra
# Default SKIFF_NVIDIA_BOARD
if [ -z "$SKIFF_NVIDIA_BOARD" ]; then
export SKIFF_NVIDIA_BOARD="jetson-agx-orin-devkit"
echo "Defaulting SKIFF_NVIDIA_BOARD to ${SKIFF_NVIDIA_BOARD}"
fi

# disable recovery image
export NO_RECOVERY_IMG=1
cd ${IMAGES_DIR}/linux4tegra

# using /boot bind-mounted to /mnt/boot
echo "Using skiffos.ext2 as APP partition..."
Expand All @@ -42,4 +45,4 @@ ln -fs ${IMAGES_DIR}/skiffos.ext2 ./bootloader/system.img
# Run the flash script.
export FLASHLIGHT="1"
export NO_RECOVERY_IMG="1"
bash $flash_path -r jetson-agx-orin-devkit mmcblk0p1
bash $flash_path -r ${SKIFF_NVIDIA_BOARD} mmcblk0p1

0 comments on commit 630d7f6

Please sign in to comment.