netcat@u-boot_usl5p

 netcatでu-bootのlogを見たい。
 最初にelijahさんからu-bootを頂いた時に少し試したのですが、その時はやり方がわからず、挫折しました。
 玄箱のおかげか情報が少し増えて、再挑戦してみました。

1.u-boot.envは以下です。

ipaddr 192.168.a.b
ncip 192.168.x.y
stdin nc
stdout nc
stderr nc
bootargs console=ttySC1,115200 mem=64M root=/dev/sda3
bootcmd0 ext2load ide 0:3 0x8c400000 /boot/vmlinuz-3.?.?-landisk;zimageboot 0x8c400000 0x8c001000

2.ここからはホスト側です。
nc -v -v -n -u -s 192.168.x.y -p 6666 192.168.a.b 6666
この後USL-5Pの電源ON!(またはreboot)
ホスト側には

setenv stderr = nc
setenv bootargs = console=ttySC1,115200 mem=64M root=/dev/sda3
setenv bootcmd0 = ext2load ide 0:3 0x8c400000 /boot/vmlinuz-3.?.?-landisk;zimageboot 0x8c400000 0x8c001000
Loading file "/boot/vmlinuz-3.?.?-landisk" from ide device 0:3 (hda3)
1974304 bytes read

と表示されます。(最初はserial入出力で、u-boot.env読み込み後にnetcat入出力に切り替わるので、すべてのlogがnetcatで表示されるわけではありません。)
 serialに出力されるlogは、以下になります。

U-Boot 2011.09 (Dec 06 2011 - 19:20:09)

CPU: SH4
BOARD: IO-DATA Usl-5p
DRAM:  64MB
Using default environment

PCI: SH7751 PCI host bridge found.
PCI:   Bus Dev VenId DevId Class Int
  00:00.0     - 10ec:8139 - Network controller
  00:02.0     - 1033:0035 - Serial bus controller
  00:02.1     - 1033:0035 - Serial bus controller
  00:02.2     - 1033:00e0 - Serial bus controller
In:    serial
Out:   serial
Err:   serial
Bus 0: OK
  Device 0: Model: HMS360402D5CF00  Firm: DN2OC60G Ser#: N2GRN0HA
            Type: Removable Hard Disk
            Capacity: 1953.0 MB = 1.9 GB (3999744 x 512)
Net:   RTL8139#0Warning: failed to set MAC address

Hit any key to stop autoboot:  0
Loading file "/boot/u-boot.env" from ide device 0:1 (hda1)
218 bytes read
setenv ipaddr = 192.168.a.b
setenv ncip = 192.168.x.y
setenv stdin = nc
setenv stdout = nc

 192.168.x.yはホスト側ipアドレス、192.168.a.bはUSL-5Pのipアドレスです。
 netcat(nc)で起動するu-bootのニーズってどれくらいあるのでしょうか?