Skip to content

Latest commit

 

History

History
157 lines (136 loc) · 10.7 KB

9_customYoctoVersions.md

File metadata and controls

157 lines (136 loc) · 10.7 KB

back


GitHub GitHub GitHub GitHub

This is a more advanced guide of my Designing of custom rsyoto versions to show how to use the build system with custom Yocto Project Linux distributions to automate the entire bootflow for Intel Cyclone V and Intel Arria 10 SX SoC-FPGA. The Python scripts work with any Intel Cyclone V and Intel Arria 10 SoC-FPGA board with booting via SD-Card.

Alt text

Use your Intel Quartus Prime FPGA project to create your own rsyocto with your FPGA Configuration



Alt text

Block diagram of the fully automated build system to design new releases

This is a more advanced guide of my Designing of custom rsyoto versions to show to how use the build system with custom OpenEmbbeded Yocto Project Linux Distributions to automate the entire bootflow for Intel Cyclone V- and Intel Arria 10 SX SoC-FPGA.



Designing of custom Yocto-Project based Linux Distributions with the rsyocto build system

  1. Install all required tools, like Intel SoC-EDS on a Linux Computer

  2. Download and unzip the SD-Card folder

    • Download the "rsyocto_SDxx-Folder" from the "releases Part" of this Github repository

    GitHub release (latest by date)

    • Unzip the folder
  3. Copy this folder into your Intel Quartus Prime FPGA project folder

  4. Change the files of the SD-Card folder for your requirements

  5. Run the rsyocto build script with your Yocto-Project Linux files

    • The "makersyoctoSDImage.py" Python script allows some specific attributes:
    vm@yoctoBuntoX:~/Desktop/DE10NANOrsyocto/socfpgaPlatformGenerator$ python3 makersyoctoSDImage.py -h
    ##############################################################################
    #                                                                            #
    #    ########   ######     ##    ##  #######   ######  ########  #######     #
    #    ##     ## ##    ##     ##  ##  ##     ## ##    ##    ##    ##     ##    #
    #    ##     ## ##            ####   ##     ## ##          ##    ##     ##    #
    #    ########   ######        ##    ##     ## ##          ##    ##     ##    #
    #    ##   ##         ##       ##    ##     ## ##          ##    ##     ##    #
    #    ##    ##  ##    ##       ##    ##     ## ##    ##    ##    ##     ##    #
    #    ##     ##  ######        ##     #######   ######     ##     #######     #
    #                                                                            #
    #       AUTOMATIC SCRIPT FOR BRINGING A CUSTOM RSYOCTO LINUX FLAVOR          #
    #                         TO A BOOTABLE IMAGE FILE                           #
    #                                                                            #
    #               by Robin Sebastian (https://github.com/robseb)               #
    #                          Contact: git@robseb.de                            #
    #                            Vers.: 3.11                                     #
    #                                                                            #
    ##############################################################################
    
    usage: makersyoctoSDImage.py [-h] [-y YOCTO_LINUX] [-g DEVICETREE_GEN]
    
    optional arguments:
      -h, --help            show this help message and exit
      -y YOCTO_LINUX, --yocto_linux YOCTO_LINUX
                            Use the Yocto Project zImage,rootfs files ["-y 1"]
      -g DEVICETREE_GEN, --devicetree_gen DEVICETREE_GEN
                            Use SoC EDS DeviceTree Generator ["-g 1 --> no GUI | 2
                            --> GUI"]
    • Possible arguments of the script:
      • "-y" or "--yocto_linux" enables to use the output files of the Yocto Project (zImage, rootfs and Linux Device Tree) for the build
        • The script copies these files from the Yocto Project output folder to the SD-Card partitions, instead of the Linux files located inside the SD-Card folder
      • "-g" or "--devicetree_gen" uses the Intel Device Tree generated to automatically generate a Linux Device Tree based on Intel Quartus Prime FPGA Project settings
        • The Device Tree file will be located inside the SD-Card partition folder and can only be seen as reference because the Intel Device Tree generator is not recommenced by Intel any more
    • Start the build script to generate a Linux Distribution with your Yocto-Project files
    python3 makersyoctoSDImage.py -y 1
  6. Follow the instruction of the Python build script

    • The procedure will be identical as shown in the Designing of custom rsyoto versions guide
    • Only the following message box will appear to show the available Yocto Project output Linux Distribution files
    ##########################################################################################
    #                  COMPATIBLE YOCTO PROJECT LINUX DISTRIBUTION WAS FOUND                 #
    #                           Use this distribution for the build?                         #
    #                                                                                        #
    #----------------------------------------------------------------------------------------#
    #   No.    |             Specs of the found Yocto Project Linux Distribution             #
    #----------------------------------------------------------------------------------------#
    #     1    | Directory: "/home/vm/poky/build/tmp/deploy/images/cyclone5/"                #
    #     2    | Modification Date: Tue Apr  6 16:28:01 2021                                 #
    #     3    | rootfs: "core-image-minimal-cyclone5-20210406142211.rootfs.tar.gz           #
    #     4    | zImage: "zImage--5.10+gitAUTOINC+f7700e50b1-r0-cyclone5-20210407093253.bin" #
    #     5    | Devicetree: "-"                                                             #
    #----------------------------------------------------------------------------------------#
    #                                                                                        #
    ##########################################################################################
    
     
    #######################################################################
    #                 Use this distribution for the build?                #
    #                                                                     #
    #---------------------------------------------------------------------#
    #   No.    |                           Task                           #
    #---------------------------------------------------------------------#
    #     1    | Yes, use these files for this build                      #
    #     2    | No, copy file manually instead                           #
    #     3    | Use the existing Linux files inside the Partition folder #
    #---------------------------------------------------------------------#
    #   Select a item by typing a number (1-3) [q=Abort]                  #
    #  Please input a number: $    
    • Type 1 to let the script use these files for the build
  7. Select the Linux Device Tree for the build

    • My meta-intelfpga BSP layer for the OpenEmbedded Yocto Project did not built the Linux Device Tree
    • Instead, the build script will ask the user to copy a Linux Device Tree file with a specific name to the Image Partition folder as shown:
    #################################################################################################################
    #                  Inside the Yocto Project Repo. folder no Linux Devicetree (.dts) was found!                  #
    #                      Use the existing Linux devicetree file inside the partition folder OR                     #
    #                          Copy a Linux devicetree file (.dts) to the partition folder                          #
    #                                                                                                               #
    #---------------------------------------------------------------------------------------------------------------#
    #   No.    |                          Name and Location of the required file to copy                           #
    #---------------------------------------------------------------------------------------------------------------#
    #     1    | Directory: "/home/vm/Desktop/DE10NANOrsyocto/socfpgaPlatformGenerator/Image_partitions/Pat_1_vfat" #
    #     2    | Requiered Name: "socfpga_cyclone5_socdk.dts"                                                       #
    #---------------------------------------------------------------------------------------------------------------#
    #                                                                                                               #
    #################################################################################################################
    • For reference the Intel Device Tree generator can also be used. To do this run this script
      python3 makersyoctoSDImage.py -g 1
      • The Python script will place this Linux Device Tree file with the name "_reference.dts" to the Board folder
    • Copy the file with the shown name to the shown location and continue the script
    • The script will generate a bootable Linux Distribution image for the Intel Quartus Prime FPGA project
  8. Flash the image to a SD-Card and boot your Intel SoC-FPGA board up

    • Done ...



Back to the startpage