Important Note: On Arria 10 there are two different Device Trees: one required by Bootloader (U-Boot) and one required by the Linux kernel. The Device Tree referred to in this page is the U-Boot one.

Important Note: The U-Boot Device Tree Generation is supported on both Linux and Windows host machines, but U-Boot compilation is supported only on Linux host machines.

The following figure presents an overview of the bootloader flow:


Note that all the operations are automated through the Makefile generated by the Bootloader Generator (BSP Editor in the above figure). Therefore the user does not need to manually call utilities such as "cat' or 'mkpimage' as shown in the figure.


The following are required
  • Host PC, running Linux
  • SoC EDS version based on Release Tags.
  • Already compiled SGMII GHRD (the following assume a re-compiled copy of SGMII GHRD downloaded from Release Tags. to the user home folder. But directly using the pre-compiled version that comes with SoC EDS will also work).

Generating Bootloader

This section presents how to run the Bootloader Generator (BSP Editor) to:
  • Generate the Device Tree
  • Generate the U-Boot Makefile
The above are generated based on the hardware handoff information and user options.

1. Start an Embedded Command Shell:
$ ~/intelFPGA/*/embedded/embedded_command_shell.sh # Replace * with Quartus version installed

2. Start the BSP Editor:
$ bsp-editor&

3. In the BSP Editor window, go to File → New HPS BSP ... This will open the New BSP window.


4. In the New BSP window, click the ... (Browse) button for the Preloader Settings Directory. This will open a file browser window.


5. Browse to the folder ~/a10_soc_devkit_sgmii/hps_isw_handoff and click Open to get back to the New BSP window.


6. In the New BSP window:
  • Select the Operating System to be U-Boot Bootloader (Arria 10 HPS)
  • Leave the Use default locations enabled. This will create the new BSP in the ~/a10_soc_devkit_ghrd/software/uboot_bsp folder.

8. Click OK. That will create the BSP settings file and close the New BSP window.

9. Edit BSP settings as follows:
  • boot_device: Boot from SD/MMC (default)
  • model: SOCFPGA Arria 10 DevKit (default)
  • disable_ubot_build: unchecked (default)

For Rev C board:
  • periph_rbf_filename: ghrd_10as066n2.periph.rbf


10. In BSP Editor window, click Generate to generate the source code and the U-Boot Device Tree.


11. In BSP Editor window, click Close to close the generator window.

Creating Bootable Image

This section presents how to:
  • Build U-Boot
  • Compile U-Boot Device Tree Source into Device Tree Binary
  • Concatenate U-Boot Binary and Device Tree Binary
  • Add BootROM required header to the combined image
It can all be done by running a single make command.

12. Within the Altera Command Shell, go to the U-Boot folder and run make:
$ cd ~/a10_soc_devkit_ghrd/software/uboot_bsp
$ make

This will create the following files in the folder ~/a10_soc_devkit_ghrd/software/uboot_bsp:
  • u-boot_w_dtb.bin – concatenation of the U-boot binary and the device tree binary
  • uboot_w_dtb-mkpimage.bin – bootable image, containing 4 of the above images, each wrapped with the mkpimage header.

Give us your feedback

© 1999-2018 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.