Skip to content

AD FMCDAQ2 Platform Build Update the SD Card

nnaufel edited this page Apr 28, 2020 · 12 revisions

NOTE: Please observe which version of the iWave™ Carrier Card you have by clicking here.

In the previous sections methods are described to build the FPGA image, the Linux kernel, the Linux devicetree and finally the uboot image. These files must be copied to the SD card in order for the system to boot. The following steps describe how to implement this. The instructions below assume that a partitioned SD card is being used. The easiest way to achieve this is to copy the complete SD card image as described here.

Table of Contents

  1. Copy the uboot image to the SD card
  2. Copy the FPGA image to the SD card
  3. Copy the Linux kernel image to the SD card
  4. Copy the devicetree file to the SD card

Copy the uboot image to the SD card

Note: This must be done on a Linux host.

Exercise caution: dd targeted at an incorrect drive letter can brick your computer.

  1. Determine the device associated with the SD card on the host. Run the command below before and after inserting the SD card. The new drive letter will show up as /dev/sdx/ where 'x' represents the actual letter (a,b,c,d etc)

     $ cat /proc/partitions  
    
  2. Navigate to the uboot image folder

     $ cd <hdl-repo-directory>/hdl/projects/daq2/iwg24d/software/uboot_bsp
    
  3. Use dd utility to write the uboot image to the SD card binary partition. Use soceds1 as the password when prompted.

     $ $ sudo dd if=uboot_w_dtb-mkpimage.bin of=/dev/sdx3 bs=64k seek=0  
    
  4. Use sync utility to flush the changes to the SD card.

     $ sudo sync  
    
  5. Eject the mounted drive before removing the SD card media.

Copy the FPGA image to the SD card

Convert the FPGA image file to the Raw Binary Format (RBF)

Note: this is to be done on Windows or Linux, but NOT on VM.

  1. Open a Nios II Embedded Command Shell

  2. Navigate to the FPGA image folder

     $ cd <hdl-repo-directory>/hdl/projects/daq2/iwg24d 
    
  3. Convert the FPGA image file to the RBF format

     $ quartus_cpf -c -o bitstream_compression=on daq2_iwg24d.sof socfpga.rbf
    

Copy the RBF file to the SD card

Note: this is to be done on Windows or Linux, but NOT on VM.

  1. Insert the SD card into the host computer

  2. Open a File browser such as 'Files' in Ubuntu or 'Windows Explorer' in Windows. Navigate to the SD card FAT partition in the browser.

  3. Open a second File browser. Navigate to the FPGA image folder

     $ cd <hdl-repo-directory>/hdl/projects/daq2/iwg24d
    
  4. Drop and drag the socfpga.rbf file to the FAT partition of the SD card.

  5. Eject the mounted drive before removing the SD card media if using a Linux host.

Copy the Linux kernel image to the SD card

Note: This must be done on a Linux host.

  1. Insert the SD card into the host computer

  2. Open a File browser such as 'Files' in Ubuntu. Navigate to the SD card FAT partition in the browser.

  3. Open a second File browser. Navigate to the kernel image folder located at <linux-repo-directory>/linux/arch/arm/boot

  4. Drop and drag the zImage file to the FAT partition of the SD card.

  5. Eject the mounted drive before removing the SD card media.

Copy the devicetree file to the SD card

Note: This must be done on a Linux host.

  1. Insert the SD card into the host computer

  2. Open a File browser such as 'Files' in Ubuntu. Navigate to the SD card FAT partition in the browser.

  3. Open a second File browser. Navigate to the devicetree image folder located at <linux-repo-directory>/linux/arch/arm/boot/dts

  4. Rename the dtb file

    • rename socfpga_arria10_iwg24d_daq2.dtb to socfpga_arria10_socdk_sdmmc.dtb for the Legacy 1.1 or 2.0 carrier

    • or rename socfpga_arria10_iwg24d_daq2_cc.dtb to socfpga_arria10_socdk_sdmmc.dtb for the Custom 2.0 carrier

  5. Drop and drag the socfpga_arria10_socdk_sdmmc.dtb file to the FAT partition of the SD card.

  6. Eject the mounted drive before removing the SD card media.



Return to Build the Example Design
Return to AD-FMCDAQ2 Platform User Guide

Clone this wiki locally