Giter Site home page Giter Site logo

microtca-tech-lab / meta-techlab-bsp Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 105.03 MB

This is a automatic mirror of the meta-techlab-bsp release branch

License: BSD 3-Clause "New" or "Revised" License

BitBake 15.28% Python 28.97% Shell 3.68% C 51.58% Makefile 0.48%
embedded microtca yocto zynq

meta-techlab-bsp's Introduction

Yocto BSP layer for DAMC-FMC2ZUP and DAMC-FMC1Z7IO

To be used together with Xilinx Yocto distribution

This layer also requires the meta-techlab-utils layer.

Configuration

Device tree from block diagram

An xsct script from meta-xilinx-tools generates device tree entries for all components connected to the Zynq IP block in the Block Diagram. In an application layer (e.g. meta-techlab-demo) that provides an .xsa file via external-hdf.bbappend those are the IPs contained in the system_bsp_... block design.

Additionally, to provide device tree entries also from the system_app block design, there is a recipe in the meta-techlab-utils layer, which can be activated with the following option in the conf/local.conf:

DT_FROM_BD_ENABLE = "1"

The output of this recipe is app_from_bd.dts which gets included by device-tree.bbappend

FPGA manager

FPGA manager can be enabled in conf/local.conf with the following line:

IMAGE_FEATURES += " fpga-manager"

When enabled, a separate device tree overlay (.dtbo) is generated, and the bitstream (for the Programmable Logic) is provided in the Linux userspace. In this case the PL is programmed from an init script from Linux userspace instead of u-boot.

Please check Xilinx Wiki: Solution Zynq PL Programming With FPGA Manager for more information.

Image versioning & build information

There is a post-processing step defined in meta-techlab-utils/classes/image-buildinfo-mod.bbclass which creates a text file /etc/build on the target rootfs containing information about the layer revisions used in the image build. The Yocto manifest can be pinned and assigned a version tag using the helper script meta-techlab-utils/scripts/tag-image.sh. The image-buildinfo-mod will try to retrieve a version tag and identify the layer setup used in the image build.

Troubleshooting

If an old (pre-v2.35.2) Git version is installed on the build host, image-buildinfo-mod can fail with a Git error such as "dubious ownership in repository" or "unsafe repository". This is due to bitbake using fakeroot while postprocessing the target rootfs. There are two options to recover from this error:

  • Preferred solution: Update Git to a recent version
    sudo add-apt-repository ppa:git-core/ppa && sudo apt update && sudo apt install git
    
  • If Git update is not possible: Disable buildinfo class
    echo 'SKIP_BUILDINFO="1"' >> conf/local.conf
    

FPGA bitstream integration

See fpga-integration.md for a detailed view of how FPGA bitstreams are handled in the Yocto system.

SD card image

To create a xz-compressed SD card image, enter (from the BitBake environment):

wic create sdimage-bootpart -e <image-name> -c xz --no-fstab-update

Shell alias for wic

With a shell alias, the wic invocation can be simplified and it's also possible to pass options to xz to speed up the process.

Append this snippet to ~/.bashrc or ~/.zshrc:

wic_img() {
    # wic_img <compression_level> <image_name>
    # compression_level: -0 for no compression, -9 for max compression
    # image_name: Yocto image name
    #
    # e.g.: wic_img -6 zcu102-image-gigev-full

    export XZ_DEFAULTS="--threads=0 $1"
    wic create sdimage-bootpart -e $2 -c xz --no-fstab-update
}

--threads=0 will use all available processor cores and -0..-9 controls the compression level.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.