FC2カウンター FPGAの部屋 Ultra96 で ikwzm さんのDebian9 Root File Systemを動かしてみる4
fc2ブログ

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

FPGAの部屋

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

Ultra96 で ikwzm さんのDebian9 Root File Systemを動かしてみる4

Ultra96 で ikwzm さんのDebian9 Root File Systemを動かしてみる3”の続き。

前回は、ikwzm さんの配布されているLinux カーネルに変更したら各種パッケージをインストールできて、nautilus や geany もインストールできて起動できた。次はデバイスツリー・オーバーレイがうまく行くかどうか?を確認したい。今回は、AXI HPC port を Inner Share として使用するための設定を行う。

参考にするのは、いつもお世話になっております ikwzm さんの”UltraZed 向け Debian GNU/Linux で AXI HPC port を使う (基礎編)”だ。ここに、Zynq UltraScale+ MPSoC(ZynqMP) の PS-PL Interface のShare モードについて詳しく書かれている。
そして、Outer Share はLinux 4.14 で対応していないので、AXI HPC ポートをInner Share に設定する方法が書いてある。それをやってみようと思う。

やり方は、regs.init というファイルを用意する。(詳しい方法は”UltraZed 向け Debian GNU/Linux で AXI HPC port を使う (基礎編)”を参照)

.set. 0xFF41A040 = 0x3;


Ultra96_ikwzm_32_181019.png

boot.bin を生成するのだが、boot.bin は前回”Ultra96用Yocto Linuxのビルドの続き3(boot.binの生成、Linux Kernel のビルド)”で生成した。
その、build_bootbin.bif を下のように書き換えた。

the_ROM_image:
{
  [init] regs.init
  [pmufw_image, destination_cpu=a53-0] pmufw.elf
  [bootloader, destination_cpu=a53-0] fsbl.elf
  [destination_device=pl] ex_board_test_wrapper.bit
  [destination_cpu=a53-0, exception_level=el-3] bl31.elf
  [destination_cpu=a53-0, exception_level=el-2] u-boot.elf
}


次に、boot.bin を生成した。
bootgen -arch zynqmp -image build_bootbin.bif -o i boot.bin -w on -log trace > bootgen_log.txt

boot.bin が生成されて、bootgen_log.txt のログが生成された。
bootgen_log.txt を見てみると、regs.init の記述が取り込まれているのが分かるので大丈夫だろう?
bootgen_log.txt を示す。

[TRACE]  : Command Line parsing started
[TRACE]  : Command: -arch zynqmp -image build_bootbin.bif -o i boot.bin -w on -log trace
[INFO]   : Command line parsing completed successfully
[INFO]   : Bootgen Version - 2017.4, Nov 23, 2017
[TRACE]  : BIF File: build_bootbin.bif
[TRACE]  : BIF file parsing started
[TRACE]  : Creating ZYNQ MP Factory
[INFO]   : Filename: regs.init
[INFO]   : Filename: pmufw.elf
[INFO]   : Filename: fsbl.elf
[INFO]   : Parsing Partition Data
[INFO]   : Filename: ex_board_test_wrapper.bit
[INFO]   : Parsing Partition Data
[INFO]   : Filename: bl31.elf
[INFO]   : Parsing Partition Data
[INFO]   : Filename: u-boot.elf
[INFO]   : Parsing Partition Data
[INFO]   : BIF file parsing completed successfully
[INFO]   : Building image - the_ROM_image
[INFO]   : Started RE parsing : regs.init
[INFO]   : count [0xff41a040], value = 3
[INFO]   : Done RE parsing : regs.init. Added 1 regiter pairs
[TRACE]  : Setting Core as 2
[INFO]   : Building the Partition Header Table
[TRACE]  : Creating ZYNQ MP Factory
[INFO]   : After build 
           -- Dump of Binary Image ----
           00000000 Len: 000008b8 Res: 00000000 "BootHeader"
           00000000 Len: 00000040 Res: 00000000 "ImageHeaderTable"
           00000000 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
           00000000 Len: 00000030 Res: 00000000 "ImageHeader ex_board_test_wrapper.bit"
           00000000 Len: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           00000000 Len: 00000020 Res: 00000740 "ImageHeader u-boot.elf"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader ex_board_test_wrapper.bit.0"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           00000000 Len: 00000040 Res: 00001600 "PartitionHeader Null"
           00000000 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00000000 Len: 0054f89c Res: 00000000 "ex_board_test_wrapper.bit.0"
           00000000 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           00000000 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of Dump
[INFO]   : After align 
           -- Dump of Binary Image ----
           00000000 Len: 000008b8 Res: 00000000 "BootHeader"
           000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"
           00000900 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
           00000940 Len: 00000030 Res: 00000000 "ImageHeader ex_board_test_wrapper.bit"
           00000980 Len: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           000009c0 Len: 00000020 Res: 00000740 "ImageHeader u-boot.elf"
           00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00001140 Len: 00000040 Res: 00000000 "PartitionHeader ex_board_test_wrapper.bit.0"
           00001180 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           000011c0 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           00001200 Len: 00000040 Res: 00001600 "PartitionHeader Null"
           00002800 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00039600 Len: 0054f89c Res: 00000000 "ex_board_test_wrapper.bit.0"
           00588ec0 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           005953c0 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of Dump
[INFO]   : Partition Information: 
[INFO]   : Image: fsbl.elf
[INFO]   :      1. Partition: fsbl.elf.0,  Size: 224712
[INFO]   : Image: ex_board_test_wrapper.bit
[INFO]   :      2. Partition: ex_board_test_wrapper.bit.0,  Size: 5568668
[INFO]   : Image: bl31.elf
[INFO]   :      3. Partition: bl31.elf.0,  Size: 50432
[INFO]   : Image: u-boot.elf
[INFO]   :      4. Partition: u-boot.elf.0,  Size: 758744
[INFO]   : After Link 
           -- Dump of Binary Image ----
           00000000 Len: 000008b8 Res: 00000000 "BootHeader"
           000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"
           00000900 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
           00000940 Len: 00000030 Res: 00000000 "ImageHeader ex_board_test_wrapper.bit"
           00000980 Len: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           000009c0 Len: 00000020 Res: 00000740 "ImageHeader u-boot.elf"
           00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00001140 Len: 00000040 Res: 00000000 "PartitionHeader ex_board_test_wrapper.bit.0"
           00001180 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           000011c0 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           00001200 Len: 00000040 Res: 00001600 "PartitionHeader Null"
           00002800 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00039600 Len: 0054f89c Res: 00000000 "ex_board_test_wrapper.bit.0"
           00588ec0 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           005953c0 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of Dump


この生成された boot.bin をMicroSD カードの第1パーティションのULTRA96_BOOの boot.bin を交換して、Ultra96 でブートしてみたが、問題なくDebian がブートされて、nautilus や geany も起動した。
Ultra96 ボード用 Debian ROOT FS のLinux起動用MicroSD カード用ファイルの使用方法”のULTRA96_BOOの boot.bin も今回生成した boot.bin に変更した。
  1. 2018年10月19日 05:23 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

コメント

コメントの投稿


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

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