FC2カウンター FPGAの部屋 Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた1
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた1

Ultra96-PYNQをビルドしてみた”のDocker Container にはPetaLinux 2018.2 がインストールしてあるので、試しにビルドを行う。

まずは、Vivado 2018.2 のプロジェクトとそのプロジェクトの .sdk ディレクトリが必要だ。
秋月電子カメラモジュールOV5642を使う15(完成)”のOV5642 でBMP ファイルを取得できる Vivado 2018.2 のプロジェクトを対象とする。そのVivado 2018.2 プロジェクトは”秋月電子カメラモジュールOV5642を使う8(OV5642用Vivadoプロジェクト)”に書いてある。

参照するマニュアルは、”PetaLinux Tools Documentation Reference Guide UG1144 (v2018.2) June 6, 2018”。

PetaLinux Tools Documentation Reference Guide UG1144 (v2018.2) June 6, 2018”の 16 ページの”Table 2-4: Design Flow Overview”を引用する。
PetaLinux_18_190217.png

さてそれでは、ビルドしていこう。
最初にPetaLinux 2018.2 のプロジェクトを作成する。プロジェクト名は cam_test_ov5642_182 とした。
petalinux-create --type project --template zynqMP --name cam_test_ov5642_182
PetaLinux_1_190216.png

PetaLinux プロジェクトを生成したら、project-spec ディレクトリが生成された。

次に、 cam_test_182.sdk ディレクトリをPetaLinux プロジェクトにホストからコピーする必要がある。
docker ps
docker cp /home/masaaki/HDL/Ultra96/cam_test_ov5642_182/cam_test_182.sdk/cam_test_wrapper.hdf d601aa5658aa:/home/masaaki/PetaLProj/cam_test_ov5642_182

PetaLinux_2_190216.png

Docker 側に cam_test_182.sdk ディレクトリがコピーされた。
PetaLinux_3_190216.png

次にPetaLinux プロジェクトの初期化を行う。その際に、 cam_test_182.sdk ディレクトリを指定する。
petalinux-config --get-hw-description=/home/masaaki/PetaLProj/cam_test_ov5642_182/cam_test_182.sdk/
PetaLinux_4_190216.png

menu-config 画面が立ち上がった。
PetaLinux_5_190216.png

<Save>  を選択してリターン・キーを押した。

cam_test_ov5642_182/project-spec/configs/config にセーブする。
<ok>  を選択して、リターン・キーを押した。
PetaLinux_6_190216.png

もう一度メインの画面に戻って、<Exit>  を選択して、リターン・キーを押した。
PetaLinux_8_190216.png

Exit 画面が表示された。リターン・キーを押した。
PetaLinux_7_190216.png

petalinux-config が終了した。build, component ディレクトリが生成された。
PetaLinux_9_190216.png

petalinux-config のログを示す。

masaaki@d601aa5658aa:~/PetaLProj/cam_test_ov5642_182$ petalinux-config --get-hw-description=/home/masaaki/PetaLProj/cam_test_ov5642_182/cam_test_182.sdk/
INFO: Getting hardware description...
INFO: Rename cam_test_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
                                                                                
[INFO] menuconfig project
/home/masaaki/PetaLProj/cam_test_ov5642_182/build/misc/config/Kconfig.syshw:30:warning: defaults for choice values not supported
/home/masaaki/PetaLProj/cam_test_ov5642_182/build/misc/config/Kconfig:597:warning: config symbol defined without type


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time ! 
[INFO] generating u-boot configuration files
                                                                                
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] oldconfig rootfs
[INFO] generating petalinux-user-image.bb
masaaki@d601aa5658aa:~/PetaLProj/cam_test_ov5642_182$


petalinux-build を行った。
petalinux-build
エラーが出てしまった。locale のエラーだった。
PetaLinux_10_190216.png

電気回路/zynq/Petalinux のビルドの言語設定が重要 LANG=C”を参照すると petalinux-build の前にLANG=C を付加するそうだ。
今回のロケールはen_US.UTF-8 なので、LANG=en_US.UTF-8 を前につけてみよう。
LANG=en_US.UTF-8 petalinux-build
これでビルドが成功した。
PetaLinux_11_190216.png

ログを示す。

masaaki@d601aa5658aa:~/PetaLProj/cam_test_ov5642_182$ LANG=C petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).
Python can't change the filesystem locale after loading so we need a UTF-8 when Python starts or things won't work.
ERROR: Failed to build project
masaaki@d601aa5658aa:~/PetaLProj/cam_test_ov5642_182$ LANG=en_US.UTF-8 petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3439 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:04
Parsing of 2552 .bb files complete (2509 cached, 43 parsed). 3441 targets, 139 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:08
Checking sstate mirror object availability: 100% |###############| Time: 0:00:14
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: fsbl: compiling from external source tree /home/masaaki/pkg/petalinux/tools/hsm/data/embeddedsw
NOTE: pmu-firmware: compiling from external source tree /home/masaaki/pkg/petalinux/tools/hsm/data/embeddedsw
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 3115 tasks of which 2259 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
INFO: Copying Images from deploy to images
INFO: Creating images/linux directory
NOTE: Failed to copy built images to tftp dir:  /tftpboot
[INFO] successfully built project
masaaki@d601aa5658aa:~/PetaLProj/cam_test_ov5642_182$ 

  1. 2019年02月17日 05:12 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

コメント

コメントの投稿


管理者にだけ表示を許可する

トラックバック URL
https://marsee101.blog.fc2.com/tb.php/4445-bce90075
この記事にトラックバックする(FC2ブログユーザー)