Flash your ZED Box Mini

Open in ClaudeOpen in ChatGPT

Should I flash my ZED Box Mini?

The ZED Box Mini is shipped with a pre-configured operating system and drivers optimized for its hardware.

Flashing (resetting or upgrading the device firmware) is only recommended if you need to:

  • Install a different OS or JetPack version,
  • Recover from a corrupted system,
  • Resolve issues preventing the device from booting or functioning properly.

Flashing will erase all data and custom configurations on your ZED Box Mini. Proceed only if you are familiar with the process or have been instructed by support. For most users, flashing should be a last resort.

Flashing Procedure

The NVIDIA® SDK Manager does not support automatic flashing of the Jetson modules installed in the ZED Box. Therefore, you must manually flash the board using NVIDIA’s BSP for the desired JetPack version.

Force the ZED Box Mini in Recovery mode

It is not required to open the ZED Box Mini to force it into Recovery mode. Opening the box will void the warranty

  • First method:

    This is applicable only if your device can normally boot.

    Open a terminal console (Ctrl+Alt+t) and enter the command

    $sudo reboot --force forced-recovery
  • Second method:

    1. Connect the power
    2. Use a pin to push the RCV button
    3. While keeping the RCV button pushed, use a pin to push the RST button

When the ZED Box Mini boots in Force Recovery mode, the power LED stays OFF.

Check that the ZED Box Mini restarted in Force Recovery mode

Connect a Type-A/MicroUSB cable to a host device running Ubuntu 22.04 and to the OTG port of the ZED Box Mini.

Open a terminal console (Ctrl+Alt+t).

You can verify that the ZED Box Mini correctly started in “Recovery Mode” by entering this command:

$lsusb -d '0955:'
  • NVIDIA® Jetson™ Orin Nano 4 GB: an NVIDIA® device with VID:PID 0955:7623 should be listed. e.g. Bus xxx Device yyy: ID 0955:7623 NVIDIA Corp. APX
  • NVIDIA® Jetson™ Orin Nano 4 GB: an NVIDIA® device with VID:PID 0955:7523 should be listed. e.g. Bus xxx Device yyy: ID 0955:7523 NVIDIA Corp. APX
  • NVIDIA® Jetson™ Orin NX 8 GB: an NVIDIA® device with VID:PID 0955:7423 should be listed. e.g. Bus xxx Device yyy: ID 0955:7423 NVIDIA Corp. APX
  • NVIDIA® Jetson™ Orin NX 16 GB: an NVIDIA® device with VID:PID 0955:7323 should be listed. e.g. Bus xxx Device yyy: ID 0955:7323 NVIDIA Corp. APX

If an NVIDIA® device with VID:PID 0955:7020 and type NVIDIA Corp. L4T (Linux for Tegra) running on Tegra is listed, then your ZED Box Mini has not rebooted in Force Recovery mode. You must retry the procedure.

Flash the ZED Box Mini

Requirements:

  • use a host PC running Ubuntu 20.04 or Ubuntu 22.04.

do not use virtual machines or WSL2 to run Ubuntu to flash the ZED Box Mini. If you do not have a ready PC running Ubuntu, please consider using a Live USBKey instead:

On the host PC:

  1. Open a terminal console from an empty folder of your choice.

    For example:

    $mkdir -p ~/zedbox_flash
    $cd ~/zedbox_flash
  2. Ensure that you previously booted the ZED Box Mini in “Recovery mode”.

  3. Download the flash script for the NVIDIA® Jetpack version you want to install:

  4. Flash the ZED Box Mini:

    • Ensure you have at least 80GB of free space on your working hard drive.
    • Use the following command to flash the ZED Box:
      • Standard mode:

        $BSP_ROOT=./stereolabs_bsp/ ./zedbox_<version>.sh`

        Replace <version> with the installer name, e.g., zedbox_all_usb_flash_6.2.sh.

    All necessary files will be downloaded in the folder $BSP_ROOT. The script will create this folder if it does not exist and will ask you to log in as root.

  5. Wait for the operation to complete. You will see the following output if the flash is successful:

    $[...]
    $Flash is successful
    $Reboot device
    $Cleaning up...
    $Log is saved to Linux_for_Tegra/initrdlog/flash_<bla_bla_bla>.log
    $FLASH SUCCESS

If you encounter any problems during this procedure, please consult the troubleshooting guide.

Post-Flash operations

After flashing your device, follow these steps to install the necessary NVIDIA® and StereoLabs packages to ensure your ZED camera works correctly.

  1. Boot and Login:

    Power on the device and log in with your credentials.

    The new default credentials of your ZED Box are:

    • username: user
    • password: admin
  2. Check the OS Version:

    Follow this support guide to determine the version of the operating system installed on your device.

  3. Connect to the Internet:

    Connect your device to the internet using an Ethernet cable (WiFi could not be yet available according to the script you used to flash the device):

  4. Open a Terminal:

    Press Ctrl+Alt+T to open a terminal window.

  5. Update the APT cache:

    Run the following commands to update the APT cache:

    $sudo apt update

    Do not run the command sudo apt upgrade before performing the next steps!

  6. Install NVIDIA® Jetpack Packages:

    Run the following command to install the NVIDIA® Jetpack packages, which include the required Jetson™ drivers, CUDA, and all necessary NVIDIA® libraries:

    $sudo apt install nvidia-jetpack
  7. Install ZED Link Drivers (for ZED X or ZED X One Cameras):

    Download and install the appropriate drivers from the driver web page:

    $cd ~/Downloads
    $sudo dpkg -i stereolabs-zedbox-mini_<ver_info>.sh
  8. Hold the the kernel packages to not upgrade them and invalidate the setup:

    • Create a hold-zedbox-kernel.sh script file with the following content:

      • nano hold-zedbox-kernel.sh

        Fill the file with this script:

        1#!/bin/bash
        2#
        3# hold-zedbox-kernel.sh
        4#
        5# Prevents `apt upgrade` from installing nvidia-l4t-kernel versions
        6# that are incompatible with the stereolabs-zedbox-mini package.
        7#
        8# The stereolabs-zedbox-mini package requires nvidia-l4t-kernel within:
        9# >= 5.15.148-tegra-36.4.0-20240912212859
        10# <= 5.15.148-tegra-36.4.4-20250616085344
        11#
        12# This script holds all NVIDIA L4T kernel-related packages at their
        13# currently installed versions so they won't be upgraded past the
        14# compatible range.
        15#
        16# Unlike the previous version, the package list is discovered dynamically
        17# from dpkg rather than hardcoded. L4T/JetPack images ship these packages
        18# under names that vary between releases (sometimes version-suffixed, e.g.
        19# nvidia-l4t-kernel-5.15.148, sometimes via a different meta-package), so a
        20# fixed list often matches nothing and every entry is skipped.
        21#
        22# Usage:
        23# sudo ./hold-zedbox-kernel.sh hold # Hold the packages (default)
        24# sudo ./hold-zedbox-kernel.sh unhold # Release the hold
        25# sudo ./hold-zedbox-kernel.sh status # Show current hold status
        26
        27set -euo pipefail
        28
        29# Regex matching the L4T kernel package family we want to hold. This is
        30# anchored at the start and allows arbitrary suffixes (e.g. -headers,
        31# version suffixes) so it catches naming variants across L4T releases.
        32PKG_REGEX='^nvidia-l4t-(kernel|rt-kernel|display-kernel|bootloader|xusb-firmware|init)'
        33
        34# --- helpers ---------------------------------------------------------------
        35
        36require_root() {
        37 if [[ $EUID -ne 0 ]]; then
        38 echo "Error: this script must be run with sudo or as root." >&2
        39 exit 1
        40 fi
        41}
        42
        43is_installed() {
        44 # Returns 0 if the package is installed (status "ii" or "hi"), 1 otherwise.
        45 dpkg-query -W -f='${db:Status-Abbrev}\n' "$1" 2>/dev/null | grep -qE '^.i'
        46}
        47
        48# Discover installed L4T kernel-related packages by pattern. Populates the
        49# global PACKAGES array. Exits with an error if nothing matches, since that
        50# means the regex (or the image) needs to be inspected manually.
        51discover_packages() {
        52 mapfile -t PACKAGES < <(
        53 dpkg-query -W -f='${Package} ${db:Status-Abbrev}\n' 2>/dev/null \
        54 | awk '$2 ~ /^.i/ {print $1}' \
        55 | grep -E "$PKG_REGEX" \
        56 | sort -u
        57 )
        58
        59 if [[ ${#PACKAGES[@]} -eq 0 ]]; then
        60 echo "Error: no installed nvidia-l4t kernel packages matched." >&2
        61 echo "Inspect manually with:" >&2
        62 echo " dpkg -l | grep -i nvidia-l4t-kernel" >&2
        63 echo " dpkg -l | grep -i nvidia-l4t | grep -iE 'kernel|boot|init|firmware'" >&2
        64 echo "Then adjust PKG_REGEX in this script if the names differ." >&2
        65 exit 1
        66 fi
        67}
        68
        69hold_packages() {
        70 require_root
        71 discover_packages
        72 echo "Holding NVIDIA L4T kernel packages at their current versions..."
        73 echo
        74 local held=0 skipped=0
        75 for pkg in "${PACKAGES[@]}"; do
        76 if is_installed "$pkg"; then
        77 local ver
        78 ver=$(dpkg-query -W -f='${Version}' "$pkg" 2>/dev/null || echo "unknown")
        79 apt-mark hold "$pkg" >/dev/null
        80 printf " [HELD] %-45s (version: %s)\n" "$pkg" "$ver"
        81 held=$((held + 1))
        82 else
        83 printf " [SKIPPED] %-45s (not installed)\n" "$pkg"
        84 skipped=$((skipped + 1))
        85 fi
        86 done
        87 echo
        88 echo "Done. Held: $held, Skipped: $skipped"
        89 echo
        90 echo "These packages will now be ignored by 'apt upgrade'."
        91 echo "Use 'apt-mark showhold' to verify, or run this script with 'status'."
        92}
        93
        94unhold_packages() {
        95 require_root
        96 discover_packages
        97 echo "Releasing hold on NVIDIA L4T kernel packages..."
        98 echo
        99 local released=0
        100 local all_holds
        101 all_holds=$(apt-mark showhold)
        102 for pkg in "${PACKAGES[@]}"; do
        103 if echo "$all_holds" | grep -qx "$pkg"; then
        104 apt-mark unhold "$pkg" >/dev/null
        105 printf " [UNHELD] %s\n" "$pkg"
        106 released=$((released + 1))
        107 else
        108 printf " [SKIPPED] %s (was not held)\n" "$pkg"
        109 fi
        110 done
        111 echo
        112 echo "Done. Released: $released"
        113 echo
        114 echo "WARNING: these packages may now be upgraded by 'apt upgrade',"
        115 echo "which can break stereolabs-zedbox-mini if an incompatible kernel"
        116 echo "version is installed."
        117}
        118
        119show_status() {
        120 discover_packages
        121 echo "Current hold status for NVIDIA L4T kernel packages:"
        122 echo
        123 local all_holds
        124 all_holds=$(apt-mark showhold)
        125 for pkg in "${PACKAGES[@]}"; do
        126 local ver
        127 ver=$(dpkg-query -W -f='${Version}' "$pkg" 2>/dev/null)
        128 if echo "$all_holds" | grep -qx "$pkg"; then
        129 printf " [HELD] %-45s (version: %s)\n" "$pkg" "$ver"
        130 else
        131 printf " [NOT HELD] %-45s (version: %s)\n" "$pkg" "$ver"
        132 fi
        133 done
        134 echo
        135 echo "stereolabs-zedbox-mini status:"
        136 if is_installed "stereolabs-zedbox-mini"; then
        137 local zedver
        138 zedver=$(dpkg-query -W -f='${Version}' "stereolabs-zedbox-mini" 2>/dev/null)
        139 echo " Installed (version: $zedver)"
        140 else
        141 echo " Not installed"
        142 fi
        143}
        144
        145usage() {
        146 cat <<EOF
        147Usage: sudo $0 [hold|unhold|status]
        148
        149hold Hold NVIDIA L4T kernel packages at their current versions (default)
        150unhold Release the hold so packages can be upgraded again
        151status Show whether each package is currently held
        152
        153Why this is needed:
        154stereolabs-zedbox-mini depends on nvidia-l4t-kernel within a specific
        155version range. Newer kernels from NVIDIA's apt repo fall outside this
        156range and break the package. Holding the kernel keeps 'apt upgrade'
        157from touching it.
        158
        159Note:
        160The package list is discovered dynamically from dpkg using PKG_REGEX,
        161so version-suffixed or renamed kernel packages are matched automatically.
        162Holding only prevents FUTURE upgrades; it cannot roll back a kernel that
        163has already been installed outside the compatible range.
        164EOF
        165}
        166
        167# --- main ------------------------------------------------------------------
        168
        169cmd="${1:-hold}"
        170case "$cmd" in
        171 hold) hold_packages ;;
        172 unhold) unhold_packages ;;
        173 status) show_status ;;
        174 -h|--help|help) usage ;;
        175 *)
        176 echo "Error: unknown command '$cmd'" >&2
        177 echo
        178 usage
        179 exit 1
        180 ;;
        181esac
    • Make the script exacutable:

      chmod +x hold-zedbox-kernel.sh

    • Run the script:

      sudo ./hold-zedbox-kernel.sh

    • Verify the result:

      sudo ./hold-zedbox-kernel.sh status

      All the nvidia-l4t-* packages should be [HELD] nvidia-l4t-* (version: xx.y.z-dddddddddddddd)

      If you are not using the Real Time kernel, you can safely ignore eventual [ABSENT] nvidia-l4t-rt-*

  9. Download and install the ZED SDK:

    • Visit the StereoLabs website and download the ZED SDK for Jetson that matches your installed Jetpack/L4T version.

    • Navigate to your Downloads directory and run the installer:

      $cd ~/Downloads
      $chmod +x ZED_SDK_Tegra_L4T_v<x.y.z>.zstd.run
      $./ZED_SDK_Tegra_L4T_v<x.y.z>.zstd.run
  10. Reboot:

    Restart your device to apply all changes:

    $sudo reboot
  11. Enjoy Your Device:

    Your device is now ready for use with the ZED cameras.