###### tags: `Blaize_eSDK` # Upgrading U-boot in SPI-NOR eSDKバージョンに応じた fip.bin を都度書き込む必要あり。 異なるバージョンの fip.bin が書かれていると、カーネル起動中エラーが発生し起動しないようである。 22.2.0向けの fip.bin では、eSDK 22.3.0 の OS は起動しなかった。 逆に 22.3.0向けの fip.bin では eSDK 22.2.0 の OSは起動しなかった。 22.2.0のfip.binのままだと、22.3.0は起動できない。 ```console= [ 0.000000] Hardware name: Blaize BLZP1600 SoM1600P CB2 (DT) [ 0.000000] pstate: 20000085 (nzCv daIf -PAN -UAO) [ 0.000000] pc : clk_mux_get_parent+0x14/0x70 [ 0.000000] lr : __clk_init_parent+0x38/0x50 [ 0.000000] sp : ffff800010b03c40 [ 0.000000] x29: ffff800010b03c40 x28: ffff000000007518 [ 0.000000] x27: 0000000000000007 x26: 0000000000000007 [ 0.000000] x25: 0000000000000000 x24: ffff800010b03e58 [ 0.000000] x23: ffff000000007400 x22: ffff000000016500 [ 0.000000] x21: ffff000000015c00 x20: ffff000000015b80 [ 0.000000] x19: ffff000000016500 x18: ffff800010a07640 [ 0.000000] x17: 00000000d90ec943 x16: 00000000def2467e [ 0.000000] x15: 0000000200850000 x14: ffffffffffffffff [ 0.000000] x13: 0000000000000028 x12: 0000000000000028 [ 0.000000] x11: 0000000000000003 x10: 0101010101010101 [ 0.000000] x9 : 0000000000000000 x8 : 7f7f7f7f7f7f7f7f [ 0.000000] x7 : 6a6b625e2f6b6b6f x6 : 13000700000e1913 [ 0.000000] x5 : 13190e0000070013 x4 : ffff800010053000 [ 0.000000] x3 : 1b635982fb6babc0 x2 : ffff8000103e43e0 [ 0.000000] x1 : 0000000000000000 x0 : ffff000000015b80 [ 0.000000] Call trace: [ 0.000000] clk_mux_get_parent+0x14/0x70 [ 0.000000] __clk_init_parent+0x38/0x50 [ 0.000000] __clk_register+0x32c/0x6a0 [ 0.000000] clk_hw_register+0x1c/0x60 [ 0.000000] clk_hw_register_mux_table+0x100/0x170 [ 0.000000] clk_register_mux+0x2c/0x50 [ 0.000000] blzp1600crc_clk_root_gen_init+0xec/0x210 [ 0.000000] blzp1600crc_init+0xe8/0x10c [ 0.000000] of_clk_init+0x1c0/0x254 [ 0.000000] time_init+0x10/0x44 [ 0.000000] start_kernel+0x2d4/0x42c [ 0.000000] Code: 910003fd 3940b401 f9400c04 372801e1 (b9400084) [ 0.000000] ---[ end trace e60c09da34f30367 ]--- [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- ``` 以下の手順でアップデートする。 * u-bootで fip.bin を書き込む。tftp或いは、kermit, fatloadなどを使ってRAM (0x8080000) にアップロードする。 (1) tftpの場合 fip.bin を /srv/tftp に置く。 ```console= $ sudo ln -s ~/blaize/AIBOX_22.3.0/blaize-esdk-buildroot-22.3.0/buildroot/output/images/fip.bin /srv/tftp/ ``` ```console= => tftp ${loadaddr} fip.bin Speed: 1000, full duplex Using ethernet@200640000 device TFTP from server 192.168.0.7; our IP address is 192.168.0.8 Filename 'fip.bin'. Load address: 0x8080000 Loading: ################################################################# ################################################################# ################### 6.7 MiB/s done Bytes transferred = 758378 (b926a hex) ``` (2) Teratermのファイル転送 (kermit)の場合 u-bootプロンプトで loadb と打ち、リターン。 ```console= => loadb ## Ready for binary (kermit) download to 0x08080000 at 115200 bps... ``` * File->Transfer->Kermit->Send... を選択 ![](https://i.imgur.com/vNJU09J.png) * ダウンロード開始。 ![](https://i.imgur.com/FYG0S2Q.png) * ダウンロードが終わると、下記のようなログが表示される。 (ダウンロード所要時間5分程度) ```console= ## Total Size = 0x000b6439 = 746553 Bytes ## Start Addr = 0x08080000 ``` (2) SPIへの書き込み ```console= => run upgrade_spi_fip SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB, total 64 MiB SF: 761856 bytes @ 0x0 Erased: OK device 0 offset 0x0, size 0xb926a SF: 758378 bytes @ 0x0 Written: OK ```