PetaLinux Offline Compilation (downloads and sstate-cache)

Offline compilation can be enabled by defining local directories for downloads and sstate when configuring a PetaLinux project. It can also be done by configuring PetaLinux installation so that new projects are created with offline compilation enabled by default.

The introduced methodology applies to other architectures as well. The locations of the files may differ depending how you install PetaLinux.

1. downloads

Suppose downloads folder is located in $PETALINUX/downloads.

For Zynq, edit $PETALINUX/etc/template/project/template-zynq/project-spec/configs/config
For ZynqMP, edit $PETALINUX/etc/template/project/template-zynqMP/project-spec/configs/config:

CONFIG_PRE_MIRROR_URL="file://$PETALINUX/downloads"

2. sstate-cache

Suppose sstate folder is located in $PETALINUX/tool/sstate

  • Preferred method

    • For Zynq: edit $PETALINUX/etc/template/project/template-zynq/project-spec/configs/config

      CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="file://$PETALINUX/tool/sstate/arm"
      
    • For ZynqMP: edit $PETALINUX/etc/template/project/template-zynqMP/project-spec/configs/config

      CONFIG_YOCTO_NETWORK_SSTATE_FEEDS_URL="file://$PETALINUX/tool/sstate/aarch64"
      
  • Non-preferred method

    Need to change definition when switching between architectures.

    In $PETALINUX/components/misc/config/Kconfig.part:

    config YOCTO_LOCAL_SSTATE_FEEDS_URL
        string "local sstate feeds url"
    
        # for zynq
        default "$PETALINUX/sstate/arm/"
    
        # for zynqMP
        default "$PETALINUX/sstate/aarch64/"
        ...
    ...
    config YOCTO_BB_NO_NETWORK
        bool "Enable BB NO NETWORK"
        default y
        ...
    

Reference:

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容