Yocto Project for Ultra96V2

Vivado/Vitis 2020.1もリリースされたので手始めにYocto Project for Ultra96V2をDunfell(Yocto Project V3.1LTS)対応してみよう。

望んでいたリリース

Vivado/Vitis 2020.1は次の対応を持ってリリースされることを望んでいた。

  • Ubuntu 20.04LTS
  • Yocto Project 3.1LTS(Dunfell)

バージョン番号を見て気付くかもしれないが両方共LTS(Long Time Support)付きバージョンです。

Yocto Projectについては初めてのLTSバージョンです。

これらに対応しておけば、実装や作業手順が当面の間は一定になること、数年はバグやセキュリティなどに直面しても比較的早く解決できるものと考えている。

そのうち、このバージョンをサポートしてくると思うけどこのタイミングでできなかったのはリリース元の体制の悪さだと思う。

現時点でのバージョン

ざっくりと、PetaLinuxで使用しているレシピなどのバージョンを見てみよう。

PetaLinuxを参照するのは次の理由である。

  • PetaLinuxのベースはYocto Projectである
  • PetaLinuxには設定が固定されていることがある
  • PetaLinuxはバージョンが固定されていることがある
  • ダウンロードするリポジトリが違う場合がある

各リポジトリからダウンロードするブランチまたはタグは基本的にxilinx-v2020.1と想定して進めていく。

meta-petalinux

まずは、PetaLinuxのリビジョンを見てみよう。

ここでは現時点でのmasterxilinx-v2020.1rel-v2020.1を確認した。

masterは2019.1向けの対応をしていて、こちらのほうが時間が先に進んでいるだけど、2020.1系のブランチには適応されていませんでした。

xilinx-v2020.1rel-v2020.1はポイント(ハッシュ)です。

master

https://github.com/Xilinx/meta-petalinux

commit 5d9a1b621c8198e7b5b87b18dc124877787bb309 (HEAD -> master, origin/rel-v201
9.1, origin/master, origin/HEAD)
Author: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date:   Wed May 22 13:20:19 2019 -0700

    rfdc-examples: Update commitids for rfdc examples

    Update commit ids for rdfc and rfdc-examples for 2019.1 release

tag: xilinx-v2020.1

https://github.com/Xilinx/meta-petalinux/tree/xilinx-v2020.1

commit 0fc49cd7d25481aef7b99cb9adb9f1416d652bd9 (tag: xilinx-v2020.1, origin/rel
-v2020.1)
Author: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date:   Fri May 22 09:07:17 2020 -0700

    embeddedsw: Update commit ids for 2020.1 release

    Update commit ids for 2020.1 release

branch: rel-v2020.1

https://github.com/Xilinx/meta-petalinux/tree/rel-v2020.1

commit 0fc49cd7d25481aef7b99cb9adb9f1416d652bd9 (HEAD -> rel-v2020.1, tag: xilinx-v2020.1, origin/rel-v2020.1)
Author: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date:   Fri May 22 09:07:17 2020 -0700

    embeddedsw: Update commit ids for 2020.1 release

    Update commit ids for 2020.1 release

meta-xilinx

次にmeta-xilinxを見てみましょう。

こちらも現時点でのmasterxilinx-v2020.1rel-v2020.1を確認します。

xilinx-v2020.1rel-v2020.1は同じポイントです。

ただ、masterの日付が古いです。

これはmeta-xilinxを使用するときはmasterを使用してYocto Projectを構築してはいけないということを指しています。

meta-xilinxを使用してYocto Projectを構築するときは必ず、バージョンにあったブランチまたはタグを使用する必要があるということです。

また、meta-xilinxにはYocto Projectのバージョンネームにあったブランチも存在しますがzeus(Yocto Project 3.0)までのブランチしかありません。

meta-xilinxのrel-v2020.1はYocto Projectのzuesベースで構築されていますがmeta-xilinxのzuesブランチはメンテナンスされていないようです。

master

https://github.com/Xilinx/meta-xilinx

commit 757bac706c5309dc439f5ba2d3255c01d6780845 (HEAD -> master, origin/master, origin/HEAD)
Author: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date:   Mon Nov 18 13:51:15 2019 -0800

    Add me to the maintainers list

tag: xilinx-v2020.1

https://github.com/Xilinx/meta-xilinx/tree/xilinx-v2020.1

commit 947d85f3f0d94dbeb7860b715ac854ecf5de732e (HEAD -> rel-v2020.1, tag: xilinx-v2020.1, origin/rel-v2020.1)
Author: Himanshu Choudhary <himanshu.choudhary@xilinx.com>
Date:   Fri May 22 21:03:39 2020 +0530

    xrt_git:zocl_git: update commitid for 2020.1 release

     CR-1063204

    Update commit id for 2020.1 release

branch: rel-v2020.1

https://github.com/Xilinx/meta-xilinx/tree/rel-v2020.1

commit 947d85f3f0d94dbeb7860b715ac854ecf5de732e (HEAD -> rel-v2020.1, tag: xilinx-v2020.1, origin/rel-v2020.1)
Author: Himanshu Choudhary <himanshu.choudhary@xilinx.com>
Date:   Fri May 22 21:03:39 2020 +0530

    xrt_git:zocl_git: update commitid for 2020.1 release

     CR-1063204

    Update commit id for 2020.1 release

branch: zeus

https://github.com/Xilinx/meta-xilinx/tree/zeus

commit b82343ac5f013926839627cee9dae7106c008ae9 (HEAD -> zeus, origin/zeus, origin/master-next)
Author: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date:   Tue Dec 10 17:42:29 2019 -0800

    libmali-xlnx: Provide single shlib provider for libMali.so.9

    libmali-xlnx provides multiple shared libraries to support the update
    alternatives mechanism. For this, shared libraries with different
    backends are installed to the target and softlinked to libmali-xlnx.so.

    When do_package task runs,
ちょっと多いので割愛します。

linux-xlnx

次はlinux-xlnxの確認です。

linux-xlnx はmasterxilinx-v2020.1xlnx_rebase_v5.4_2020.1を見ていきます。

masterは現時点では5.4系のメンテナンスをしているようです。

xilinx-v2020.1xlnx_rebase_v5.4_2020.1は同じポイントにいます。

master

https://github.com/Xilinx/linux-xlnx

commit 3e983e4f0dfe5024dd0b4fedd5e46363f1dc9240 (HEAD -> master, origin/master, origin/HEAD)
Author: Samuel A. Winchenbach <swinchen@gmail.com>
Date:   Tue May 26 15:52:18 2020 +0530

    spi-xilinx.c: correct multibyte writes

    When bits-per-word is greater than 8 only the first byte is sent; this
    is caused by an incorrect cast in the macros used to fill the tx fifo.

tag: xilinx-v2020.1

https://github.com/Xilinx/linux-xlnx/tree/xilinx-v2020.1

commit 043f8a226a752a1dd11f7ff64cee6dbe7334d394 (tag: xilinx-v2020.1)
Author: Michal Simek <michal.simek@xilinx.com>
Date:   Tue May 12 06:26:23 2020 +0200

    xilinx: Disable strict devmem access control

    Intention of the common kernel is ease of use and "demonstration of
    capabilities". The intention of these defconfigs is not to deploy these
    configurations on any real product.
    With keeping this in mind the patch disable strict devmem access control
    which can be used by some user space applications.

branch: xlnx_rebase_v5.4_2020.1

https://github.com/Xilinx/linux-xlnx/tree/xlnx_rebase_v5.4_2020.1

commit 22b71b41620dac13c69267d2b7898ebfb14c954e (HEAD, tag: xlnx_rebase_v5.4_2020.1, origin/xlnx_rebase_v5.4)
Author: Michal Simek <michal.simek@xilinx.com>
Date:   Tue May 12 06:26:23 2020 +0200

    xilinx: Disable strict devmem access control

    Intention of the common kernel is ease of use and "demonstration of
    capabilities". The intention of these defconfigs is not to deploy these
    configurations on any real product.
    With keeping this in mind the patch disable strict devmem access control
    which can be used by some user space applications.

u-boot-xlnx

最後にu-boot-xlnxを見ましょう。

こちらもmasterxilinx-v2020.1xlnx_rebase_v2020.01を見てみます。

u-boot-xlnxもmasterは現時点でのメンテナンスなので特に確認しなくて良いでしょう。

xilinx-v2020.1xlnx_rebase_v2020.01は同じポイントにいます。

master

https://github.com/Xilinx/u-boot-xlnx

commit d7a07b03de3d7a30b305fbdbca688e4b0e511817 (HEAD -> master, origin/master, origin/HEAD)
Author: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Date:   Thu May 28 05:51:55 2020 -0600

    arm64: zynqmp: Delete gmiitorgmii bridge node

    Delete gmiitorgmii bridge node from dts. This is related to PL logic.
    Hence we should not keep it in dts. Also delete phy node linked to
    this. There is already a phy node under mdio node.

tag: xilinx-v2020.1

https://github.com/Xilinx/u-boot-xlnx/tree/xilinx-v2020.1

commit e44c2bc102f4699e240f16e17999d7d7886042d7 (tag: xilinx-v2020.1)
Author: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Date:   Wed May 6 08:08:34 2020 -0600

    Revert "mmc: zynq: parse dt when probing"

    This reverts commit b77a03d3decdbf6accfa8a36cb1e862527ebc80b.

    This is partial revert of the above commit.

    mmc_of_parse() is reading no-1-8-v from device tree and if set,
    it is clearing the UHS speed capabilities of cfg->host_caps.
    cfg->host_caps &= ~(UHS_CAPS | MMC_MODE_HS200 |
                        MMC_MODE_HS400 | MMC_MODE_HS400_ES);

    This is still missing to clear UHS speeds like SDHCI_SUPPORT_SDR104,
    SDHCI_SUPPORT_SDR50 and SDHCI_SUPPORT_DDR50.

    Even if we clear the flags SDHCI_SUPPORT_XXX in mmc_of_parse(),
    these speed flags are getting set again in cfg->host_caps in
    sdhci_setup_cfg().

branch: xlnx_rebase_v2020.01

https://github.com/Xilinx/u-boot-xlnx/tree/xlnx_rebase_v2020.01

commit 86c84c0d0f916ec00d5d76a32dc9372a25429ca9 (HEAD -> xlnx_rebase_v2020.01, tag: xlnx_rebase_v2020.01_2020.1, origin/xlnx_rebase_v2020.01)
Author: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Date:   Wed May 6 08:08:34 2020 -0600

    Revert "mmc: zynq: parse dt when probing"

    This reverts commit b77a03d3decdbf6accfa8a36cb1e862527ebc80b.

    This is partial revert of the above commit.

    mmc_of_parse() is reading no-1-8-v from device tree and if set,
    it is clearing the UHS speed capabilities of cfg->host_caps.
    cfg->host_caps &= ~(UHS_CAPS | MMC_MODE_HS200 |
                        MMC_MODE_HS400 | MMC_MODE_HS400_ES);

    This is still missing to clear UHS speeds like SDHCI_SUPPORT_SDR104,
    SDHCI_SUPPORT_SDR50 and SDHCI_SUPPORT_DDR50.

    Even if we clear the flags SDHCI_SUPPORT_XXX in mmc_of_parse(),
    these speed flags are getting set again in cfg->host_caps in
    sdhci_setup_cfg().

まとめ

確認したところ、各リポジトリのxilinx-v2020.1はzuesベースで構築されていました。

linux-xlnxとu-boot-xlnx見比べるとブランチはxlnx_rebase_[ソフトバージョン_]リリースバージョンブランチ名にしたようです。

meta-xilinxのレシピを見ると以前のバージョンはタグ(xilinx-v2020.1)でダウンロードするバージョンを指定していましたが今回からブランチ名でダウンロードするようにしたようです。

ブランチでダウンロードするということは常に最新の対応を取り込めるという利点があります。

しかし、今後、いつはダメでいつは問題ないとかの事象が発生しそうですね。

もし、問題が発生したときはxilinx-v2020.1のタグに立ち戻って確認すると良いでしょう。

って、なんか余計なことするの大好きだよなぁ…

write: 2020/06/07/ 08:29:12