This page presents how to generate and compile the Preloadr, based on the handoff information from Quartus.



The following are required in order to be able to fully exercise the GSRD:

Reference Information

For detailed information about the Preloader Generator see SoC EDS User Guide


The procedure shown below uses the Cyclone V GHRD as an example. The procedure for Arria V GHRD is identical, with only file names being changed.

Generating the Preloader

1. Compile the GHRD as described in Compiling the Hardware Design to obtain the handoff folder.

2. Start an Embedded Command Shell and go to GHRD folder (assumed here to be saved in the home folder):
$ ~/altera/13.1/embedded/embedded_command_shell.sh
$ cd ~/cv_soc_devkit_ghrd 

3. Start the Preloader Generator aka BSP Editor
 $ bsp-editor& 

4. In the BSP Editor, select File → New BSP ...


5. In the New BSP window, click the ... browse button to browse to the handoff folder


6. Select the cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0 folder and Click Open.


7. The New BSP window will have all the settings populated, based on the handoff folder. Accept the default settings and click OK. This will close the window.


8. In the BSP Editor window, edit any settings if necessary, then click Generate.


9. The message panel on the bottom will indicate the status of the generation. Click Exit to close the BSP Editor.new-bsp-5.png

The following items are generated in the cv_soc_devkit_ghrd/software/spl_bsp/ folder
File Description
generated Folder containing source code that was generated based on the information from the handoff folder
settings.bsp Preloader settings file, that contains the settings from the Preloader Generator
Makefile Makefile used to build the Preloader
preloader.ds ARM DS-5 AE that can be used to load the Preloader

Compiling the Preloader

1. Start an Embedded Command Shell and go to the generated Preloader folder:
$ ~/altera/13.1/embedded/embedded_command_shell.sh
$ cd ~/cv_soc_devkit_ghrd/software/spl_bsp 

2. Run makecommand to build the Preloader image
$ make

The Makefile (also created by the Preloader Generator) performs the following steps:
  1. Extract the fixed part of the Preloader source code
  2. Build the Preloader executable using the fixed and the generated parts of the Preloader source code
  3. Convert the executable to binary, then add the bootROM required header on top of it

The following files are built in the cv_soc_devkit_ghrd/software/spl_bsp/ folder
File Description
uboot-socfpga/spl/u-boot-spl Preloader ELF file
uboot-socfpga/spl/u-boot-spl.bin Preloader binary file
preloader-mkpimage.bin Preloader image with the BootROM required 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.