FC2カウンター FPGAの部屋 Ultra96 のboot.bin を変更
fc2ブログ

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

FPGAの部屋

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

Ultra96 のboot.bin を変更

以前作製したboot.bin は低速コネクタでLチカするビットファイルが入っているに気がついた。これでは、カメラを取り付けたときに出力同士がぶつかってしまう。
そこで、ビットファイルを抜いて、boot.bin を作り直すことにした。

前回、boot.bin を作ったのは、”Ultra96 で ikwzm さんのDebian9 Root File Systemを動かしてみる4”だった。
そこの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] DMA_pow2_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 が生成された。以前にビットファイルを入れているときは、6.6 MB の容量だったが、1.0 MB になった。
Ultra97_cam_capture_6_181123.png

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: 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 
           --  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: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           00000000 Len: 00000020 Res: 00000780 "ImageHeader u-boot.elf"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           00000000 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           00000000 Len: 00000040 Res: 00001640 "PartitionHeader Null"
           00000000 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00000000 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           00000000 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of 
[INFO]   : After align 
           --  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: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           00000980 Len: 00000020 Res: 00000780 "ImageHeader u-boot.elf"
           00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00001140 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           00001180 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           000011c0 Len: 00000040 Res: 00001640 "PartitionHeader Null"
           00002800 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00039600 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           00045b00 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of 
[INFO]   : Partition Information: 
[INFO]   : Image: fsbl.elf
[INFO]   :      1. Partition: fsbl.elf.0,  Size: 224712
[INFO]   : Image: bl31.elf
[INFO]   :      2. Partition: bl31.elf.0,  Size: 50432
[INFO]   : Image: u-boot.elf
[INFO]   :      3. Partition: u-boot.elf.0,  Size: 758744
[INFO]   : After Link 
           --  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: 00000020 Res: 00000000 "ImageHeader bl31.elf"
           00000980 Len: 00000020 Res: 00000780 "ImageHeader u-boot.elf"
           00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
           00001140 Len: 00000040 Res: 00000000 "PartitionHeader bl31.elf.0"
           00001180 Len: 00000040 Res: 00000000 "PartitionHeader u-boot.elf.0"
           000011c0 Len: 00000040 Res: 00001640 "PartitionHeader Null"
           00002800 Len: 00036dc8 Res: 00000000 "fsbl.elf.0"
           00039600 Len: 0000c500 Res: 00000000 "bl31.elf.0"
           00045b00 Len: 000b93d8 Res: 00000000 "u-boot.elf.0"
           -- End of 


新しいboot.bin をMicroSD カードに書いてブートすると、DONE ランプが点灯せずにDebian が立ち上がった。成功だ。
  1. 2018年11月23日 14:48 |
  2. Ultra96
  3. | トラックバック:0
  4. | コメント:0

コメント

コメントの投稿


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

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