Overview
A makefile is included with the GHRD to provide automated command line build options. This can be used as an alternative build method and some users might find this more convenient.
The makefile utilities can be separated into the following categories
- Quartus and Qsys GUI edit
- Quartus and Qsys compile
- Generate .sof and .rbf FPGA images
- Program the FPGA or QSPI devices via the USB-Blaster II
- Reset the HPS via the USB-Blaster II
- Create the preloader and u-boot images
- Copy the preloader and u-boot binary images to an SD card binary partition
- Create the device tree
Prerequisites
The following items are required:
Procedure
1. Open an embedded shell and cd to the home folder.
2. Retrieve the archive file
sockit_ghrd_15.1.tar.gz
containing the hardware design and save it in the home folder. The file is available at
sockit_ghrd_15.1.tar.gz.
3. Extract the files from the archive
$ cd ~
$ tar xzf sockit_ghrd_15.1.tar.gz
4. Make all the files writable (optional)
$ chmod 777 -R ~/sockit_ghrd
Make utilities
make all
The entire GHRD can be built using the make all command. This command will result in the following operations.
- Qsys generation
- Quartus compilation
- Custom Preloader and uboot creation and compilation
- Device tree creation and compilation
make qsys_edit
Launches the Qsys GUI and opens the soc_system.qsys project
make qsys_compile
Generates the Qsys project
make quartus_edit
Launches the Quartus GUI and opens the soc_system project
make quartus_compile
Compiles the Quartus project
make sof
Compiles the Quartus project and creates the sof configuration file
make rbf
Compiles the Quartus project and creates the rbf configuration file. The configuration mode is Fast Passive Parallel, x32, compressed
make program_fpga
Downloads the sof configuration file to the FPGA
make program_qspi
Programs the on board qspi device with the preloader binary image. It uses the quartus_hps utility to do this.
make hps_cold_reset
Sends a cold reset request to the hps via the jtag
make hps_warm_reset
Sends a warm reset request to the hps via the jtag
make preloader
Creates and compiles the custom preloader
make uboot
Creates and compiles uboot
make sd-update-preloader
Copies the preloader binary to the binary partition of an SD card plugged into the PC
make sd-update-uboot
Copies the uboot binary to the binary partition of an SD card plugged into the PC
make sd-update-preloader-uboot
Copies both the preloader and uboot binaries to the binary partition of an SD card plugged into the PC
make dts
Creates a custom Device Tree. The output dts file is readable text
make dtb
Creates a custom Device Tree. The output dtb file is binary
make u-boot.scr
Creates a custom uboot script file. The input is the boot.script source file
Generated Files
This section presents the name and location of the files generated as a result of compiling the hardware design.
make utility |
File |
Description |
---|
all |
sockit_ghrd/output_files/soc_system.sof |
SRAM Object File - for programming FPGA |
---|
|
sockit_ghrd/output_files/soc_system.rbf |
Raw Binary File - for programming FPGA |
|
sockit_ghrd/soc_system.sopcinfo |
SOPC Info File - Used by Device Tree Generator |
|
sockit_ghrd/soc_system/synthesis/soc_system_hps_0_hps.svd |
System View File - Used by ARM DS-5 AE |
|
sockit_ghrd/hps_isw_handoff |
Handoff folder - Used by Preloader Generator |
|
sockit_ghrd/software/preloader/preloader-mkpimage.bin |
Preloader Binary File |
|
sockit_ghrd/software/preloader/uboot-socfpga/u-boot.img |
uboot Binary File |
|
sockit_ghrd/soc_system.dts |
Device Tree Source File |
|
sockit_ghrd/soc_system.dtb |
Device Tree Binary File |
|
|
qsys_compile |
sockit_ghrd/soc_system.sopcinfo |
SOPC Info File - Used by Device Tree Generator |
---|
|
|
quartus_compile |
sockit_ghrd/output_files/soc_system.sof |
SRAM Object File - for programming FPGA |
---|
|
sockit_ghrd/soc_system/synthesis/soc_system_hps_0_hps.svd |
System View File - Used by ARM DS-5 AE |
|
sockit_ghrd/hps_isw_handoff |
Handoff folder - Used by Preloader Generator |
|
|
sof |
sockit_ghrd/output_files/soc_system.sof |
SRAM Object File - for programming FPGA |
---|
|
|
rbf |
sockit_ghrd/output_files/soc_system.rbf |
Raw Binary File - for programming FPGA |
---|
|
|
preloader |
sockit_ghrd/software/preloader/preloader-mkpimage.bin |
Preloader Binary File |
---|
|
|
uboot |
sockit_ghrd/software/preloader/uboot-socfpga/u-boot.img |
uboot Binary File |
---|
|
|
dts |
sockit_ghrd/soc_system.dts |
Device Tree Source File |
---|
|
|
dtb |
sockit_ghrd/soc_system.dtb |
Device Tree Binary File |
---|
|
|
u-boot.scr |
sockit_ghrd/u-boot.scr |
uboot script File |
---|