Linux* Developer Center

SoC FPGA and Nios® II Processor

Linux is the most commonly used open-source operating system (OS). Linux is modeled after Unix and provides built-in drivers that support a vast array of devices, including devices found on Intel® SoC FPGA boards.

Intel provides an SoC FPGA Linux* kernel that is based on the Linux kernel from kernel.org together with other additions, such as board support packages and drivers.  

Intel is a core member of the Linux Foundation and contributes to many Linux open-source projects. Intel is a strong Linux community participant and supporter. The Intel Linux development website, RocketBoards.org, provides getting started help, design examples, documentation, and community forums to share ideas and collaborate.

Use the following links to learn how to use Linux on Intel SoC FPGAs. For first time users, it is recommended to follow the resources linearly.

Visit RocketBoards.org and click on the Register button. RocketBoards.org provides access to:

  • Comprehensive SoC FPGA Linux* information:
    • Updates on the latest Linux releases
    • Step-by-step getting-started guides
    • Intel® SoC FPGA Golden System Reference Designs (GSRD)
    • Example projects, applications, and designs from Intel and the SoC community
  • Community support
    • Access to forum discussions and collaborations from Intel and the SoC community
    • Active member participation in answering SoC FPGA and Linux questions

Why use Embedded Linux?

For embedded systems such as smartphones, tablets, PDAs, set-top boxes, and personal media players, an embedded Linux* OS is a natural choice because it addresses many of the features designers look for in an OS.

Cost

  • This community-supported open-source software is free. You have the option of building your own Linux system by starting with a license-free Linux OS kernel. Available frameworks and applications are offered within the embedded Linux community to create the complete system solution.

Performance

  • Embedded Linux offers better real-time performance over standard Linux because it is customized to work on an embedded platform and is optimized for power. 

Size

  • The embedded Linux kernel is simpler and smaller than that of the standard Linux OS.

Support

  • Numerous companies contribute to the open-source embedded Linux with continuous kernel compatibility updates and advanced tools.
  • Embedded Linux support sites, such as RocketBoards.org, provide new and advanced users with getting-started guides, design examples, and community forums.
  • Developers that need a commercial embedded Linux solution can use available Linux distributions from WindRiver, MonteVista, and Timesys. 
  • Developers can find numerous device-specific drivers, such as USB and Ethernet.

Customization

  • Developers can customize the Angstrom Distribution to their specific application.  The latest Linux kernels are always available for download at kernel.org.

Ease of Use

  • Linux OS drivers offer a high-level device abstraction with minimal effort.  You can build Linux drivers to provide user space access into custom user peripherals in the FPGA fabric.  

Safety

  • Embedded Linux offers a highly stable and tested kernel to use with safety-critical applications. 
  • Open-source safety groups provide presentations, literature, and safety certification for embedded Linux applications.

Portability

  • Many custom-purpose microprocessors have embedded Linux kernel support.

Innovation

  • Collaborative development supports rapid Linux evolution.
  • Linux communities provide a faster medium for incubation and the testing of new capabilities.
  • Absence of contractual constraints allows developers to create new uses, markets, and platforms for the Linux OS.

Embedded Linux works especially well with Intel® SoC FPGAs because:

  • Linux offers features that take full advantage of the Intel SoC hard processor system Symmetric Multiprocessor Hardware configuration
  • Development vendors such as WindRiver, MontaVista, and Timesys offer Intel embedded Linux solutions for quick time to market
  • The Linux kernel for Intel SoC FPGAs follows normal ARM* Linux processes for building and running.

Linux Considerations

After you decide to use a Linux system, there are certain aspects of your design that you need to consider:

  • Decide if you want to build your own Linux system or use a commercial offering
    • If you decide you do not want to build your own Linux distribution you may use a commercial offering from WindRiver, Monta Vista, and Timesys or some other Linux application provider.
  • If you decide to customize your design, you must determine which Linux kernel version to download from kernel.org. A custom design requires more software development but offers a lower cost solution.
  • Determine which kernel to use. This decision should be based on your application needs. The two versions are categorized as "stable" and "development". Visit kernel.org to see various available kernel options.
  • Establish your build strategy. The current supported build strategies are:
  • Determine if you want to use existing device drivers or create your own. You can find a list of available Intel SoC FPGA device drivers on RocketBoards.org
  • Choose how to implement multiprocessing. The Intel SoC hard processor system is a classic symmetric multiprocessing (SMP) hardware configuration.  You can implement asymmetric multiprocessing (AMP) by using methods such as SMP with core affinity or core reservation. Please refer to the Technical Reference Manual (TRM) for more details.
  • Determine if you require customization of some components of the Linux build process. If so, you must be familiar with the following:
    • Linux boot process
    • Tools used in the board bring-up process
    • U-Boot customization
    • Linux root file system and ways to customize it

Nios® II Processor on Linux System

Please visit the Nios® II Linux User Manual web page for Linux kernel build and boot instructions.

The diagrams above contain three basic stages:

Stage Description
Boot ROM Brings the processor out of reset, performs minimal configuration, and loads the U-Boot into the on-chip RAM
U-Boot Configures the I/Os, FPGA, phase-locked loops (PLLs) and clocks; initializes DDRAM and loads the Linux* kernel
Linux Manages processes, memories, network stack, and device drivers and runs the end application

The primary steps contained within these stages are:

  1. Create a hardware design using the Platform Designer. The design includes:
    • HPS configuration of clocks, pins, DDR, and interfaces.
    • FPGA fabric configuration of FPGA intellectual property (IP), pins, memory controllers, and PLLs.
  2. Compile the hardware design with the Intel Quartus® Prime software tools. The following files are created:
    • SRAM object file (SOF): Holds the data that configures the FPGA fabric
    • Handoff file: Contains information used by the second stage boot loader (SSBL) generator to create the HPS boot loader
    • System-on-a-programmable-chip information (SOPCINFO) file: Hardware system information that creates the device tree with FPGA soft IP addresses.
  3. Use the Intel Quartus Prime software tool to convert the SOF file into a raw binary file (RBF) that is used to program the FPGA.
  4. Configure the boot loader generator tool in the board support package (BSP) editor of the Intel SoC FPGA Embedded Development Suite (SoC EDS) to use the handoff file for generating the boot loader (U-Boot).
  5. Select and configure your boot source. You may choose from FPGA, SD/MMC, QSPI, or NAND.
  6. Boot the Linux kernel. Optionally, write hardware or soft IP drivers.

Refer to the Intel® SoC FPGA Embedded Development Suite User Guide for a basic understanding of SoC EDS tools and components. While not all the sections of the document describe boot loader and Linux* development, Intel highly recommends reviewing at least the following sections:

SoC EDS Section Description
Introduction Provides a general overview of features and the hardware-software development flow.
Installation Outlines how to install the SoC FPGA EDS and the included ARM* Development Studio 5* (DS-5*)
Licensing Provides licensing options for the SoC FPGA EDS and how to install the license
Embedded Command Shell Describes how to start the shell that accesses the rest of the SoC FPGA EDS tools
alt-boot-disk-util Describes the utility that updates the preloader and boot loader on a physical SD card
bsp-editor Details the graphical user interface (GUI) that allows you to generate the board support package (BSP): boot loader and Linux device tree
Linux compilers Summarizes the compilers included with the SoC EDS

As an operating system, Linux sits underneath all the other software. It receives requests from those programs and relays these requests to the computer’s hardware.

Understanding the five main subsystems of the Linux* kernel allows you to efficiently use the following features:

  • Process scheduler
  • Interprocess communication (IPC)
  • Memory management 
  • File system
  • Networking subsystem: 
Technical Reference Manual
 
The technical reference manuals contain a detailed description of the hardware, including the behavior, base addresses, interrupt mapping and control, and status registers for all of the peripherals. This resource is valuable when debugging complex bare-metal scenarios.
Additional Document Resources
  • RocketBoards.org is the starting point for all GSRD (Golden System Reference Design) binaries and project examples for Intel® SoC FPGA development kits.
  • On the home page, click on the START button or select Getting Started in the drop-down list under the Documentation tab.

To find the features, specifications, documentation, and design support for a specific board, select BOARD from the navigation menu on the home page.  

Note that the Intel® SoC FPGA development kits offer getting-started guides and numerous design examples. 

Select an Intel® Quartus® Prime software version to use with your design.

Tips:

  • For access to the latest design tool updates and security patches, use the latest Intel Quartus Prime software version.
  • If you are targeting a specific Linux* version, ensure you select the correct tool version that is compatible with the Linux version.

Depending on the development board and tool version you select, the tasks available under the Select a Task pull down vary. Most of the tasks you can complete are shared among development boards. 

Some common available tasks you can select are:

  • Booting Linux from SD Card
  • Compiling Hardware Design
  • Generating U-Boot and Device Tree
  • Generating the Linux* Device Tree
  • Compiling Linux
  • Generating and Updating the SD card
  • Booting from QSPI Flash
  • Booting from NAND Flash

Download the Intel® SoC FPGA Embedded Development Suite (SoC EDS) from the Intel FPGA Design Software Download Center and follow these instructions to install the SoC EDS.

The SoC EDS contains essential tools that are required for all SoC FPGA development such as generating U-Boot and a Linux* device tree.  The SoC EDS provides the golden hardware reference design (GHRD).

For more details, refer to the Intel SoC FPGA Embedded Development Suite Overview page.

The Intel® SoC EDS provides the following tools and utilities required to configure, compile, and create binaries:

  • The Linaro Linux* compiler is shipped with the SoC EDS
  • The device tree generator tool is used to create device trees for SoC systems that contain FPGA designs created using the Platform Designer
  • SoC EDS SD card boot utility is a tool for updating the boot software on an SD card

At this point, you have downloaded and installed the Intel® Quartus® Prime software and the Intel SoC EDS golden system reference design (GSRD).  You have also obtained the golden hardware reference design (GHRD) from the GSRD.  To complete your Linux* project, you must follow these general steps:

  1. Add your custom hardware component to the design using the Platform Designer.
  2. Use the Intel Quartus Prime software to compile your design.
  3. Use the SoC EDS and GSRD source tools to build the preloader or U-Boot.
  4. Build Uboot, Linux and the Root Filesystem separately from the Git Tree or use the Angstrom distribution.
  5. Add any custom drivers to the Linux kernel source and make the necessary additions to the kernel configuration.
  6. Create a Linux application.
  7. Select and program a boot source for your device.
  8. Run the application on your device.

Go to the Soft IP to Linux Project Example. This example:

  • Uses the golden system reference design (GSRD) as a base to which a custom high-resolution timer is added
  • Builds all the required binaries to boot the Intel® Arria® 10 SoC device
  • Creates a Linux* driver and user space application that interacts with the hardware
  • Provides a reference on how to boot your device and build Linux drivers for customer components

Some details to consider when you start your own design:

  • It is important to identify which development kit and tool version you want to use.  It is generally best to begin with the latest version.  If you must work with a specific Linux version, ensure that the tool version you have selected is compatible.
  • Each development kit and tool version has its own reference design.  The GSRD provides a set of essential hardware and software system components that you can use as a foundation to create your custom design.
Repository Description
linux-socfpga.git/
SoC FPGA Linux* development repository
  • Mirrors kernel.org Linux repository releases
  • Downstream branches for SoC FPGA specific
patches and updates
meta-altera.git/ Repository for SoC FPGA Yocto recipes
  • Starting point for custom Yocto recipes
angstrom-socfpga.git/ Setup scripts for SoC FPGA Angstrom
distribution
uboot-socfpga.git/ SoC FPGA U-Boot development repository
sopc2dts.git/ Device Tree Generator (sopc2dts) repository
linux-refdesigns.git/ Software source code for Linux reference designs

The following links provide details on how to manually build and generate binaries used in the Linux* boot process. 

Resource SoC Device GSRD Version
Creating and Updating the SD Card Intel® Arria® 10 17.0
Flash programming: QSPI, NAND, and SDMMC Intel Arria 10 16.1
Programming FPGAs  Cyclone® V / Arria V 17.0
Generating the U-Boot Script Cyclone V  
Generating and Compiling the Preloader Cyclone V / Arria V All
Generating U-Boot and the Device Tree Intel Arria 10 17.0
Preloader and U-Boot Customization Cyclone V / Arria V 13.1
Building initramfs Kernels (Simple Root Filesystem) Intel Arria 10 /
Cyclone V / Arria V
All
Device Tree Generator (Linux)  Intel Arria 10 17.0
Understanding the Linux Device Tree Intel Arria 10 /
Cyclone V / Arria V
All
Compiling Linux (Building the Kernel and RFS Using Angstrom or from GIT) Intel Arria 10 /
Cyclone V / Arria V
All
Yocto User Manual Arria V 14.0
Angstrom Root Filesystem HowTo Intel Arria 10 /
Cyclone V / Arria V
All
Building Yocto RFS with meta-altera Intel Arria 10 /
Cyclone V / Arria V
All
Resource SoC Device GSRD version
Datamover Design Example Cyclone® V 14.0
Partial Reconfiguration Intel® Arria® 10 16.1
PCIe* Root Port with MSI Intel Arria 10 / Cyclone V / Arria V 17.0
SGMII Design Example Cyclone V 14.0

SoC Hard IP Driver Support

The Intel® FPGA SoC hard processor system integrates many third-party IP cores from:

  • ARM
  • Synopsys* DesignWare
  • Cadence

Because these third-party IP cores are typically widely used and have community support, the drivers available for them are generally well-tested and stable.

RocketBoards.org maintains a list of available drivers for Intel SoC FPGA peripherals.

Rocketboards.org is an Intel® SoC FPGA Linux* resource site. It is a collaboration site that can be used to find device-specific application notes that describe how to build various components required for the Linux boot.

Linux for Intel® SoC FPGAs is developed from the open-source Linux* kernel from kernel.org. Support for Intel SoC FPGA-specific parts of the Linux kernel (drivers and BSP) is available through the Intel FPGA Community

Rocketboards Forum is a community website that enables collaboration between different users of Intel FPGA products. Use the search engine to find relevant material. You are also are encouraged to update and contribute. 

As with many open-source projects, we encourage customers to also use the open-source mailing lists for Linux in areas that are not specific to Intel SoC FPGAs.

Use your My Intel account to file a service request for assistance, to register for a training class, or to access other resources. Registration is required before you can access these services.