LogoLogo
🛠️ Tools🗂️ SDK📄 White Paper
  • Getting Started
    • 🟣What is NDI?
    • 🆕Release Notes
    • 📄White Paper
      • Discovery & Registration
        • mDNS
        • Discovery Service
        • Manual Connection
        • NDI Groups
      • NDI Protocols
        • Reliable UDP - NDI 5
        • Multipath TCP - NDI 4
        • UDP with Forward Error Correction – NDI 3
        • Single TCP – NDI 1
      • NDI Related Network Ports
      • Getting video across the network
      • Network Layout
      • Bandwidth
        • NDI High Bandwidth based on SpeedHQ2 (8bit 4:2:2)
        • NDI High Bandwidth based on SpeedHQ7 (8bit 4:2:2:4)
        • NDI HX2 h.264 (8bit 4:2:0)
        • NDI HX2 h.265 (8bit 4:2:0)
        • NDI HX3 h.264 (8bit 4:2:0)
        • NDI HX3 h.265 (8bit 4:2:0)
        • NDI Proxy and bandwidth optimization
      • Network Interface Settings
      • NIC Selection
      • Encoding and Decoding
      • Multicast
      • NDI Administrative Settings
      • Synchronization
      • NDI in the Cloud
    • Glossary
      • NDI Terminology
      • Industry Terminology
  • Using NDI
    • Introduction
    • NDI for Video
      • Digital Video Basics
      • NDI Video Codecs and Format Matrix
      • NDI Encoding Support Matrix
        • Practical NDI Receivers Format Support
        • Practical NDI Transmitters Support
        • Summary Table
      • Interoperability Scenarios
    • NDI for Audio
      • Digital Audio Fundamentals
      • Audio Over IP
      • Technical Facts About NDI for Audio
      • Use Cases
      • Products Using NDI for Audio
    • ⚒️NDI Tools
      • Release Notes
      • Installing NDI Tools
        • Software License Agreement
        • Privacy Policy
      • NDI Tools Launcher
      • NDI Tools for Windows
        • Access Manager
        • Bridge
          • NDI Bridge automation
          • Configuring Port Forwarding
          • Bridge Tool Logging
        • Remote
        • Router
        • Screen Capture
        • Screen Capture HX
        • Studio Monitor
        • Test Patterns
        • Webcam Input
      • NDI Tools for Mac
        • Access Manager
        • Scan Converter
        • Router
        • Test Patterns
        • Video Monitor
        • Virtual Input
      • Plugins
        • NDI for After Effects
        • NDI for Premiere Pro
        • NDI Output for Final Cut Pro
        • NDI for VLC
        • Audio Direct
        • OBS
    • Utilities
      • Analysis
    • Using NDI with Software
      • Getting Started with NDI in OBS for Windows or Mac
      • Using OBS Studio as a Commentary System
      • Using NDI Tools as a virtual camera in Mac
      • Using NDI and Dante on the same Network
      • Use OBS video + audio on Zoom with macOS
    • Using NDI with Hardware
      • NDI HX upgrades for cameras
      • How to Activate Panasonic Cameras for NDI HX1 — Step-by-Step
      • Recommended Network Switch Settings for NDI
  • Developing with NDI
    • Introduction
    • 📂SDK
      • Release Notes
      • Licensing
      • Software Distribution
        • Header Files
        • Binary Files
        • Redistributables
        • Content Files
        • Libraries
        • NDI-SEND
        • NDI-FIND
        • NDI-RECEIVE
        • Utilities
        • Command Line Tools
      • CPU Requirements
      • Dynamic Loading of NDI Libraries
      • Performance and Implementation
      • Startup and Shutdown
      • Example Code
      • Port Numbers
      • 🔧Configuration Files
      • Platform Considerations
      • NDI-SEND
      • NDI-FIND
      • NDI-RECV
      • NDI Routing
      • HDR
      • Command Line Tools
      • Frame Types
        • Video Frames
        • Audio Frames
        • Metadata Frames
      • Windows DirectShow Filter
      • 3rd Party Rights
      • Support
    • Advanced SDK
      • Release Notes
      • Licensing
      • Overview
      • Configuration Files
      • NDI SDK Review
        • Sending
          • Asynchronous Sending Completions
          • NDI Sending On High Latency Connections
        • Receiving
          • Custom Allocators
            • Video Allocators
            • Audio Allocators
          • Dynamic Bandwidth Adjustment
        • Finding
        • Video Formats
          • Receiver Codec Support Level
          • Frame Synchronization
      • Genlock
      • AV Sync
        • Guidelines
        • Creating and Destroying Devices
        • Recovering Audio
      • Using H.264, H.265, and AAC Codecs
        • Sending Audio Frames
        • Sending Video Frames
        • H.264 Support
        • H.265 Support
        • AAC Support
        • OPUS Support
        • Latency of Compressed Streams
        • Stream Validation
      • External Tally Support
      • KVM Support
      • NDI Advanced SDK FPGA Example Designs
        • Prebuilt uSD Images
        • NDI FPGA Reference Design
          • FPGA Projects
            • Changelog
          • C++ Application Code
            • Changelog
          • linux_kernel
            • Changelog
          • uSD Image Builder
            • Changelog
        • Changelog
    • Utilities
      • Unreal Engine SDK
        • Release Notes
        • Licensing
        • NDI Plugin Installation
        • Simple Setup of Broadcast and Receivers
        • NDI Broadcast Actor
        • NDI Receiver Actor
        • NDI Media Assets
        • Getting Started with Example Blueprint Projects
        • Advanced
      • Free Audio
      • Bridge Service
        • Installation
          • Silent Installation
        • Configuration
          • Web UI
          • Configuration File
          • Manual API Key Management
        • Webhooks
        • WebSockets
        • API
    • NDI Certified
      • Certification Guidelines
        • Interoperability Requirements
        • Technical Requirements
      • Certification Process
        • Pre-certification Checklist
        • Device Testing Methods
          • Camera
          • HDMI Encoder
          • SDI Encoder
          • Decoder
          • NDI Controller
          • NDI Monitor
          • Multicast Testing
        • Detailed process
    • Metadata
      • Metadata Sources
      • Metadata for XML
      • XML Validation
      • Metadata Elements
      • Proposed New Metadata Messages
      • PTZ and Control Messages
      • Undocumented Mysteries
  • FAQ
    • Index
    • NDI Tools
      • What is the NDI Analysis Tool and where do I get it from?
      • Why does my NDI connection stay active once the source is offline?
      • Why are my changes to the NDI JSON configuration file not being saved?
      • Why is the license for my Panasonic camera not active?
      • How does registration for NDI Tools work?
      • How do I use NDI output with Microsoft Teams
      • The time code on my file is incorrect, how do I change it?
      • Where is Screen Capture (HX) for Mac?
      • How can I make NDI Tools launch automatically?
      • What is the NDI ECCN?
    • NDI Certified
      • What is the NDI Certification Program?
      • Why did you start this certification program?​
      • What happens to my device after it's certified?
      • Is certification mandatory to be a partner of NDI?​
      • I am an OEM manufacturer, can my products be certified?​
      • How long does the certification process take?
      • How do I become certified?​
      • What happens if my product doesn’t meet the requirements for Certification?​
      • Are there any fees to become NDI Certified?
    • Common Issues
      • I'm having trouble getting multicast set up.
      • I'm having trouble with my NDI HX License
      • Why can't I find my Android 14-based NDI devices on my network?
      • Why won’t NDI Tools install on my Windows PC?
      • How do I enable NDI in “New” Microsoft Teams (Windows only)?
      • Why can’t HX Capture display the full resolution of my iPad or iPhone?
      • The NDI HX Camera app won't launch on older phones and iOS
      • Why won't MacOS Sonoma (14.1) recognize NDI Tools as a virtual camera?
      • I'm having issues with Virtual Input for macOS
      • I'm having issues with Final Cut Pro
      • NDI Camera App Issue
    • SDK
      • Where can I find the source code for the FPGA board?
      • What system resources are required to support a design including the NDI FPGA Codecs?
      • Why can’t my h264/265 video be received by an NDI receiver when using the embedded SDK?
      • Can I use the Unreal SDK on Mac?
      • What are the Differences Between the NDI SDK and the NDI Advanced SDK
    • ✨NDI 6
      • Do I need to upgrade to NDI 6 if I'm not using the new features?
      • Is there a fee to upgrade to NDI 6
      • Why doesn't my existing Vendor ID work with NDI 6?
      • How can I get a previous version of NDI Tools or the SDK?
    • NDI HX License Upgrades
      • What is happening with NDI HX Upgrades?
      • Will my existing HX-upgraded camera be affected?
      • I bought a camera before June 30, 2025, but didn't buy an HX license. Can I still get one?
      • I bought a license and a camera but didn't redeem it until after. Can I still get an HX license?
      • If my HX upgrade fails can I transfer the license?
      • Can I sell my upgraded HX camera and keep the license?
      • Will my NDI version work with my current HX license?
      • What does the HX upgrade sunset program mean for camera manufacturers?
      • What will NDI Support do for licenses after the sunset date?
      • I factory reset my camera and forgot the license. Can you help me get it back?
Powered by GitBook

2024 @ NDI Vizrt AB.

On this page
  • Altera Bootloader and Linux Kernel
  • Directory Structure:
  • Building an Existing Project
  • PetaLinux Projects for NDI Xilinx Hardware Platforms
  • Generating Example Designs
  • Rebuilding Example Designs after Modification
  • Modifying Example Designs
  • Building a New Project From Scratch

Was this helpful?

Export as PDF
  1. Developing with NDI
  2. Advanced SDK
  3. NDI Advanced SDK FPGA Example Designs
  4. NDI FPGA Reference Design

linux_kernel

Altera Bootloader and Linux Kernel

The U-Boot bootloader and Linux kernel are built from git repositories provided by altera-opensource on github. See RocketBoards.org for full details.

Directory Structure:

Directory
Target Development Board

a10-socdk

Arria-10 SoC Development Kit

SoCKit

Arrow/Terasic SoCKit

Building an Existing Project

The build instructions from Altera:

https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10

...involve quite a few manual steps. These steps have mostly been automated via a Makefile, with some additional changes to customize the kernel as needed for the NDI Advanced SDK (enable UIO devices and create custom device-tree nodes).

The Makefile will checkout the source directories, patch and configure as required, then build the files required to boot and create a uSD image. Warnings about watchdog and timer drivers are expected while building U-Boot from the Altera released sources can be ignored.

The configuration snippet uio.fragment enables the required uio kernel modules.

The patch file 0001-NewTek-Altera-NDI-device-tree-entries.patch adds the required device-tree nodes for logic in the FPGA fabric. See the instructions from Altera for full details:

https://www.rocketboards.org/foswiki/Documentation/HOWTOCreateADeviceTree

Note:

If you follow the RocketBoards instructions for generating the Cyclone-V boot files, the FPGA will not be programmed by default. The provided Makefile builds a u-boot.scr file which is executed by the default Altera U-Boot bootcmd. This script programs the FPGA prior to loading the Linux kernel and device-tree.

PetaLinux Projects for NDI Xilinx Hardware Platforms

All steps below require you have an appropriate version of the Xilinx PetaLinux tools installed on your development machine. Refer to Xilinx UG1144 "PetaLinux tools Documentation: Reference Guide" for detailed instructions on installing PetaLinux and the required prerequisites.

Generating Example Designs

Example Petalinux projects for the Digilent Zybo Z7-20 and Xilinx ZCU104 are provided as prebuilt Xilinx support archives (XSA files from Vivado), build scripts and a Makefile to allow end users to regenerate complete projects and boot images without being required to download large archives or binary files.

For example:

# To create an NDI encoder example design for the Zybo Z7-20
$ make zybo-enc

The following boards and NDI configurations are supported (see make help for a list of available targets):

Configuration
Contents

Arty-Z7-20-Enc

NDI encoder for the Digilent Arty Z7-20

Zybo-Z7-20-Enc

NDI encoder for the Digilent Zybo Z7-20

Zybo-Z7-20-Enc-Lite

NDI encoder for the Digilent Zybo Z7-20 with 16-bit SDRAM

Zybo-Z7-20-Dec

NDI decoder for the Digilent Zybo Z7-20

ZCU104-Enc

NDI encoder for the Xilinx ZCU104

ZCU104-Dec

NDI decoder for the Xilinx ZCU104

Building SD card images, containing a root filesystem, application software, and operating system, requires that Petalinux projects in these locations be created so that the kernel, device tree, and bootloaders can be found. See ../uSD_os/README.md for details on how this should be performed.

Generating example designs for all supported platforms requires a significant amount of disk space (at least 150GB) so it is recommended that users only build example designs for their platform of choice. Additionally, PetaLinux 2022.1 must be installed per the instructions detailed in Xilinx UG1144, "PetaLinux Tools Documentation: Reference Guide". Among other things, the petalinux tools must be installed in a location that is writable by the current user. This location needs to be provided prior to running make via the PETALINUX_ROOT environment variable.

Rebuilding Example Designs after Modification

Xilinx FPGA IP Added or Removed

If you add or remove any Xilinx IP blocks with Linux kernel drivers, the PetaLinux project needs to be updated to incorporate the changes. The easiest way to do this is simply follow the directions for "Building a new project from scratch", below, skipping the petalinux-create command. This will complete much faster than the initial build, since most of the build artifacts are cached and can be reused.

The minimum process to update a project with new hardware definitions is:

  • Export the hardware platform

    In Vivado, select the File -> Export -> Export Hardware menu option and make sure that the bitstream is included in the exported Xilinx support archive.

  • Import the new hardware definition and reconfigure the project:

    cd <projectname>
    petalinux-config --get-hw-description=/path/to/vivadoproject/project.xsa
  • Reconfigure bootloader or kernel if desired

    petalinux-config -c u-boot
    petalinux-config -c kernel
  • Rebuild the device tree and bootloader

    petalinux-build -c u-boot
  • Package the output products

    petalinux-package --boot --fpga /path/to/<bitstream> --u-boot

This will yield updated files in projectdir/images/linux, notably the BOOT.BIN and device tree, which can then be copied to the boot medium.

FPGA Bitstream Updated

If you update the FPGA bit file with hardware changes that do not alter the automatically generated device-tree, the update process is much simpler. Simply rebuild the boot files using the updated bit file:

# Rebuild the boot files
petalinux-package --boot --fpga /path/to/<bitstream> --u-boot --force

Device Tree Changes

If you update the system-user.dtsi file, the system device tree needs to be updated and the changes need to be incorporated into the boot loader.

# Rebuild just the boot loader
petalinux-build -c u-boot

# Rebuild the boot files
petalinux-package --boot --fpga /path/to/<bitstream> --u-boot --force

Modifying Example Designs

To modify an existing example design after it is generated, use the following general procedure:

# Setup the Petalinux environment
source /path/to/petalinux/2022.1/settings.sh

# Change to the appropriate project directory
cd projectdir

# To make project level changes (e.g., image packaging configuration)
petalinux-config

# To reconfigure other components such as U-Boot
petalinux-config -c u-boot

# New output products can then be built, which PetaLinux will place
# at projectdir/images/linux
petalinux-build

Once new PetaLinux output products have been created in images/linux, new boot images can be built from scripts in the ../uSD_os directory.

Building a New Project From Scratch

If you are not using one of the supported development boards you may need to build a PetaLinux project from scratch. Full details for working with PetaLinux can be found in Xilinx UG1144 "PetaLinux Tools Documentation: Reference Guide". A brief summary of one possible work flow is provided below.

  • Create a Vivado project for your target board or component. Note that during project creation, the option of a Vitis extensible platform should not be selected. Vitis is not required at any point in this design flow.

  • Build the hardware project in Vivado

  • Export the hardware platform and include the bitstream in the exported support archive (i.e., the XSA file).

  • Create a new PetaLinux project for the target platform

    # For Zynq-7000
    petalinux-create -t project -n <projectname> --template zynq
    
    # For Zynq Ultrascale
    petalinux-create -t project -n <projectname> --template zynqMP

If your design needs required a board support package (BSP) then project creation will need to reference this via the --source argument.

  • Configure the Petalinux project and import the hardware definition, usually through a command of the form

    cd <projectname>
    petalinux-config --get-hw-descrtipion /path/to/project/exported.xsa
  • Customize the PetaLinux project (optional)

    # Configure the bootloader, kernel, and other components
    petalinux-config -c u-boot
    petalinux-config -c kernel
  • Modify the system-user.dtsi to reflect the FPGA hardware or other device tree changes necessary

    Xilinx IP cores should be automatically added to the device tree, but details for any custom FPGA logic must be added manually. Details will depend on the specifics of your FPGA project. Refer to the existing projects for examples:

    projectdir/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

    Some additional information can be found by looking at the device tree source files that ship with the example design in the device-tree directory

  • Build the PetaLinux project

    petalinux-build

    If the build (or the configure) commands fail, attempt to run the build again and examine the log files.

  • Create boot files

    Generally, a BOOT.BIN needs to be created that contains the FSBL, PMU firmware (for the US+), second stage bootloader (e.g., U-Boot) and a device tree. The specific command options needed will depend on the configuration options needed for the target platform. The following example is for a uSD image with the boot loader programming the FPGA prior to booting the Linux kernel:

    petalinux-package --boot --fpga /path/to/fpga.bit --u-boot --fsbl
    
    # If you have previously generated the boot files and want to rebuild them,
    # you need to add the --force flag
    petalinux-package --boot --fpga /path/to/fpga.bit --u-boot --fsbl --force

Notes

  • The petalinux-build step will occasionally fail when performing a full build from scratch. Simply re-run the petalinux-build command and the build will continue. Sometimes it is necessary to re-run the petalinux-build step several times.

  • If the petalinux-build step repeatedly fails in the same place, examine the log files as there may be missing dependencies.

  • Output files will be in the projectdir/images/linux/ directory.

Last updated 4 months ago

Was this helpful?