LoginSignup
0
1

More than 5 years have passed since last update.

PetaLinux / MicroZed > AI. プロジェクトの作成からBOOT.BIN / image.ubの作成まで (+ Vivadoのhdfファイル取込み)

Last updated at Posted at 2017-02-21
動作環境
PetaLinux 2014.4
Vivado v2014.2
MicroZed

2014年のメモ。

VivadoにてhdfファイルのExportまでをやっておく。Vivadoに関して参考にしたのはこちら Creating a Base System for the Zynq in Vivado @ fpgadeveloper
以下のコマンドに関して参考にしたのは、UG980 Board Bringup Guide.

// Petalinuxプロジェクト(plnx_proj)の作成. /home/user/work以下にplnx_projを作る例
$ cd /home/user/work
$ petalinux-create --type project --template zynq --name plnx_proj

// Vivadoのhdfファイルの取込み
$ cd <directory which contains hardware description file>
$ petalinux-config --get-hw-description -p /home/user/work/plnx_proj
ここでconfigurationが実行されるので、以下の設定をすることでmicroSDからの起動ができるようになる。

1. Under "-*-Subsystem AUTO Hardware Settings---", enable "Advanced bootable images storage Settings -->"
2. Select "Advanced bootable images storage Settings"
3a. Select "boot image settings", then select "image storege media (primary sd)", then select "( )primary sd"
3b. Select "u-boot env partition settings", then select "image storage media (primary flash)", then select "( )primary flash"
3c. Select "kernel image settings", then select "image storage media (primary sd)", then select "( ) primary sd"
3d. Select "jffs2 rootfs image settings", then select "image storage media (primary flash)", then select "( ) primary flash"
3e. Select "dtb image settings", then select "image storage media (from boot image)", then select "from boot image"

上記を選択した後、configurationを終了する。

// ビルド. 10分程度かかる
$ petalinux-build

// BOOT.BINの作成
$ petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --uboot
(FPGAのbitstreamがある場合は、以下のようにする)
$ petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga <FPGA bitstreadm> --uboot

上記で作成されるBOOT.BINとimage.ubをmicroSDにコピーして起動すればよい。

起動した時に"U-Boot-PetaLinux>" で表示が止まり、以下でPetalinuxが起動する場合は "-*-Subsystem AUTO Hardware Settings—" あたりの設定が失敗しているのでpetalinux-configをやり直して設定を修正すること。

U-Boot-PetaLinux> setenv bootcmd 'run sdboot' ; saveenv ; reboot
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1