Intel® Arria® 10 SoC UEFI Boot Loader User Guide

ID 683536
Date 12/15/2017
Document Table of Contents Generate mkimage

  1. Type the following command to convert the file.
    $ quartus/bin/quartus_cpf -c --hps -o bitstream_compression=on 
    This command creates the following files in the <your_working_directory>/a10_soc_devkit_ghrd/output_files/ folder:
    Table 14.  Resultant RBF File Output
    File Description
    ~ /a10_soc_devkit_ghrd/output_files/ghrd_10as066n2.periph.rbf I/O ring configuration file
    ~ /a10_soc_devkit_ghrd/output_files/ghrd_10as066n2.core.rbf FPGA fabric configuration file
  2. Type the following command to add the mkimage header to ghrd_10as066n2.periph.rbf:
    $ mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n "RBF" -d ghrd_10as066n2.periph.rbf ghrd_10as066n2.periph.rbf.mkimage
  3. Type the following command to add the mkimage header to the ghrd_10as066n2.core.rbf:
    $ mkimage -A arm -T firmware -C none -O u-boot -a 0 -e 0 -n "RBF" -d ghrd_10as066n2.core.rbf ghrd_10as066n2.core.rbf.mkimage
    The following files are now in your <your_working_directory>/a10_soc_devkit_ghrd/output_files/ folder:
    Figure 118. Resultant mkimage Files
  4. Create the SD Card image with the PEI.ROM, ghrd_10as066n2.periph.rbf.mkimage, and ghrd_10as066n2.core.rbf.mkimage.
    1. Download the tool from here.
      To obtain more information about the tool, please run the tool with the -h option:
      $ ./ -h
    2. Create a new folder and cd to it. Copy the required files that are listed in the table below into the current folder.
      Table 15.  Required Files for the Tool
      File Description
      ~/uefi-socfpga/Build/PEI.ROM UEFI boot loader image
      ~/uefi-socfpga/Build/DXE.ROM Optional second phase of UEFI boot loader image when you want to boot to UEFI Shell
      ~/a10_soc_devkit_ghrd/output_files/ghrd_10as066n2.core.rbf.mkimage Compressed FPGA configuration file
      ~/a10_soc_devkit_ghrd/output_files/ghrd_10as066n2.periph.rbf.mkimage Compressed FPGA I/O configuration file
      <SoCEDS_installation_directory>/embeddedsw/socfpga/prebuilt_images/ socfpga_arria10.dtb Linux Device Tree Blob
      <SoCEDS_installation_directory>/embeddedsw/socfpga/prebuilt_images/zImage Compressed Linux kernel image
      <SoCEDS_installation_directory>/embeddedsw/socfpga/prebuilt_images/angstrom-rootfs.tar.gz Root filesystem as a compressed tarball
  5. Create the root filesystem for the SD card image.
    $ mkdir rootfs
    $ cd rootfs
    $ sudo tar xzf ../angstrom-rootfs.tar.gz .
  6. Call the script by typing the following:
    $ cd ../
    $ sudo ./ -f -P PEI.ROM,num=3,format=raw,size=10M,type=A2 -P rootfs/*,num=2,format=ext3,size=1500M -P zImage,DXE.ROM,ghrd_10as066n2.core.rbf.mkimage,ghrd_10as066n2.periph.rbf.mkimage,socfpga_arria10.dtb,num=1,format=fat32,size=500M -s 2G -n sd_card_image_a10_uefi.img
  7. Power on the board with the above SD image. If the image is corrupt, the error message "FPGA: Bad Data Checksum" appears.