LoginSignup
1
2

More than 5 years have passed since last update.

u-bootのtftp

Last updated at Posted at 2017-04-09

u-bootにはflashイメージや実行ファイルをネットワークからメモリに読み込むためのtftpの機能があります。この機能は二種類の方式があり、u-bootがクライアントになるタイプと、u-boot自体がサーバになるタイプです。

  • u-bootがクライアントでサーバに取りにいくパターン
2: System Load Linux Kernel then write to Flash via TFTP. 
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
 Please Input new ones /or Ctrl-C to discard
      Input device IP (10.10.10.200) ==:10.10.10.200
      Input server IP (10.10.10.3) ==:10.10.10.3
      Input Linux Kernel filename (fonita.img) ==:Fon_FON2305E_FDT.zimage

 netboot_common, argc= 3 

 NetTxPacket = 0x81FE4DC0 
Trying Eth0 (10/100-M)

 ETH_STATE_ACTIVE!! 
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.200
Filename 'Fon_FON2305E_FDT.zimage'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
  • u-bootがサーバになりクライアントからputされるパターン
2: System Load Linux Kernel then write to Flash via TFTP. 
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
 Please Input new ones /or Ctrl-C to discard
      Input device IP (10.10.10.123) ==:

      Input server IP (10.10.10.3) ==:

      Input Linux Kernel filename () ==:


 netboot_common, argc= 3 
略
 ETH_STATE_ACTIVE!! 
Select server or client model: 1/2
SERVER IP address : 10.10.10.123 port:69
Load address: 0x8a100000
Loading: Peer IP:10.10.10.3

このパターンではファイルがあるホストで以下のようなスクリプトを実行してファイルを渡します。

#!/bin/sh

FILE="Planex_MZK-W04N-XX.zimage"

echo "bin
put ${FILE}
quit
" | tftp 10.10.10.123

コマンドモードのtftpboot(tftp)についても二つのタイプがあります。詳しく調べてないのですが、これはu-bootビルド時に設定されているのではないかと思います。

外付けのSwitchなどが入っている場合に、tftpの転送が始まるのが遅いモジュールがあります。早かったり遅かったりの場合もあります。理由はよくわかりません。

1
2
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
1
2