Intel® FPGA SDK for OpenCL™: Intel® Arria® 10 SoC Development Kit Reference Platform Porting Guide

ID 683788
Date 10/08/2019
Public
Document Table of Contents

3.5.2.3. Creating Partition 3 of the SD Card Image

To create partition 3 of the SD card image:

  1. Mount partition 3 in the sdimage.img file as a loop-back device.
    To mount a partition:
    1. Determine the byte start of the partition within the image with the /sbin/fdisk -lu image_file command.
    2. Identify a free loop device (for example, /dev/loop0) by typing the losetup -f command.
    3. Assign your flash card image to the loop block device by invoking the losetup command.
      For example, if /dev/loop0 is the free loop device, issue the following command:
      losetup /dev/loop0 image_file -o <byte offset>
  2. Generate the uboot_w_dtb-mkpimage.bin file:
    1. Run an OpenCL compilation with the -bsp-flow=base option.
    2. Generate U-boot and device tree according to the instructions at the following URL:https://rocketboards.org/foswiki/Documentation/A10GSRDGeneratingUBootAndUBootDeviceTree
      The instructions require the following exceptions or additional information in the Generating Bootloader section:
      • Step 5: Do not browse to the folder referenced. Browse to the hps_isw_handoff folder in the output directory of your earlier -bsp-flow=base OpenCL compilation.

        For an <OpenCL_file>.cl file, the folder is typically <OpenCL_file>/hps_isw_handoff.

      • Step 9: The rbf_filename field is set to socfpga.rbf. Do not change this value. Leave the value as socfpga.rbf.
  3. Update the uboot_w_dtb-mkpimage.bin file by following the instructions in the Updating Individual Elements on the SD card section of Creating and Updating the SD Card page available at the following URL: https://rocketboards.org/foswiki/Documentation/A10GSRDCreatingAndUpdatingTheSDCardLTS

    For example, sudo dd if=uboot_w_dtb-mkpimage.bin of=/dev/loop0 bs=64k seek=0.

  4. Delete the loop device with the following commands:
    sync
    losetup -d /dev/loop0