ユーザ用ツール

サイト用ツール


mae4xx_ope:update_firmware:start

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

次のリビジョン
前のリビジョン
mae4xx_ope:update_firmware:start [2018/03/15 10:27]
admin 作成
mae4xx_ope:update_firmware:start [2018/03/15 11:00] (現在)
admin
ライン 1: ライン 1:
 +====== ファームウェアの更新 ======
 +
 +===== bootloder からの更新 =====
 +
 +TFTP でファームウェアをダウンロードして更新を行います。
 +
 +<​code>​
 +(MAE) # dhcp
 +BOOTP broadcast 1
 +*** Unhandled DHCP Option in OFFER/ACK: 42
 +*** Unhandled DHCP Option in OFFER/ACK: 28
 +*** Unhandled DHCP Option in OFFER/ACK: 42
 +*** Unhandled DHCP Option in OFFER/ACK: 28
 +DHCP client bound to address 192.168.253.211
 +Using eth1 device
 +TFTP from server 192.168.253.1;​ our IP address is 192.168.253.211
 +Filename '​mae4xx_xenial_v3_0_0.img'​.
 +Load address: 0x48000000
 +Loading: T T #################################################################​
 +         #################################################################​
 +         #################################################################​
 +         #################################################################​
 +         #################################################################​
 +         #################################################################​
 +... 中略 ...
 +         #################################################################​
 +         #################################################################​
 +         #############​
 +done
 +Bytes transferred = 77479262 (49e3d5e hex)
 +(MAE) #
 +</​code>​
 +
 +\\
 +
 +ダウンロードが完了しました。\\
 +ファームウェアファイルは ZIP 形式となっていますので、内容を確認してみます。\\
 +**dhcp** コマンドにより TFTP でダウンロードすると、環境変数の
 +
 +  * fileaddr
 +  * filesize
 +
 +にそれぞれダウンロードしたアドレスとサイズがセットされますので、それを使用します。
 +
 +<​code>​
 +(MAE) # zipextract $fileaddr $filesize
 +Archive:
 + ​Length ​  ​Method ​   Size  Cmpr    Date    Time   ​CRC-32 ​  Name
 +-------- ​ ------ ​ ------- ---- ---------- ----- -------- ​ ----
 + ​3711744 ​ Stored ​ 3711744 ​  0% 2017-11-21 10:43 9a12519d ​ kernel.img
 +  604160 ​ Stored ​  ​604160 ​  0% 2017-11-21 10:43 5881d27a ​ kmod.img
 + ​2834928 ​ Stored ​ 2834928 ​  0% 2017-11-21 10:44 e40eb7e9 ​ initramfs.img
 +70295552 ​ Defl:N 70297396 ​  0% 2018-03-14 11:05 a425e4e8 ​ rootfs.img
 +   ​27643 ​ Defl:​N ​    ​6904 ​ 76% 2017-11-21 10:43 7e82142b ​ dtb.img
 +  100277 ​ Defl:​N ​   23230  77% 2017-11-21 10:43 0bad5400 ​ .config
 +-------- ​         ------- ​ ---                            -------
 +77574304 ​        ​77478362 ​  ​1% ​                           6 files
 +(MAE) #
 +</​code>​
 +
 +内容が確認できました。
 +
 +これを用いてファームウェアを更新してみます。\\
 +ファームウェア更新には、**firmup** コマンドを使用します。引数は下記のとおりとなっています。
 +
 +<​code>​
 +(MAE) # firmup
 +firmup - firmup
 +
 +Usage:
 +firmup fimraddr, firmlen, [area (0/1)]
 +</​code>​
 +
 +\\
 +
 +ここでも先程と同様に、環境変数にセットされた値を使用します。
 +
 +<​code>​
 +(MAE) # firmup $fileaddr $filesize
 +firmup: zip addr: 48000000, zip len: 77479262 ==> extract buffer addr: 4c9e3d61
 +* search kernel.img...
 +file '​kernel.img'​ compression type is COMP_NONE, stored at addr: 48000044, size: 3711744 (0x0038a300)
 +* updating kernel...
 +
 +device nand0 <​nand0>,​ # parts = 1
 + #: name                size            offset ​         mask_flags
 + 0: nand0.ubi ​          ​0x20000000 ​     0x00000000 ​     0
 +
 +active partition: nand0,0 - (nand0.ubi) 0x20000000 @ 0x00000000
 +
 +defaults:
 +mtdids ​ : nand0=nand0
 +mtdparts: mtdparts=nand0:​512M(nand0.ubi)
 +Creating 1 MTD partitions on "​nand0":​
 +0x000000000000-0x000020000000 : "​mtd=0"​
 +UBI: attaching mtd2 to ubi0
 +UBI: physical eraseblock size:   ​262144 bytes (256 KiB)
 +UBI: logical eraseblock size:    253952 bytes
 +UBI: smallest flash I/O unit:    4096
 +UBI: VID header offset: ​         4096 (aligned 4096)
 +UBI: data offset: ​               8192
 +UBI: attached mtd2 to ubi0
 +UBI: MTD device name:            "​mtd=0"​
 +UBI: MTD device size:            512 MiB
 +UBI: number of good PEBs:        2048
 +UBI: number of bad PEBs:         0
 +UBI: max. allowed volumes: ​      128
 +UBI: wear-leveling threshold: ​   4096
 +UBI: number of internal volumes: 1
 +UBI: number of user volumes: ​    12
 +UBI: available PEBs:             0
 +UBI: total number of reserved PEBs: 2048
 +UBI: number of PEBs reserved for bad PEB handling: 40
 +UBI: max/mean erase counter: 33/1
 +3711744 bytes written to volume kernel.0
 +* search dtb.img...
 +file '​dtb.img'​ total length extracted: 27643 (0x00006bfb)
 +* updating dtb...
 +27643 bytes written to volume dtb.0
 +* search initramfs.img...
 +file '​initramfs.img'​ compression type is COMP_NONE, stored at addr: 4841dbcd, size: 2834928 (0x002b41f0)
 +* updating initramfs...
 +2834928 bytes written to volume initramfs.0
 +* search kmod.img...
 +file '​kmod.img'​ compression type is COMP_NONE, stored at addr: 4838a386, size: 604160 (0x00093800)
 +* updating kmod...
 +604160 bytes written to volume kmod.0
 +* search rootfs.img...
 +file '​rootfs.img'​ total length extracted: 70295552 (0x0430a000)
 +* updating rootfs...
 +70295552 bytes written to volume rootfs.0
 +* search opt.img...
 +zip_extract:​ file '​opt.img'​ not found in zip archive.
 +  -> not found.
 +* search u-boot.bin.img...
 +zip_extract:​ file '​u-boot.bin.img'​ not found in zip archive.
 +  -> not found.
 +SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
 +* set latest firmware area: 0
 +(MAE) #
 +</​code>​
 +
 +MA-E3xx シリーズよりも NAND Flash のアクセスが低速なので少し長く時間がかかります。
 +
 +**『最終のファームウェア領域』** に "​0"​ がセットされたと出力されていますので、状況を確認してみます。
 +
 +<​code>​
 +(MAE) # firminfo -g 1
 +=== firmup history ===
 + - entry 0:
 +   ​timestamp:​ 1521078410 (2018/03/15 10:46:50)
 +   area: 0x10
 +</​code>​
 +
 +\\
 +
 +"​area"​ が 0x10 になっていることが確認できました。
 +
 +**reset** コマンドで再起動すると最新ファームウェアで起動します。
 +
 +{{:​mae4xx_ope:​update_firmware:​linux_booted_01.png|起動・ログイン・バージョン確認}}
 +
 +起動できました。
 +
 +\\
 +
 +===== Linux からの更新 =====
 +
  
mae4xx_ope/update_firmware/start.1521077279.txt.bz2 · 最終更新: 2018/03/15 10:27 by admin