作成: 2005-06-06 22:31:21 (月)
更新: 2005-06-26 20:38:31 (日)
参照: 11173

#contents


添付:fileredboot.elf.ae3069.4mb.mot.gz fileaki3069net-image-4mb.bin.gz

秋月電子AE-3069(Aki3069net)にDRAMを増設する

  • 最近の秋月電子AE-3069キットにはマザーボードが付いている様子です。
  • マザーボード欲しさに、もう一枚購入しようかなと思います。
    • MBだけ売って欲しいが。
  • 当方購入(2003年1月)時より価格が安くなっています。(当時MBは無し)
  • DRAMがEDOになって、ファーストページモードが不可らしいです。(DRCRAでBE=0にする指示有り)
    • 以下記事では、標準・拡張DRAM共にBE=1の日立製DRAMを使用しています。

17010022.jpg
  • ピンの足を一度開いてから曲げる(フォーミングする)のを慎重に行ったが、案の定7番ピンを折ってしまった。(~CS3接続 ピン,10KΩでプルアップ)

Redbootの変更方法について

  • 当方の半田付け(DRAMアドレス線)に不備が有り、0x7F4000をWORK指定するとRedbootが起動出来ない状態になっていた。
    • これがずっと判らずストールしていた。(半田付け 要注意)
  • ecos-2.0/packages/hal/h8300/aki3068net/current/include/platform.inc
    • 0x3cを0x58 もしくは0x5c にする。
        100 INIT_REGS_DATA(CYGARC_DRCRA,0x58)
  • ecos-2.0/packages/hal/h8300/aki3068net/current/include/pkgconf/mlt_h8300_h8300h_aki3068net_rom.h
    • 15行 CYGMEM_REGION_ram_SIZEの0x200000を0x400000 (4MB)にする。
           1 // eCos memory layout - Wed Nov 24 13:10:23 1999
           2
           3 // This is a generated file - changes will be lost if ConfigTool(MLT) is
              run
           4
           5 #ifndef __ASSEMBLER__
           6 #include <cyg/infra/cyg_type.h>
           7 #include <stddef.h>
           8
           9 #endif
          10
          11 #define CYGMEM_REGION_ram (0x400000)
          12 #if !defined(CYGPKG_IO_ETH_DRIVERS)
          13 #define CYGMEM_REGION_ram_SIZE (0x400000)
          14 #else
          15 #define CYGMEM_REGION_ram_SIZE (0x400000-0xC000)
          16 #endif
          17 #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATT
             R_W)
          18
  • ecos-2.0/packages/hal/h8300/aki3068net/current/include/pkgconf/mlt_h8300_h8300h_aki3068net_rom.ldi
    • 18行 #define WORK 0x5f4000を 0x7f4000にする。
           1 // eCos memory layout - Fri Oct 20 08:25:16 2000
           2
           3 // This is a generated file - do not edit
           4
           5 #include <cyg/infra/cyg_type.inc>
           6
           7 OUTPUT_FORMAT("elf32-h8300")
           8 OUTPUT_ARCH(h8300h)
           9
          10 MEMORY
          11 {
          12 #define IRAM_TOP 0xffbf20
          13     rom : ORIGIN = 0x000000, LENGTH = 0x60000
          14 #if !defined(CYGPKG_IO_ETH_DRIVERS)
          15 #define WORK (IRAM_TOP+0x100)
          16     ram : ORIGIN = WORK, LENGTH = 0x4000-0x100
          17 #else
          18 #define WORK 0x7f4000
          19     ram : ORIGIN = WORK, LENGTH = 0xC000
          20     iram : ORIGIN = IRAM_TOP, LENGTH = 0x4000-0x100
          21 #endif
  • 下記を実行
    $ ecosconfig new aki3068netredboot
    $ ecosconfig add CYGPKG_IO_ETH_DRIVERS
    $ ecosconfig add CYGPKG_DEVS_ETH_NS_DP83902A
  • ecos-2.0/ecos.eccを編集(user_value 0x007FFE00)
      4777 cdl_option CYGDAT_REDBOOT_H8300_LINUX_COMMAND_START {
      4778     # Flavor: data
      4779     # No user value, uncomment the following line to provide one.
      4780     user_value 0x007FFE00
      4781     # value_source default
      4782     # Default value: 0x005FFE00
      4783 };
  • ecosconfig check
    $ ecosconfig check
    Target: aki3068net
    Template: redboot
    Added:
     CYGPKG_IO_ETH_DRIVERS
     CYGPKG_DEVS_ETH_NS_DP83902A
    No conflicts
  • ecosconfig treeを実行し、makeしてROMに書き込む。

Redboot起動結果

  • 試行時ファイル: fileredboot.elf.ae3069.4mb.mot.gz
    +DP83902A - eeprom ESA: 00:02:cb:01:62:5c
    Ethernet eth0: MAC address 00:02:cb:01:62:5c
    IP: 192.168.2.11/255.255.255.0, Gateway: 0.0.0.0
    Default server: 192.168.2.5, DNS server IP: 0.0.0.0
    
    RedBoot(tm) bootstrap and debug environment [ROM]
    Non-certified release, version UNKNOWN - built 14:24:47, Jun 26 2005
    
    
    Platform: Akizuki H8/3068 Network micom (H8/300H)
    Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
    
    RAM: 0x00400000-0x007f4000, 0x00400000-0x007f4000 available
    RedBoot>
    RedBoot> dump -b 0xfee026
    00FEE026: 58 98 B7 07 09 98 7F 00  00 00 FF FF FF FF FF FF  |X...............|
    00FEE036: FF FF FF 00 FF FF 00 FF  00 F0 FF FF FF FF FF FF  |................|
    RedBoot>
    RedBoot> dump -b 0x7f4000
    007F4000: 00 00 03 22 00 00 03 22  00 00 00 00 00 00 00 00  |..."..."........|
    007F4010: 00 00 00 00 00 00 03 22  00 00 03 22 00 00 03 22  |......."..."..."|
    RedBoot>

uClinuxカーネル変更と起動結果

カーネル変更内容 (ram.ld)

  • uClinux-dist-h8300/linux-2.4.x/arch/h8300/platform/h8300h/aki3068net/ram.ld
         1 /* AE-3068 (aka. aki3068net) RAM */
         2
         3 OUTPUT_ARCH(h8300h)
         4 ENTRY("__start")
         5
         6 MEMORY
         7     {
         8     ram    : ORIGIN = 0x400000, LENGTH = 0x800000-0x400000
         9     eram   : ORIGIN = 0x800000, LENGTH = 0
        10     }

uClinux起動結果

カーネル+romfsイメージで起動した場合

RedBoot> load -r -v -m TFTP -b 0x400000 aki3069net-image-4mb.bin;exec -c "consol
e=ttySC1,38400n81"
\
Raw file loaded 0x00400000-0x00529abb, assumed entry at 0x00400000
Now booting linux kernel:
 Entry Address 0x00400000
 Cmdline : console=ttySC1,38400n81
Linux version 2.4.21-uc0 (muranaka@colinux) (gcc version 3.3) #55 Sun Jun 26 17:
52:55 JST 2005

uClinux H8/300H
Target Hardware: AE-3068
H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
On node 0 totalpages: 2048
zone(0): 0 pages.
zone(1): 2048 pages.
zone(2): 0 pages.
Kernel command line: console=ttySC1,38400n81
virtual vector at 0x00fffd20
Calibrating delay loop... 3.30 BogoMIPS
Memory available: 2800k/3164k RAM, 0k/0k ROM (740k kernel code, 187k data)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
SuperH SCI(F) driver initialized
ttySC0 at 0x00ffffb0 is a SCI
ttySC1 at 0x00ffffb8 is a SCI
ttySC2 at 0x00ffffc0 is a SCI
h8max_dac: H8MAX D/A Converter Drive, by 2005 K.Muranaka
ne.c:v1.10 9/23/94 Donald Becker (becker@scyld.com)
Last modified Nov 1, 2000 by Paul Gortmaker
NE*000 ethercard probe at 0x200000:<4>eth0: interrupt from stopped card
 00 02 cb 01 62 5c
eth0: NE1000 found at 0x200000, using IRQ 17.
Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: 4E8EB8-529AB7 [VIRTUAL 4E8EB8-529AB7] (RO)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 1024)
VFS: Mounted root (romfs filesystem) readonly.
Freeing unused kernel memory: 24k freed (0x4c4000 - 0x4c9000)
誓/etc/rc start
Welcome to
          ____ _  _
         /  __| ||_|
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

Akizukidenshi/AE-3068 (aki3069net) port.
For further information check:
http://www.uclinux.org/

eth0      Link encap:Ethernet  HWaddr 00:02:CB:01:62:5C
          inet addr:192.168.2.11  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 iB)  TX bytes:0 (0.0 iB)
          Interrupt:17

lo        Link encap:Local Loopback
          LOOPBACK  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 iB)  TX bytes:0 (0.0 iB)



BusyBox v0.60.4 (2005.06.26-08:53+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# free
              total         used         free       shared      buffers
  Mem:         2824         1608         1216            0          156
# cat /etc/rc
echo '/etc/rc start'
hostname AE3069
ifconfig eth0 192.168.2.11
thttpd -d /home/www -c 'cgi-bin/*' &
mount -t proc proc /proc
cat /etc/motd
ifconfig -a
# ps
  PID PORT STAT SIZE SHARED %CPU COMMAND
    1      S     73K     0K  1.8 init
    2      S      0K     0K  0.0 keventd
    3      R      0K     0K  0.0 ksoftirqd_CPU0
    4      S      0K     0K  0.0 kswapd
    5      S      0K     0K  0.0 bdflush
    6      S      0K     0K  0.0 kupdated
   11      S    277K     0K  7.6 thttpd -d /home/www -c cgi-bin/*
   15      S    325K     0K 12.8 /bin/sh
   18      R     73K     0K 99.9 ps
#
  • 上記でCGIを起動
ae3069-cgi.png



nfsrootで起動時

RedBoot> load -r -v -m TFTP -b 0x400000 aki3069net-image-nfsroot-4mb.bin;exec -c
 "console=ttySC1,38400n81 nfsroot=192.168.2.5:/home/muranaka/uClinux-dist-h8300/
romfs"
-
Raw file loaded 0x00400000-0x004f1593, assumed entry at 0x00400000
Now booting linux kernel:
 Entry Address 0x00400000
 Cmdline : console=ttySC1,38400n81 nfsroot=192.168.2.5:/home/muranaka/uClinux-di
st-h8300/romfs
Linux version 2.4.21-uc0 (muranaka@colinux) (gcc version 3.3) #51 Sun Jun 26 14:
41:20 JST 2005

uClinux H8/300H
Target Hardware: AE-3068
H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
On node 0 totalpages: 2048
zone(0): 0 pages.
zone(1): 2048 pages.
zone(2): 0 pages.
Kernel command line: console=ttySC1,38400n81 nfsroot=192.168.2.5:/home/muranaka/
uClinux-dist-h8300/romfs
virtual vector at 0x00fffd20
Calibrating delay loop... 3.30 BogoMIPS
Memory available: 3024k/3130k RAM, 0k/0k ROM (766k kernel code, 197k data)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
SuperH SCI(F) driver initialized
ttySC0 at 0x00ffffb0 is a SCI
ttySC1 at 0x00ffffb8 is a SCI
ttySC2 at 0x00ffffc0 is a SCI
h8max_dac: H8MAX D/A Converter Drive, by 2005 K.Muranaka
ne.c:v1.10 9/23/94 Donald Becker (becker@scyld.com)
Last modified Nov 1, 2000 by Paul Gortmaker
NE*000 ethercard probe at 0x200000: 00 02 cb 01 62 5c
eth0: NE1000 found at 0x200000, using IRQ 17.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 1024)
Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from 192.168.2.5, my address is 192.168.2.11
IP-Config: Complete:
      device=eth0, addr=192.168.2.11, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.2.11, domain=, nis-domain=(none),
     bootserver=192.168.2.5, rootserver=192.168.2.5, rootpath=
Looking up port of RPC 100003/2 on 192.168.2.5
Looking up port of RPC 100005/1 on 192.168.2.5
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 32k freed (0x4ca000 - 0x4d1000)
誓/etc/rc start
Welcome to
          ____ _  _
         /  __| ||_|
    _   _| |  | | _ ____  _   _  _  _
   | | | | |  | || |  _ \| | | |\ \/ /
   | |_| | |__| || | | | | |_| |/    \
   |  ___\____|_||_|_| |_|\____|\_/\_/
   | |
   |_|

Akizukidenshi/AE-3068 (aki3069net) port.
For further information check:
http://www.uclinux.org/



BusyBox v0.60.4 (2005.06.26-05:49+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# free
              total         used         free       shared      buffers
  Mem:         3056         1744         1312            0            0
#
# cat /etc/rc
echo '/etc/rc start'
hostname AE3069
mount -t proc proc /proc
mount -o remount,rw /dev/root /
route add default gw 192.168.2.1
thttpd -d /home/www -c 'cgi-bin/*' &
cat /etc/motd
#
# cat /proc/cpuinfo
CPU:            H8/300H
Clock:  20.0MHz
BogoMips:       3.30
Calibration:    1651200 loops
#
# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:   3129344  1794048  1335296        0        0   221184
Swap:        0        0        0
MemTotal:         3056 kB
MemFree:          1304 kB
MemShared:           0 kB
Buffers:             0 kB
Active:            100 kB
Inactive:          116 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:         3056 kB
LowFree:          1304 kB
SwapTotal:           0 kB
SwapFree:            0 kB
#
# cat /proc/ioports
00200000-0020001f : eth0
00ffff9e-00ffff9e : h8maxdac
#
# ps
  PID PORT STAT SIZE SHARED %CPU COMMAND
    1      S     73K     0K  1.0 init
    2      S      0K     0K  0.0 keventd
    3      S      0K     0K  0.0 ksoftirqd_CPU0
    4      S      0K     0K  0.0 kswapd
    5      S      0K     0K  0.0 bdflush
    6      S      0K     0K  0.0 kupdated
    7      S      0K     0K  0.0 rpciod
   14      S    277K     0K  1.4 thttpd -d /home/www -c cgi-bin/*
   16      S    325K     0K  2.7 /bin/sh
   21      R     73K     0K 99.9 ps
#
  • resolv.confとデフォルトgwを設定してping確認
    • /etc/resolv.conf
      nameserver 192.168.2.1
    • デフォルトgw設定
      # route add default gw 192.168.2.1 
  • AE3069でたまに指摘されるセラロックの精度によるルータ越え不可、パケットロスは発生しなかった。
    • 64Byte、2422パケット、パケットロス0%
      --- brinkster.com ping statistics ---
      2423 packets transmitted, 2422 packets received, 0% packet loss
      round-trip min/avg/max = 120.0/153.3/280.0 ms
      #
    • 64Byte、22281パケット、パケットロス0%
      --- ucenthusiast.com ping statistics ---
      22335 packets transmitted, 22281 packets received, 0% packet loss
      round-trip min/avg/max = 120.0/137.9/2160.0 ms
      #
  • MTU:1500近くのパケットサイズ1472バイトで確認(2117パケット ロス0%)
    # ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:02:CB:01:62:5C
              inet addr:192.168.2.11  Bcast:192.168.2.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:450 errors:0 dropped:0 overruns:0 frame:0
              TX packets:526 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:100
              RX bytes:101428 (99.0 kiB)  TX bytes:160333 (156.5 kiB)
              Interrupt:17
    
    # ping -s 1472 brinkster.com
    1480 bytes from 65.182.102.190: icmp_seq=2116 ttl=110 time=160.0 ms
    
    --- brinkster.com ping statistics ---
    2117 packets transmitted, 2117 packets received, 0% packet loss
    round-trip min/avg/max = 140.0/168.1/270.0 ms
    #
    # traceroute brinkster.com
    traceroute to brinkster.com (65.182.102.190), 30 hops max, 40 byte packets
     1  192.168.2.1 (192.168.2.1)  10 ms  10 ms  10 ms
     2  61.26.122.1 (61.26.122.1)  30 ms  20 ms  30 ms
     3  203.165.9.100 (203.165.9.100)  20 ms  30 ms *
     4  203.165.9.161 (203.165.9.161)  30 ms  20 ms  60 ms
     5  203.165.0.157 (203.165.0.157)  40 ms  40 ms *
     6  202.239.171.169 (202.239.171.169)  50 ms  20 ms  20 ms
     7  59.128.4.66 (59.128.4.66)  20 ms  30 ms *
     8  203.181.96.233 (203.181.96.233)  40 ms  20 ms  20 ms
     9  203.181.100.18 (203.181.100.18)  150 ms  140 ms  170 ms
    10  203.181.104.90 (203.181.104.90)  150 ms  140 ms  160 ms
    11  4.68.127.213 (4.68.127.213)  140 ms  140 ms *
    12  4.68.121.225 (4.68.121.225)  140 ms  140 ms  160 ms
    13  4.68.128.150 (4.68.128.150)  150 ms  160 ms 64.159.1.121 (64.159.1.121)  150
    ms
    14  4.68.98.34 (4.68.98.34)  160 ms 4.68.98.130 (4.68.98.130)  150 ms  140 ms
    15  4.79.184.138 (4.79.184.138)  150 ms  140 ms  150 ms
    16  65.182.102.190 (65.182.102.190)  180 ms  170 ms  160 ms
    #




  • 以下は以前の情報です。(2005-06-06)
    • RedbootでのDRAM増設に対する変更方法について、試行錯誤している。
    • DRCRA=0x58(~CS3,~CS2:DRAM、BE=1, RASダウンモードdisable)とした。
    • 何とかRedboot上では0x600000〜0x7FFFFFまでアクセスは可能になった。
      • ※ 後に0x7f4000付近のR/Wアクセス確認不足が判明した。
+DP83902A - eeprom ESA: 00:02:cb:01:62:5c
... waiting for BOOTP information
Ethernet eth0: MAC address 00:02:cb:01:62:5c
IP: 192.168.2.11/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.2.5

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 03:34:21, Jun  6 2005

Platform: Akizuki H8/3068 Network micom (H8/300H)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

RAM: 0x00400000-0x005f4000, [0x00400000-0x005f4000] available
RedBoot>
RedBoot> d -b 0xfee026
00FEE026: 58 98 B7 07 09 98 7F 00  00 00 FF FF FF FF FF FF  |X...............|
00FEE036: FF FF FF 00 FF FF 00 FF  00 F0 FF FF FF FF FF FF  |................|
RedBoot>
RedBoot> mfill -b 0x600000 -p 0xAA -1 -l 10
RedBoot> d -b 0x600000 -l 10
00600000: AA AA AA AA AA AA AA AA  AA AA                    |..........      |
RedBoot>
RedBoot> mfill -b 0x700000 -p 0x55 -1 -l 0x10
RedBoot>
RedBoot> d -b 0x700000 -l 0x10
00700000: 55 55 55 55 55 55 55 55  55 55 55 55 55 55 55 55  |UUUUUUUUUUUUUUUU|
RedBoot>
  • がしかし、uClinuxのブート及び認識が出来ていない。
  • DRCRA=0x38のままでuClinuxを起動し、uClinux上でDRCRA=0x58としてリード・ライト可能であることは一応確認出来た。


添付ファイル: fileaki3069net-image-4mb.bin.gz [詳細] fileredboot.elf.ae3069.4mb.mot.gz [詳細]

トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: Sun, 26 Jun 2005 20:38:31 JST (4355d)