To content | To menu | To search

Friday, September 30 2022

Xilinx Vivado のプロジェクトのクリーンアップ

tcl コンソールでreset_project をするといいらしい。

Tuesday, September 6 2022

Petalinux のための vagrant 環境のスクリプトを作った

検索しても参照されていないようなのでこちらから。

takagiwa/petalinuxenv

Continue reading...

Tuesday, August 23 2022

Zybo Z7 の Petalinux で USBメモリを使いたい

Zybo Z7 には限らないけれど

petalinux 2018.2 添加u盘 ここの通りにやってできた。

petalinux-config を終えたら project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi を編集。

/include/ "system-conf.dtsi"
/ {
};
/{
usb_phy0: usb_phy@0 {
compatible = "usb-nop-xceiv";
#phy-cells = <0>;
};
};

&usb0 {
dr_mode = "host";
usb-phy = <&usb_phy0>;
};

(念のためもう一度 petalinux-config をしたけど不要だと思う)

そして petalinux-build をしたイメージで起動したら USBメモリが認識された。

Zybo Z7 向け BSP を使うときの問題

まずはうち固有で git のポートがファイアウォールで塞がれて time out になる場合。参考

  • project-spec/meta-user/recipes-apps/digilent-apps/gpioutil/gpioutil.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/libpwm/libpwm.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/libuio/libuio.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/kmsdemo/kmsdemo.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/libgpio/libgpio.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/pwmdemo/pwmdemo.bb
  • project-spec/meta-user/recipes-apps/digilent-apps/libvrc/libvrc.bb

これらのファイルを編集。

SRC_URI = "git://github.com/digilent/pwmdemo.git \

これをこんな風に。

SRC_URI = "git://github.com/digilent/pwmdemo.git;protocol=https \

次は U-BOOT 関係でエラーがでる。参考

WARNING: u-boot-xlnx-v2017.01-xilinx-v2017.4+gitAUTOINC+42deb242f9-r0 do_fetch: Failed to fetch URL git://github.com/digilent/u-boot-digilent.git;protocol=https;branch=master, attempting MIRRORS if available
ERROR: u-boot-xlnx-v2017.01-xilinx-v2017.4+gitAUTOINC+42deb242f9-r0 do_fetch: Fetcher failure: Unable to find revision 42deb242f961ce317366566666cbbddfb198bc9f in branch master even from upstream
ERROR: u-boot-xlnx-v2017.01-xilinx-v2017.4+gitAUTOINC+42deb242f9-r0 do_fetch: Fetcher failure for URL: 'git://github.com/digilent/u-boot-digilent.git;protocol=https;branch=master'. Unable to fetch URL from any source.
ERROR: u-boot-xlnx-v2017.01-xilinx-v2017.4+gitAUTOINC+42deb242f9-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/vagrant/SimplePS2/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/u-boot-xlnx/v2017.01-xilinx-v2017.4+gitAUTOINC+42deb242f9-r0/temp/log.do_fetch.27803
ERROR: Task (/home/vagrant/petalinux/2017.4/components/yocto/source/arm/layers/meta-xilinx/recipes-bsp/u-boot/u-boot-xlnx_2017.01.bb:do_fetch) failed with exit code '1'

ディレクトリを間違えてエラーになったりする。

あとはさっきのコメントにあった sstate-cache の対応もやっておくといい。

Thursday, August 18 2022

Petalinux のインストールが「Failed to install Yocto SDK for aarch64」で失敗する

または petalinux-config がエラーで失敗する。

petalinux のインストールログを見れば書いてあった。

=================================================
ERROR: The installer requires python, please install it first
*********************************************
ERROR: Failed to install Yocto SDK for aarch64.
*********************************************
Please refer to the PetaLinux Tools Installation Guide.

「python」そのものはなかった。

$ python
python2.7   python3     python3.6   python3.6m  python3m
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python2

のあとでインストールしなおしたら完了できた。

python2 は petalinux-config 対策。

$ ls */*.log
build/bitbake-cookerdaemon.log  build/config.log
$ cat build/config.log

Ubuntu では update-alternatives コマンドを使うのが正攻法らしい。

Thursday, March 24 2022

bad lexical cast: source type value could not be interpreted as target while executing

2022/Mar/30 追記:パッチがでていた

https://support.xilinx.com/s/article/76960

Continue reading...