Kernel panic2010/04/22 11:12

Kernelがパニックになってしまいました。メモリを4Mに増設したのに、恐れていたことが起こったのでしょうか? (^^;

これまで行った事は以下の通りです。
1 秋月より2Mbyteのメモリ(MSM5117805F)を購入し取り付け、ボードと同等品
   http://akizukidenshi.com/catalog/g/gI-02916/
2 メモリのチェックOK
3 RedBootを転送し、動作OK
4 uClinuxの再構築、転送
5 uClinuxのブートNG

-------------------------------------
+DP83902A - eeprom ESA: 00:02:cb:03:1c:92
... waiting for BOOTP information
Ethernet eth0: MAC address 00:02:cb:03:1c:92
IP: 192.168.0.28/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 17:17:10, Feb 22 2007

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

RAM: 0x00400000-0x007f4000, [0x00400000-0x007f4000] available
RedBoot> ip_address -l 192.168.0.211 -h 192.168.0.26
IP: 192.168.0.211/255.255.255.0, Gateway: 192.168.0.1
Default server: 192.168.0.26
RedBoot> load -v linux_nfsroot.elf
Using default protocol (TFTP)
Entry point: 0x00400004, address range: 0x003fff8c-0x004d6a24
RedBoot> exec -c "console=ttySC1,38400n81 nfsroot=192.168.0.26:/tftpboot/nfsroot"Now booting linux kernel:
Entry Address 0x00400000
Cmdline : console=ttySC1,38400n81 nfsroot=192.168.0.26:/tftpboot/nfsroot
Linux version 2.4.31-uc0 (root@localhost) (gcc version 3.4.3) #4 2010年 4月 22日T
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.0.26:/tftpboot/nfsrtvirtual vector at 0x00fffd20
Calibrating delay loop... 3.26 BogoMIPS
Memory available: 3008k/3115k RAM, 0k/0k ROM (781k kernel code, 196k 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
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 03 1c 92
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 DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.28
IP-Config: Complete:
device=eth0, addr=192.168.0.28, mask=255.255.255.0, gw=192.168.0.1,
host=192.168.0.28, domain=, nis-domain=(none),
bootserver=0.0.0.0, rootserver=192.168.0.26, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.26
Looking up port of RPC 100005/1 on 192.168.0.26
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 32k freed (0x4ce000 - 0x4d5000)
Kernel panic: No init found. Try passing init= option to kernel.
-------------------------------------

alloc_pages: 0-order allocation failed2010/04/20 09:23

「alloc_pages: 0-order allocation failed」を検索してみるとメモリー系のエラーのようですね。
以下のように本のサポートサイトで検索してもこれを懸念する方はいないようですが、大丈夫なのでしょうか?
メモリを2Mバイトから4Mバイトに増設すれば直るとか?
増設しても起きそうですね。気にしない方が良い? (^^;

http://uclinux.quake4.jp/search.php?query=alloc_pages%3A+0-order+allocation+failed+&search=+%B8%A1%BA%F7%A4%B9%A4%EB+&forum=all&andor=and

uClinux起動!2010/04/19 16:02

uClinuxが起動しました。
コマンドも受け付けるのですが、以下のようなエラーが発生しております。どうなっているのでしょうか?

__alloc_pages: 0-order allocation failed (gfp=0x1d0/0)

この問題と thtttp が起動しない問題を解決した後に何をやりましょうか、やはり禁断のDRAMの増設でしょうか? (^^;

----------------------------------
RedBoot> load -v linux_nfsroot.elf
Using default protocol (TFTP)
Entry point: 0x00400004, address range: 0x003fff8c-0x004d6a24
RedBoot> exec -c "console=ttySC1,38400n81 nfsroot=192.168.0.26:/tftpboot/nfsroot"Now booting linux kernel:
Entry Address 0x00400000
Cmdline : console=ttySC1,38400n81 nfsroot=192.168.0.26:/tftpboot/nfsroot
Linux version 2.4.31-uc0 (root@localhost) (gcc version 3.4.3) #2 Mon Apr 19 15:0
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: 1536
zone(0): 0 pages.
zone(1): 1536 pages.
zone(2): 0 pages.
Kernel command line: console=ttySC1,38400n81 nfsroot=192.168.0.26:/tftpboot/nfstvirtual vector at 0x00fffd20
Calibrating delay loop... 3.26 BogoMIPS
Memory available: 984k/1067k RAM, 0k/0k ROM (781k kernel code, 196k 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
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 03 1c 92
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 DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.28
IP-Config: Complete:
device=eth0, addr=192.168.0.28, mask=255.255.255.0, gw=192.168.0.1,
host=192.168.0.28, domain=, nis-domain=(none),
bootserver=0.0.0.0, rootserver=192.168.0.26, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.26
Looking up port of RPC 100005/1 on 192.168.0.26
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 32k freed (0x4ce000 - 0x4d5000)
Shell invoked to run file: /etc/rc
Command: hostname AE3068
Command: mount -t proc proc /proc
__alloc_pages: 0-order allocation failed (gfp=0x1d0/0)
mount: getcwd(): Unknown error 12
Command: cat /etc/motd
__alloc_pages: 0-order allocation failed (gfp=0x1d2/0)
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|

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

Execution Finished, Exiting
init: Failed to open /etc/inittab.
Sash command shell (version 1.1.1)
/> ls
__alloc_pages: 0-order allocation failed (gfp=0x1d2/0)
var usr tmp sbin proc mnt lib home etc dev bin
/> free
total used free shared buffers
Mem: 1016 884 132 0 0
/> thttpd -p 80 -d /var/www &
[16]
/> __alloc_pages: 0-order allocation failed (gfp=0x1d2/0)
__alloc_pages: 0-order allocation failed (gfp=0x1f0/0)

----------------------------------

16MDRAM2010/04/19 09:47

秋月に付けられているのは16Mbit品でした。すなわち2Mbyte品。書籍で話題になっているのは2Mbyte品を一枚増設して4Mbyteにするなどでした。以下のスレッドに書いてありました。 (^^;

http://uclinux.quake4.jp/read.php?FID=2&TID=107&p=3

uClinuxその後2010/04/19 09:00

書籍に従いブートローダのRedBootを起動させました。
redboot_std_2mb.srec では立ち上がりました。以下のログを参照ください。
redboot_std_4mb.srec では立ち上がりませんでした。おそらく2M2枚ののDRAMがあるのが前提なのに一枚しかないので、ここでエラーが発生したのでしょう。

書籍の頃のH8/3069ボードと違って、今は2Mではなく、16MのDRAMが標準です。このハードの仕様の差で色々な事が起こります。誰か
redboot_std_16mb.srec
を作っていないのだろうか?

下のログの一行目
「+**Warning** FLASH configuration checksum error or invalid key」
が気になります。 (^^;

----------------------------

+**Warning** FLASH configuration checksum error or invalid key
Use 'fconfig -i' to [re]initialize database
DP83902A - eeprom ESA: 00:02:cb:03:1c:92
... waiting for BOOTP information
Ethernet eth0: MAC address 00:02:cb:03:1c:92
IP: 192.168.0.28/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 14:54:02, Dec 21 2006

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

RAM: 0x00400000-0x005f4000, [0x00400000-0x005e1000] available
FLASH: 0x00000000 - 0x80000, 8 blocks of 0x00010000 bytes each.
RedBoot>

-----------------------------------

uClinux再開2010/03/25 14:50

サポートサイトを良く見るとVMwareやVirtualPC 2007用のlinux環境を構築済みのファイルがダウンロードできます。
今までPCを用意してFedra12,Fedra9,Redhat9のインストールをして色々やってきたのになんと言うことでしょうか! (^^;

http://www.quake4.jp/sushi-k/elecwiki/index.php?uClinux

VMware用とVirtualPC用は分かれており、私はVMware用をダウンロードしました。3.0.0 build-203739で動作を確認しました。

Debian(sarge)を基にLinuxが入っており、バージョンは2.4.27です。Debianは慣れていないのでどうしたものか。 (^^;

Kane BeBe H8/3069F 購入2010/01/21 16:52

色々検討したのですが、結局「Kane BeBe H8/3069F」を購入してTOPPERSとかuClinuxを試そうとしております。
このマニュアルにあるソースですがRedhat 9で開発したのではないでしょうか?Fedora12,Fedora9と試そうとしてmakeが失敗しましたが、Redhat 9は成功しております。ブログにもそのような記述を見かけます。まだマニュアル通り全部試したわけではありませんのでなんとも言えませんが。

Redhat9のカーネルは2.4.20-8です。この頃までは2.4系だったのですね。

http://satok.asablo.jp/blog/2009/12/24/4774575
http://www.kanebebe.com/download/H8uClinux/index.html

uClinux その22010/01/05 20:19

秋月の「H8/3069FフラッシュマイコンLANボード」で動くと聞いたので以下の書籍を購入しました。

はじめる組込みLinux H8マイコン×uClinuxで学べるマイコン開発の面白さ
http://www.amazon.co.jp/%E3%81%AF%E3%81%98%E3%82%81%E3%82%8B%E7%B5%84%E8%BE%BC%E3%81%BFLinux-H8%E3%83%9E%E3%82%A4%E3%82%B3%E3%83%B3%C3%97uClinux%E3%81%A7%E5%AD%A6%E3%81%B9%E3%82%8B%E3%83%9E%E3%82%A4%E3%82%B3%E3%83%B3%E9%96%8B%E7%99%BA%E3%81%AE%E9%9D%A2%E7%99%BD%E3%81%95-%E7%B1%B3%E7%94%B0-%E8%81%A1/dp/4797337192/ref=sr_1_1?ie=UTF8&s=books&qid=1262690226&sr=8-1-spell

この書籍に例の日米貿易戦争のときの記述がありました。元々日立はH8、H16、H32とそれぞれ8bit、16bit、32bitのCPUとして開発したが、結局H16、H32の開発が出来なくなり、H8だけが生き残りました。
H8の「8」は8bitの事では無いかと思ったり、H8の中に8bitやら16bitのシリーズがあり分かりにくいと思った事が有ったのですが、理由が分かりました。TRONの話が有名でしたが、こちらも被害を受けたのですね。日立の技術者の無念を噛み締めました。

打倒! 亜米利加合衆国!

Kane BeBe H8/3069F2009/12/24 10:13

RENESAS製H8/3069F 25MHzを使用した評価用ボードです。

TOPPERS JSP 1.4.3/TINET 1.3.2とuClinux 2.4.31,2.6.12がインストール可能です。ソースファイルに 一部修正しているようです。

http://www.nissin-tech.com/2009/10/uclinuxkane-bebe-h83069f.html
Google
WWW このブログ内