メッセージ欄

分類 【NetBSD】 で検索

一覧で表示する

GW3.5MX2-SLAN/CBのブートメッセージ
2008/01/15(火) 25:49 NetBSD はてブ情報 はてブに登録 はてブ数

Linuxでブートしたときのメッセージを記録しておこう。
                           Boot Menu
====================================================================
1: Start the Kernel Code
2: List Image
3: Delete Image
4: Create New Image
5: Set IP adderss
6: Setting MAC address

X:Upgrade Boot    Y:Upgrade Kernel

=> Select: 1

Start Copy 1572864 bytes from 0x70020000 to 0x1600000
(文字化けにつき省略)
Start Copy 2097152 bytes from 0x701a0000 to 0x800000
(文字化けにつき省略)
Go
Uncompressing Linux................................................................................................... done, booting the kernel.
Linux version 2.6.10_dev-versatile926ejs (root@localhost.localdomain) (gcc version 3.4.4) #34 Wed Oct 31 10:19:33 CST 2007
CPU: FA52Xid(wb) [66015261] revision 1 (ARMv4)
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 2, 16 byte lines, 256 sets
CPU0: D cache: 4096 bytes, associativity 2, 16 byte lines, 128 sets
Machine: Sword sl2312
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: root=/dev/ram0 rw console=ttySL0,19200 initrd=0x0800000,16M
PID hash table entries: 512 (order: 9, 8192 bytes)
Bus: 116MHz(3/2)
Console: colour dummy device 80x30
sl2312 console setup :
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 45184KB available (2370K code, 758K data, 100K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
desched cpu_callback 2/00000000
checking if image is initramfs...desched thread 0 started up.
it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 16384K
NET: Registered protocol family 16
PCI: bus0: Fast back to back transfers disabled
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
sl2312 Gpio init
GPIO initial OK
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NTFS driver 2.1.22 [Flags: R/O].
Initializing Cryptographic API
ipsec_init : cryptographic accelerator
ipsec tx_desc = ffc00000
ipsec rx_desc = ffc01000
ipsec tx_desc_dma = 017a2000
ipsec rx_desc_dma = 017a3000
Real Time Clock Driver v0.10
Storlink Power Control Initialization
ttySL0 at MMIO 0x22000000 (irq = 6) is a SL2312
io scheduler noop registered
RAMDISK driver initialized: 4 RAM disks of 16384K size 1024 blocksize
emac_init_module:EMAC initialized for A3 Chip !
Support NAPI Driver.
eth0: Dropping NETIF_F_SG since no checksum feature.
Configure VID 1
Support NAPI Driver.
eth1: Dropping NETIF_F_SG since no checksum feature.
Configure VID 2
Get ADM identifier ffffffff
ADM699X not Found
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ide 0: physical = 52000000, virtual = c480e000, irq = 2
    ide0: MMIO-DMA , BIOS settings: hda:pio, hdb:pio
ide 1: physical = 52800000, virtual = c4810000, irq = 3
    ide1: MMIO-DMA , BIOS settings: hdc:pio, hdd:pio
SL2312 MTD Driver Init.......
SL2312 MTD Driver Init Success ......
sl2312-ohci sl2312-ohci: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
   arm4regs  :    30.000 MB/sec
   8regs     :    33.200 MB/sec
   32regs    :    34.400 MB/sec
raid5: using function: 32regs (34.400 MB/sec)
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 100K
Mounting proc filesystem...
2.6.10_dev-versatile926ejs
Mounting tmpfs to copy file from flash...
2.6.10_dev-versatile926ejs
HardDiskBootUp=NO
Boot up from flash
Checking and Mounting filesystem(s) ...
Copy hddapp.bz2 from flash to Ramdisk...
(文字化けにつき省略)
8448+0 records in
8448+0 records out
ln: /usr/share/locale: File exists
2.6.10_dev-versatile926ejs
Using /lib/modules/loop.ko
loop: loaded (max 8 devices)
2.6.10_dev-versatile926ejs
Using /lib/modules/ehci-hcd.ko
Using /lib/modules/ohci-hcd.ko
Using /lib/modules/uhci-hcd.ko
USB Universal Host Controller Interface driver v2.2
SkinnyNAS found, mount /system
EXT3-fs: unable to read superblock
EXT2-fs: unable to read superblock
cramfs: wrong magic
FAT: unable to read boot sector
FAT: unable to read boot sector
NTFS-fs error (device md0): read_ntfs_boot_sector(): Unable to read primary boot sector.
NTFS-fs error (device md0): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device md0): ntfs_fill_super(): Not an NTFS volume.
mount: Mounting /dev/md0 on /system failed: Invalid argument
SkinnyNAS found, mount /system
mount: Mounting /dev/hda1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/hdb1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/hdc1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/hdd1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/sda1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/sdb1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/sdc1 on /system failed: No such device or address
SkinnyNAS found, mount /system
mount: Mounting /dev/sdd1 on /system failed: No such device or address
mounted device=
cp: unable to remove `/usr/lib/libcce.so.0': Success
cp: unable to remove `/usr/lib/libglib-1.2.so.0': Success
cp: unable to remove `/usr/lib/libpam.so.0': Success
cp: unable to remove `/usr/lib/libstor.so.0': Success
ln: /usr/share/locale: File exists
2.6.10_dev-versatile926ejs
Umount tmpfs...

*************************
*       tx_desc = ffc06000
*       rx_desc = ffc08000
*       tx_desc_dma = 003fe000
*       rx_desc_dma = 02965000
*************************

ÿLink Up (786d) reg_val = 2f
 100M/Full
Flow Control Enable.
Storlink eth0 address = 7ab4f5001935
Enable MAC Flow Control...
2.6.10_dev-versatile926ejs
Using /lib/modules/rt2561ap.ko
rt2561ap: module license 'unspecified' taints kernel.
Starting syslogd...
Starting inetd...
Starting crond...

Running constructor /usr/sausalito/constructor/00_construct_start
Running constructor /usr/sausalito/constructor/01_construct_network
Running constructor /usr/sausalito/constructor/02_construct_autoip
Running constructor /usr/sausalito/constructor/09_construct_time
Running constructor /usr/sausalito/constructor/10_construct_dhcp
Running constructor /usr/sausalito/constructor/12_construct_syslog
Running constructor /usr/sausalito/constructor/20_construct_disk
Running constructor /usr/sausalito/constructor/20_construct_usb_disk
Running constructor /usr/sausalito/constructor/21_construct_disk_crypt
Running constructor /usr/sausalito/constructor/21_construct_raid
Running constructor /usr/sausalito/constructor/25_construct_admin
Running constructor /usr/sausalito/constructor/26_construct_grp_passwd
Running constructor /usr/sausalito/constructor/27_construct_group
Running constructor /usr/sausalito/constructor/30_construct_guest
Running constructor /usr/sausalito/constructor/50_construct_printer
Running constructor /usr/sausalito/constructor/91_construct_bonjour
Running constructor /usr/sausalito/constructor/95_construct_upnp
Running constructor /usr/sausalito/constructor/99_construct_stop
Done
pwc ioctl successly
waiting INT
Local package initialization:start syslogd
syslogd: Already running.
start crond
start thttpd
GetUDN: rand=3676b029
GetInterfaceName: ethernet interface name=eth0
GetUDN: UDN=3676b029-L121-7607-70aa-7ab4f501935
GetInterfaceName: ethernet interface name=eth0
.

Wed Feb  2 08:07:52 CST 2000
GetIPaddr: IP address=192.168.100.206
main: HTTP_buf=http://192.168.100.206:80
UPnPCreateMicroStack: UUID=uuid:3676b029-L121-7607-70aa-7ab4f501935
UPnPCreateMicroStack: Serial Number=0000001

nas login:

GW3.5MX2-SLAN/CBのシリアルコンソール
2008/01/12(土) 5:50 NetBSD はてブ情報 はてブに登録 はてブ数

さて、シリアルコンソールです。

まずは、本体に電源を入れて初期不良の確認です。

ブートして、DHCPでIPアドレスをもらったのをDHCPサーバのログで確認後、ブラウザでアクセス。うん、動いているみたい。

で、動作中に例のシリアルとおぼしきJP2のピンヘッダにテスタを当てる。どうやら、左がGNDらしい、というのはわかったが、それ以外がはっきりしない。一番右は3.3V、右から二番目も3.3V、右から三番目は3.3Vよりは小さい。うーむ。

なんとなく、受け側(RxD)は待ちなので電圧が出ず、送り側(TxD)は送ろうとする何かがたまっていれば電圧が出ているかもしれんなぁ、ということでGND, RxD, TxD, Vccだろうとあたりをつけた。

あと、UP-12CはRxD, TxDのLEDがあってピカピカ光ってくれるのでそのへんもたよりに推理するしかないな。

変動要素がピンアサインとシリアルの通信速度の二つがあるし、結構いろいろ試行錯誤することにしました。
うーん、RxDとTxD間違ってるのかなぁ、と入れ替えてみたり、速度を変えてみたりと。

最初は信号伝達コネクタを直接つないでいたんだけど、なんか接触が悪かったらしく、ケーブルを触るとゴミが表示されるというのに気づき、データなのか接触不良かわからんようではラチがあかないので、ICクリップコードを使ってきっちりつないでやることに。

そんなことをしながら、電源のON/OFFをするとTxDがピカピカと点滅するじゃありませんか。おいちょっとまて、普通ブート時はNASからデータが送られるんだからケーブルにとっては受信つまりRxDがピカピカするだろ、と思い、TxDとRxDが逆なのに気づいてしまいました。つまり、最初のピンアサインがあたっていたということなのでした。

で、次は正しく表示ができる速度を見つけないといけません。

こういうときは、地道に2400bpsから試すわけです。

が、2400bps, 9600bps, 14400bps, 19200bps, 38400bps, 56800bps, 115200bpsのいずれも文字化けもしくはだんまりです。

かならず電源断から始める、TeraTermを再起動する、などの条件を揃えてやり直すなど粘り強く試してみると19200bpsが化け化けながらもブートしてるっぽい文字の出力がされているようです。あと一息。

ややあきらめつつ、しばらく放ったらかしておいたら、なんということでしょう、読めるじゃないですか。おぉー。

その後、何度も試してみたところ、flashからデータを読み込むところでゴミが表示されるらしく、それ以外のところは問題ないということがわかりました。もちろん、flash読み込みによるゴミ表示によって、その後の表示も化け続けることがありますが、Terminal resetすればその後は読めるようになるようです。このへんはUP-12Cのせいなのか、そもそもそういうものなのかは不明です。

ということで、まとめるとGW3.5MX2-SLAN/CBのシリアルコンソールは次のようになります。
  • JP2がシリアル
  • 速度は19200bps
  • ピンアサインはGPIO:21と書いてある側からVcc,TxD,RxD,GND
www.tokuda.net/cgi-bin/fswiki/wiki.cgi?action=ATTACH&page=GW3%2E5MX2%2DSLAN%2FCB&file=SerialPin%2Ejpg

GW3.5MX2-SLAN/CB
2008/01/09(水) 27:49 NetBSD はてブ情報 はてブに登録 はてブ数

GW3.5MX2-SLAN/CBを買いました。秋葉ヨドバシで16,800円です。

玄人指向のGW3.5MX2-SLAN/CBのページ

さて、こいつはLinuxが乗っているらしいということで買ってみました。玄人指向でLinuxといえば玄箱ですが、誰もやってなさそうということで手を出してみることにしました。

Webを見ると次のような箱だということがわかります。
NetBSD的にはnonakaさんのNetBSD/evbarm HDL-F への道 第一回でSL3316なCPUはブートしているようです。

1: automatic38 『おお、貴重な情報。スゲー助かります。』 (2008/05/22 9:02)

telnetd
2007/10/29(月) 28:16 NetBSD はてブ情報 はてブに登録 はてブ数

まぁ試しに、って感じでinetd, telnetd入りを作ってみたらファイルサイズが1,497,359ですよ。
macbook:~ tokuda$ telnet 192.168.100.210
Trying 192.168.100.210...
telnet: connect to address 192.168.100.210: Connection refused
telnet: Unable to connect to remote host
うーん、やっぱりだめですね。

なんとかマルチユーザモード
2007/10/29(月) 27:58 NetBSD はてブ情報 はてブに登録 はてブ数

なんとかマルチユーザモードで目立ったエラーなしに起動するところまできました。

最終的にはlibhackからgetpwent, utmp, yplibを抜いたりしながらなんとかたどり着いた感じです。

現在のファイルサイズは1,472,301バイト。ftpもpaxも削ってなんとか収めた感じです。ただ、NFSが使えるのでマウントしちゃえば何とかなるかなと。まぁ、何するわけでもないんですけど。

目標のtelnetd起動まで、ですが苦しいです。inetdとtelnetdを両方入れないといけないというファイルサイズの問題とinetd経由でtelnetできない問題があるのです。前者はともかくとして、後者は設定の問題なんですよねぇ。telnetdもinetdもいろいろなオプションを落として作っているのでそれが影響してるんでしょうかねぇ。
hermit> boot

NetBSD/Armadillo-210 booting ...
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.33 (ARMADILLO210_TINY) #1: Sun Oct 28 00:08:06 JST 2007
        tokuda@macbook.local:/Users/tokuda/NetBSD/o/20071014/evbarm/sys/arch/evbarm/compile/ARMADILLO210_TINY
total memory = 32768 KB
avail memory = 26392 KB
mainbus0 (root)
cpu0 at mainbus0: ARM920T rev 0 (ARM9TDMI core)
cpu0: DC enabled IC enabled WB enabled EABT
cpu0: 16KB/32B 64-way Instruction cache
cpu0: 16KB/32B 64-way write-back-locking-A Data cache
epsoc0 at mainbus0: Cirrus Logic EP93xx SoC rev E0
epsoc0: fclk 200.02 MHz hclk 100.01 MHz pclk 50.00 MHz
epclk0 at epsoc0 addr 0x80810000-0x8081008f intr 4
epgpio0 at epsoc0 addr 0x80840000-0x808400cb intr 59
gpio0 at epgpio0: port A: 8 pins
gpio1 at epgpio0: port B: 8 pins
gpio2 at epgpio0: port C: 8 pins
gpio3 at epgpio0: port D: 8 pins
gpio4 at epgpio0: port E: 8 pins
gpio5 at epgpio0: port F: 8 pins
gpio6 at epgpio0: port G: 8 pins
gpio7 at epgpio0: port H: 8 pins
epled0 at epgpio0: port E bit1 1 bit2 0
armadillo9iic0 at epgpio0: port B bit1 4 bit2 5
iic0 at armadillo9iic0: I2C bus
seeprom0 at iic0 addr 0x50: AT24Cxx EEPROM
armadillo9iic0: WARNING: unable to read MAC address from SEEPROM
epe0 at epsoc0 addr 0x80010000-0x8001ffff intr 39
epe0: MAC address 00:00:00:00:00:00
lxtphy0 at epe0 phy 0: LXT971/2 10/100 media interface, rev. 2
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
epcom0 at epsoc0 addr 0x808c0000-0x808c0fff intr 52
epcom0: console
epcom1 at epsoc0 addr 0x808d0000-0x808d0fff intr 54
epwdog0 at epsoc0 addr 0x80940000-0x80940007 intr 36
eprtc0 at epsoc0 addr 0x80920000-0x8092010b intr 37
md0: internal 4096 KB image area
boot device: <unknown>
root on md0a dumps on md0b
root file system type: ffs
WARNING: preposterous TOD clock time
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
Mon Oct 29 17:39:17 UTC 2007
Starting file system checks:
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: a210
Configuring network interfaces: epe0.
add net default: gateway 192.168.100.1
Adding interface aliases:
Building databases: dev, utmp, utmpx, services, master.passwd done
/etc/rc: WARNING: No crash dump directory; savecore not run.
Mounting all filesystems...
Clearing temporary files.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
/etc/rc: WARNING: No swap space configured!
Starting local daemons:.
Updating motd.
Mon Oct 29 17:39:20 UTC 2007

NetBSD/evbarm (a210) (console)

login: root
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.33 (ARMADILLO210_TINY) #1: Sun Oct 28 00:08:06 JST 2007

Welcome to NetBSD!

This system is running a development snapshot of the NetBSD operating system,
also known as NetBSD-current.  It is highly possible for it to contain serious
bugs, regressions, broken features or other problems.  Please bear this in mind
and use the system with care.

You are encouraged to test this version as thoroughly as possible.  Should you
encounter any problem, please report it back to the development team using the
send-pr(1) utility (requires a working MTA).  If yours is not properly set up,
use the web interface at: http://www.NetBSD.org/support/send-pr.html

Thank you for helping us test and improve NetBSD.

# cd /
# ls bin sbin usr/bin usr/sbin
bin:
cat       date      ed        ls        pax       rm        stty
chmod     dd        hostname  mkdir     ps        rmdir     sync
cp        df        ln        mv        pwd       sh

sbin:
dmesg        init         mount_kernfs ping         shutdown     umount
fsck         mknod        mount_mfs    rcorder      swapctl
halt         mount        mount_nfs    reboot       sysctl
ifconfig     mount_ffs    newfs        route        ttyflags

usr/bin:
awk       cmp       gunzip    install   more      stat      xinstall
basename  find      gzcat     less      readlink  tar
chgrp     grep      gzip      login     sed       tset

usr/sbin:
chown           dev_mkdb        quotacheck      services_mkdb
chroot          pwd_mkdb        quotaon
#