1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

IDT 79RC32334でFreeBSD

Last updated at Posted at 2017-09-04

以前から気になっていたのですが、IDT 79RC32334を使ったIO DataのWN-G54/AXPがハムフェアで0円の箱に入っていたので、もらってきていじってみました。SDRAM16MのFlash4Mなので、そのままでFreeBSDは起動できると思われます。

写真(2017-09-04 22.08).jpg

このモデルはNetgearのWG602v1と同じ基板を使っているようです。

分解してみたら、PowerとLANのLEDが外されていました。たしかに設置場所によっては、チカチカして目障りかもしれませんし、外す事で消費電力も下がると思われます。さすがハムフェアのジャンクです。

このボードのJ1はJTAG/EJTAGの24ピン1.24mmピッチのコネクタで配列はデータシートにあります。J3とJ4はUARTのコネクタでJ4が0のフルでJ3が1のTX/RXだけになってます。

u-bootをビルドしてくれている人がいてまずこれをインストールしてみました。

このu-bootはnetconsoleなビルドでとりあえずネットワークで操作する事にします。netconsoleはUDPのブロードキャストを使って動いているようです。

u-bootのソースツリーのtools下にnetconsoleというスクリプトが用意されているのでこれを使うのが良いです。このスクリプトはncだけだとうまく動かなかったので、同じディレクトリのncb.cをコンパイルしたバイナリも使います。

IDTはアメリカのシリコンバレーの会社で、このSOCは2000年くらいからあるMIPS系SOCの先駆けで、FreeBSDのsys/mips/idtにコードがある32434の前の製品になります。MIPS4Kの前にあったのEnhancements to MIPS IIのようです。RC32434は4Kのようです。IDTは現在はMIPSなSOCは作っていないようです。

スクリーンショット(2017-10-02 9.37.09).png

RC32334とRC32434は型番が違いのですが、ほとんど違ったチップのようです。RC32434にはTulip系のネットワークインターフェースが入っていますが、RC32334にはありません。割り込みコントローラやPCIコントローラーもアドレスも違うし構成も全く違うようです。

RC32334でキャッシュをオンで起動すると落ちるので、オフのオプション(MIPS_DISABLE_L1_CACHE)を指定しています。

ZRouterのsocとboardsにエントリーを作り、sys/mips/idtを使いごにょごにょしてとりあえず起動しました。sys/mips/idtはもうだれもビルドしてないような気もしますが、エラーも無くビルドはできました。

U-Boot 2009.11 (Jan 17 2010 - 14:10:57)

Board: Netgear WG602(CPU Speed 150 MHz)
DRAM:  16 MB
Flash:  4 MB
*** Warning - bad CRC, using default environment

cmd line: (null) 
Cache info:
  picache_stride    = 0
  picache_loopcount = 0
  pdcache_stride    = 0
  pdcache_loopcount = 0
  max line size     = 0
cpu0: Unknown cid 0 processor v0.24
  MMU: Standard TLB, 0 entries 
  L1 i-cache: disabled  L1 d-cache: disabled  L2 cache: disabled
Physical memory chunk(s):
0x375000 - 0xffffff, 13152256 bytes (3211 pages)
Maxmem is 0x1000000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #17 edef34f(zrouter)-dirty: Mon Sep  4 20:24:38 JST 2017
    hiroki@microserver:/storage/home/hiroki/obj/storage/home/hiroki/zrouter/tmp/
mips.mipsel/storage/home/hiroki/freebsd/sys/IOData_WN_G54AXP mips
gcc version 4.2.1 20070831 patched [FreeBSD]
Preloaded elf kernel "kernel" at 0x80370360.
real memory  = 16777216 (16384K bytes)
Physical memory chunk(s):
0x00401000 - 0x00f8afff, 12099584 bytes (2954 pages)
avail memory = 11829248 (11MB)
arc4random: no preloaded entropy cache
mem: <memory>
null: <full device, null device, zero device>
nexus0: <MIPS32 root nexus>
random: harvesting attach, 8 bytes (4 bits) from nexus0
clock0: <Generic MIPS32 ticker> on nexus0
Timecounter "MIPS32" frequency 165000000 Hz quality 800
Event timer "MIPS32" frequency 165000000 Hz quality 800
random: harvesting attach, 8 bytes (4 bits) from clock0
obio0 at mem 0-0x1ffffffe on nexus0
pcib0 on obio0
pci0: <PCI bus> on pcib0
pci0: domain=0, physical bus=0
found-> vendor=0x0014, dev=0x1808, revid=0x14
        domain=0, bus=0, slot=0, func=0
        class=18-08-00, hdrtype=0x08, mfdev=0
        cmdreg=0x0014, statreg=0x1808, cachelnsz=20 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0: <unknown> at device 0.0 (no driver attached)
random: harvesting attach, 8 bytes (4 bits) from pci0
random: harvesting attach, 8 bytes (4 bits) from pcib0
uart0: <16550 or compatible> on obio0
uart0: console (115200,n,8,1)
uart0: fast interrupt
uart0: PPS capture mode: DCD
random: harvesting attach, 8 bytes (4 bits) from uart0
uart1: <Non-standard ns8250 class UART with FIFOs> on obio0
uart1: console (115200,n,8,1)
uart1: fast interrupt
uart1: PPS capture mode: DCD
random: harvesting attach, 8 bytes (4 bits) from uart1
random: harvesting attach, 8 bytes (4 bits) from obio0
cfi0 at mem 0xbfc00000-0xbfffffff on nexus0
device_attach: cfi0 attach returned 6
Device configuration finished.
Timecounters tick every 10.000 msec
tcp_init: net.inet.tcp.tcbhashsize auto tuned to 512
Trying to mount root from cd9660:/dev/map/rootfs.uzip []...
mountroot: waiting for device /dev/map/rootfs.uzip...
Mounting from cd9660:/dev/map/rootfs.uzip failed with error 19.

Loader variables:

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> 

Linuxはu-boot同様にUDPを使ったnetconsoleを使えるようですが、FreeBSDではサポートされていないので上記はJ4のuart0のTXの出力になります。

課題

  • 古いFlashのためかcfiが認識されていない
  • pci接続のreも認識されてない
  • sys/mips/idtは434決め打ちになっているところがあるので整理が必要かも

pciが何となく動いてそうなので、何かに用途があったら続きをやってみたいと思います。

u-bootつぶしてしまって、ur-jtagでも見てみたがcpuは見えるがflashが見えないので、断念しました。

JTAGコネクタはハーフピッチで以下のような並びのようです。

写真(2023-04-01 14.12).jpg

Pin Name
1 TRST*
3 TDI
5 TDO
7 TMS
9 TCLK
11 RST*
21 Debugboot
23 Ref Vol

いつのまにかIDTはRenesasに買収されてしまいました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?