OpenWrt Forum Archive

Topic: Which target for Edimax BR-6104K?

The content of this topic has been archived between 12 Apr 2018 and 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everyone,

the subject basically tells it all: I have a dirt-cheap BR6104K around and would like to run OpenWRT on it.
It's based on the ADM5120. However, when compiling kamikaze, I have the choice between little and big
endian, and I haven't been able to figure out which one I need. sad Please give me a hint..

Florian

BR-6104KP is little-endian.

Thanks a lot. I'll give it a try right now.. stay tuned wink

All right, here we go: I had to make some minor changes to the kernel to make it compile, but it flashed and booted all right, up to the flash initialization:

Linux version 2.6.21.1 (echtler@butterbrot) (gcc version 4.1.2) #1 Sun May 27 18:18:18 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d34000 @ 002cc000 (usable)
Wasting 22912 bytes for tracking 716 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
start_kernel(): bug: interrupts were enabled early
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13372k/13520k available (2278k kernel code, 148k reserved, 345k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs May 27 2007 17:54:30 Installing. 
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 1) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 2) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Data bus error, epc == 8015c390, ra == 8015c35c
Oops[#1]:
Cpu 0
$ 0   : 00000000 10008400 bfe00020 00000002
$ 4   : 00200000 20ff2001 00200020 00000002
$ 8   : 00000002 80cf6a01 ffffffff 802c0000
$12   : 802c0000 8030fd42 802b8d04 00000000
$16   : 80285470 00200020 8030fe58 00200000
$20   : 8030fed8 80cf6a00 00000000 80285470
$24   : 00000000 80246204                  
$28   : 8030e000 8030fe10 00000000 8015c35c
Hi    : 00000000
Lo    : 00000001
epc   : 8015c390     Not tainted
ra    : 8015c35c Status: 10008403    KERNEL EXL IE 
Cause : 2080001c
PrId  : 0001800b
Modules linked in:
Process swapper (pid: 1, threadinfo=8030e000, task=8030cbe8)
Stack : 10008401 8030fe90 30303030 31663430 00000020 80285470 00000002 80156334
        8030fe90 00000000 00000000 00000000 00000051 00000052 80ccb22c 00000051
        00000052 00000059 8030fed8 800227cc 00000059 802b8928 00000002 00000004
        00200000 80285470 80156654 80156644 00000010 80260358 00000001 00000010
        00000000 00000010 00000004 00000001 00000001 8005a724 00000002 00000004
        ...
Call Trace:[<80156334>][<800227cc>][<80156654>][<80156644>][<8005a724>][<8015bf5c>][<80022748>][<80156154>][<800227cc>][<80004888>][<802a7d5c>][<80154df0>][]

Code: 24020004  8e02000c  00511021 <94420000> 080570ec  3050ffff  14620004  00000000  8e02000c 
Kernel panic - not syncing: Attempted to kill init!

I have to admit I'm too tired to follow this through now, so I'll post it here for reference and go to bed for the moment wink

Good night,
Florian

After a bit of debugging, I've traced the problem to the following code in drivers/mtd/chips/gen_probe.c, line 130:

  for (i = 1; i < max_chips; i++) {
    cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi);
  }

The actual bus error happens a bit farther down the call stack, in drivers/mtd/chips/cfi_probe.c, line 85:

  val[0] = map_read(map, base + osf*0x10);

At this point, base = 0x00200000 and ofs = 2.

When I remove the loop in drivers/mtd/chips/gen_probe.c, the kernel oops doesn't happen anymore, but the root fs can't be found:

Linux version 2.6.21.1 (echtler@butterbrot) (gcc version 4.1.2) #7 Mon May 28 14:48:41 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d32000 @ 002ce000 (usable)
Wasting 22976 bytes for tracking 718 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
start_kernel(): bug: interrupts were enabled early
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13364k/13512k available (2280k kernel code, 148k reserved, 352k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs May 28 2007 13:39:54 Installing. 
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 1) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 2) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x200000 at 0x1fc00000
block2mtd: version $Revision: 1.30 $
RB1xx nand
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
RB1xxx nand device not found
nf_conntrack version 0.5.0 (105 buckets, 840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Cannot open root device "<NULL>" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Obviously, the code in gen_probe.c is needed to actually make the MTD device work, but I'm not completely sure what it does.
Can somebody help me with some hints?

Thanks, Florian

Have you already tried this patch?
https://dev.openwrt.org/ticket/1768
I haven't yet had time to try it out, but maybe it's just what we need.

Flo

Update: this patch has already been merged into SVN. I've been trying to build a new image for the EASY5120 profile, however, this has failed so far.

First, the patch target//linux/adm5120-2.6/patches/140_cmdline-hack.patch is broken,
but this was easy to fix.

Problem two:

/home/echtler/openwrt/kamikaze/staging_dir_mipsel/bin/mkmylofw -B WPP54AG -p0x20000:0x10000:ahp:0x80001000 -p0x30000:0 -b0x20000:0x10000:h:/home/echtler/openwrt/kamikaze/build_mipsel/linux-2.6-adm5120/loader-generic.gz -b0x30000:0::/home/echtler/openwrt/kamikaze/bin/openwrt-adm5120-2.6-squashfs-wpp54ag.trx /home/echtler/openwrt/kamikaze/bin/openwrt-adm5120-2.6-squashfs-wpp54ag.bin
cp -fpR /home/echtler/openwrt/kamikaze/bin/openwrt-adm5120-2.6-squashfs-noloader.trx /home/echtler/openwrt/kamikaze/bin/openwrt-adm5120-2.6-squashfs-EASY5120.trx
dd if=/home/echtler/openwrt/kamikaze/build_mipsel/linux-2.6-adm5120/loader-edimax.gz of=/home/echtler/openwrt/kamikaze/bin/openwrt-adm5120-2.6-squashfs-EASY5120.bin
dd: opening `/home/echtler/openwrt/kamikaze/build_mipsel/linux-2.6-adm5120/loader-edimax.gz': No such file or directory
make[3]: *** [install] Error 1
make[3]: Leaving directory `/home/echtler/openwrt/kamikaze/target/linux/adm5120-2.6/image'
make[2]: *** [image_install] Error 2
make[2]: Leaving directory `/home/echtler/openwrt/kamikaze/target'
make[1]: *** [target/install] Error 2
make[1]: Leaving directory `/home/echtler/openwrt/kamikaze'
make: *** [world] Error 2

I haven't been able to figure out where that loader-edimax.gz is supposed to come from.
Any hints?

Florian

Here's what happens if you
a) take the newest svn source
b) remove the block at line 131 of build_mipsel/linux/drivers/mtd/chips/gen_probe.c
c) use make kernel_menuconfig to set MTD_DEBUG to 2
d) flash the resulting openwrt-adm5120-2.6-squashfs-br-6104k.bin

Linux version 2.6.21.1 (echtler@butterbrot) (gcc version 4.1.2) #6 Thu Jun 7 11:55:23 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d30000 @ 002d0000 (usable)
Wasting 23040 bytes for tracking 720 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 87.500 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13356k/13504k available (2287k kernel code, 148k reserved, 353k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs Jun  7 2007 11:42:57 Installing. 
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 9) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 10) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x200000 at 0x1fc00000
adm5120 : using CFE flash mapping
bootloader size: 196608
Updating TRX offsets and length:
old trx = [0x0000001c, 0x000cf400, 0x00000000], len=0x00147000 crc32=0x4cab0bc3
new trx = [0x0000001c, 0x000cf400, 0x00000000], len=0x000cf400 crc32=0x94e129cc
Done
Creating 4 MTD partitions on "adm5120 physically mapped flash":
0x00000000-0x00030000 : "cfe"
mtd: Giving out device 0 to cfe
0x00030000-0x001f0000 : "linux"
mtd: Giving out device 1 to linux
0x000ff400-0x001f0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
mtd: Giving out device 2 to rootfs
0x00180000-0x001f0000 : "rootfs_data"
mtd: Giving out device 3 to rootfs_data
0x001f0000-0x00200000 : "nvram"
mtd: Giving out device 4 to nvram
block2mtd: version $Revision: 1.30 $
RB1xx nand
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
RB1xxx nand device not found
nf_conntrack version 0.5.0 (105 buckets, 840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
mtdblock_open
ok
mtdblock: read on "rootfs" at 0x0, size 0x200
mtdblock: read on "rootfs" at 0x200, size 0x200
mtdblock: read on "rootfs" at 0x77800, size 0x200
mtdblock: read on "rootfs" at 0x77a00, size 0x200
mtdblock: read on "rootfs" at 0x76800, size 0x200
mtdblock: read on "rootfs" at 0x76a00, size 0x200
mtdblock: read on "rootfs" at 0x76c00, size 0x200
mtdblock: read on "rootfs" at 0x76e00, size 0x200
mtdblock: read on "rootfs" at 0x77000, size 0x200
mtdblock: read on "rootfs" at 0x77200, size 0x200
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 124k freed
mtdblock: read on "rootfs" at 0x77400, size 0x200
mtdblock: read on "rootfs" at 0x77600, size 0x200
Warning: unable to open an initial console.
mtdblock: read on "rootfs" at 0x3f800, size 0x200
mtdblock: read on "rootfs" at 0x3fa00, size 0x200
mtdblock: read on "rootfs" at 0x3fc00, size 0x200
mtdblock: read on "rootfs" at 0x3fe00, size 0x200
mtdblock: read on "rootfs" at 0x40000, size 0x200
mtdblock: read on "rootfs" at 0x40200, size 0x200
mtdblock: read on "rootfs" at 0x40400, size 0x200
mtdblock: read on "rootfs" at 0x40600, size 0x200
mtdblock: read on "rootfs" at 0x40800, size 0x200
mtdblock: read on "rootfs" at 0x40a00, size 0x200
mtdblock: read on "rootfs" at 0x40c00, size 0x200
mtdblock: read on "rootfs" at 0x40e00, size 0x200
mtdblock: read on "rootfs" at 0x41000, size 0x200
mtdblock: read on "rootfs" at 0x41200, size 0x200
mtdblock: read on "rootfs" at 0x41400, size 0x200
mtdblock: read on "rootfs" at 0x41600, size 0x200
mtdblock: read on "rootfs" at 0x41800, size 0x200
mtdblock: read on "rootfs" at 0x41a00, size 0x200
mtdblock: read on "rootfs" at 0x41c00, size 0x200
mtdblock: read on "rootfs" at 0x41e00, size 0x200
mtdblock: read on "rootfs" at 0x42000, size 0x200
mtdblock: read on "rootfs" at 0x42200, size 0x200
mtdblock: read on "rootfs" at 0x42400, size 0x200
mtdblock: read on "rootfs" at 0x42600, size 0x200
mtdblock: read on "rootfs" at 0x42800, size 0x200
mtdblock: read on "rootfs" at 0x42a00, size 0x200
mtdblock: read on "rootfs" at 0x42c00, size 0x200
mtdblock: read on "rootfs" at 0x42e00, size 0x200
mtdblock: read on "rootfs" at 0x43000, size 0x200
mtdblock: read on "rootfs" at 0x43200, size 0x200
mtdblock: read on "rootfs" at 0x400, size 0x200
mtdblock: read on "rootfs" at 0x600, size 0x200
mtdblock: read on "rootfs" at 0x800, size 0x200
mtdblock: read on "rootfs" at 0xa00, size 0x200
mtdblock: read on "rootfs" at 0xc00, size 0x200
mtdblock: read on "rootfs" at 0xe00, size 0x200
mtdblock: read on "rootfs" at 0x1000, size 0x200
mtdblock: read on "rootfs" at 0x1200, size 0x200
mtdblock: read on "rootfs" at 0x1400, size 0x200
mtdblock: read on "rootfs" at 0x1600, size 0x200
mtdblock: read on "rootfs" at 0x1800, size 0x200
mtdblock: read on "rootfs" at 0x1a00, size 0x200
mtdblock: read on "rootfs" at 0x1c00, size 0x200
mtdblock: read on "rootfs" at 0x1e00, size 0x200
mtdblock: read on "rootfs" at 0x2000, size 0x200
mtdblock: read on "rootfs" at 0x2200, size 0x200
mtdblock: read on "rootfs" at 0x2400, size 0x200
mtdblock: read on "rootfs" at 0x2600, size 0x200
mtdblock: read on "rootfs" at 0x2800, size 0x200
mtdblock: read on "rootfs" at 0x2a00, size 0x200
mtdblock: read on "rootfs" at 0x2c00, size 0x200
mtdblock: read on "rootfs" at 0x2e00, size 0x200
mtdblock: read on "rootfs" at 0x3000, size 0x200
mtdblock: read on "rootfs" at 0x3200, size 0x200
mtdblock: read on "rootfs" at 0x3400, size 0x200
mtdblock: read on "rootfs" at 0x3600, size 0x200
mtdblock: read on "rootfs" at 0x3800, size 0x200
mtdblock: read on "rootfs" at 0x3a00, size 0x200
mtdblock: read on "rootfs" at 0x3c00, size 0x200
mtdblock: read on "rootfs" at 0x3e00, size 0x200
mtdblock: read on "rootfs" at 0x4000, size 0x200
mtdblock: read on "rootfs" at 0x4200, size 0x200
mtdblock: read on "rootfs" at 0x4400, size 0x200
mtdblock: read on "rootfs" at 0x4600, size 0x200
mtdblock: read on "rootfs" at 0x4800, size 0x200
mtdblock: read on "rootfs" at 0x4a00, size 0x200
mtdblock: read on "rootfs" at 0x4c00, size 0x200
mtdblock: read on "rootfs" at 0x4e00, size 0x200
mtdblock: read on "rootfs" at 0x5000, size 0x200
mtdblock: read on "rootfs" at 0x5200, size 0x200
mtdblock: read on "rootfs" at 0x5400, size 0x200
mtdblock: read on "rootfs" at 0x5600, size 0x200
mtdblock: read on "rootfs" at 0x5800, size 0x200
mtdblock: read on "rootfs" at 0x5a00, size 0x200
mtdblock: read on "rootfs" at 0x5c00, size 0x200
mtdblock: read on "rootfs" at 0x5e00, size 0x200
mtdblock: read on "rootfs" at 0x6000, size 0x200
mtdblock: read on "rootfs" at 0x6200, size 0x200
mtdblock: read on "rootfs" at 0x43400, size 0x200
mtdblock: read on "rootfs" at 0x43600, size 0x200
mtdblock: read on "rootfs" at 0x43800, size 0x200
mtdblock: read on "rootfs" at 0x43a00, size 0x200
mtdblock: read on "rootfs" at 0x43c00, size 0x200
mtdblock: read on "rootfs" at 0x43e00, size 0x200
mtdblock: read on "rootfs" at 0x44000, size 0x200
mtdblock: read on "rootfs" at 0x44200, size 0x200
mtdblock: read on "rootfs" at 0x44400, size 0x200
mtdblock: read on "rootfs" at 0x44600, size 0x200
mtdblock: read on "rootfs" at 0x44800, size 0x200
mtdblock: read on "rootfs" at 0x44a00, size 0x200
mtdblock: read on "rootfs" at 0x44c00, size 0x200
mtdblock: read on "rootfs" at 0x44e00, size 0x200
mtdblock: read on "rootfs" at 0x45000, size 0x200
mtdblock: read on "rootfs" at 0x45200, size 0x200
mtdblock: read on "rootfs" at 0x45400, size 0x200
mtdblock: read on "rootfs" at 0x45600, size 0x200
mtdblock: read on "rootfs" at 0x45800, size 0x200
mtdblock: read on "rootfs" at 0x45a00, size 0x200
mtdblock: read on "rootfs" at 0x45c00, size 0x200
mtdblock: read on "rootfs" at 0x45e00, size 0x200
mtdblock: read on "rootfs" at 0x46000, size 0x200
mtdblock: read on "rootfs" at 0x46200, size 0x200
mtdblock: read on "rootfs" at 0x46400, size 0x200
mtdblock: read on "rootfs" at 0x46600, size 0x200
mtdblock: read on "rootfs" at 0x46800, size 0x200
mtdblock: read on "rootfs" at 0x46a00, size 0x200
mtdblock: read on "rootfs" at 0x46c00, size 0x200
mtdblock: read on "rootfs" at 0x46e00, size 0x200
mtdblock: read on "rootfs" at 0x47000, size 0x200
mtdblock: read on "rootfs" at 0x47200, size 0x200
mtdblock: read on "rootfs" at 0x47400, size 0x200
mtdblock: read on "rootfs" at 0x47600, size 0x200
mtdblock: read on "rootfs" at 0x47800, size 0x200
mtdblock: read on "rootfs" at 0x47a00, size 0x200
mtdblock: read on "rootfs" at 0x47c00, size 0x200
mtdblock: read on "rootfs" at 0x47e00, size 0x200
mtdblock: read on "rootfs" at 0x48000, size 0x200
mtdblock: read on "rootfs" at 0x48200, size 0x200
mtdblock: read on "rootfs" at 0x48400, size 0x200
mtdblock: read on "rootfs" at 0x48600, size 0x200
mtdblock: read on "rootfs" at 0x48800, size 0x200
mtdblock: read on "rootfs" at 0x48a00, size 0x200
mtdblock: read on "rootfs" at 0x48c00, size 0x200
mtdblock: read on "rootfs" at 0x48e00, size 0x200
mtdblock: read on "rootfs" at 0x49000, size 0x200
mtdblock: read on "rootfs" at 0x49200, size 0x200
mtdblock: read on "rootfs" at 0x49400, size 0x200
mtdblock: read on "rootfs" at 0x49600, size 0x200
mtdblock: read on "rootfs" at 0x49800, size 0x200
mtdblock: read on "rootfs" at 0x49a00, size 0x200
mtdblock: read on "rootfs" at 0x49c00, size 0x200
mtdblock: read on "rootfs" at 0x49e00, size 0x200
mtdblock: read on "rootfs" at 0x36400, size 0x200
mtdblock: read on "rootfs" at 0x36600, size 0x200
mtdblock: read on "rootfs" at 0x36800, size 0x200
mtdblock: read on "rootfs" at 0x36a00, size 0x200
mtdblock: read on "rootfs" at 0x36c00, size 0x200
mtdblock: read on "rootfs" at 0x36e00, size 0x200
mtdblock: read on "rootfs" at 0x37000, size 0x200
mtdblock: read on "rootfs" at 0x37200, size 0x200
mtdblock: read on "rootfs" at 0x37400, size 0x200
mtdblock: read on "rootfs" at 0x37600, size 0x200
mtdblock: read on "rootfs" at 0x37800, size 0x200
mtdblock: read on "rootfs" at 0x37a00, size 0x200
mtdblock: read on "rootfs" at 0x37c00, size 0x200
mtdblock: read on "rootfs" at 0x37e00, size 0x200
mtdblock: read on "rootfs" at 0x38000, size 0x200
mtdblock: read on "rootfs" at 0x38200, size 0x200
mtdblock: read on "rootfs" at 0x38400, size 0x200
mtdblock: read on "rootfs" at 0x38600, size 0x200
mtdblock: read on "rootfs" at 0x38800, size 0x200
mtdblock: read on "rootfs" at 0x38a00, size 0x200
mtdblock: read on "rootfs" at 0x38c00, size 0x200
mtdblock: read on "rootfs" at 0x38e00, size 0x200
mtdblock: read on "rootfs" at 0x39000, size 0x200
mtdblock: read on "rootfs" at 0x39200, size 0x200
mtdblock: read on "rootfs" at 0x39400, size 0x200
mtdblock: read on "rootfs" at 0x39600, size 0x200
mtdblock: read on "rootfs" at 0x39800, size 0x200
mtdblock: read on "rootfs" at 0x39a00, size 0x200
mtdblock: read on "rootfs" at 0x39c00, size 0x200
mtdblock: read on "rootfs" at 0x39e00, size 0x200
mtdblock: read on "rootfs" at 0x3a000, size 0x200
mtdblock: read on "rootfs" at 0x3a200, size 0x200
mtdblock: read on "rootfs" at 0x3a400, size 0x200
mtdblock: read on "rootfs" at 0x3a600, size 0x200
mtdblock: read on "rootfs" at 0x3a800, size 0x200
mtdblock: read on "rootfs" at 0x3aa00, size 0x200
mtdblock: read on "rootfs" at 0x3ac00, size 0x200
mtdblock: read on "rootfs" at 0x3ae00, size 0x200
mtdblock: read on "rootfs" at 0x3b000, size 0x200
mtdblock: read on "rootfs" at 0x3b200, size 0x200
mtdblock: read on "rootfs" at 0x3b400, size 0x200
mtdblock: read on "rootfs" at 0x3b600, size 0x200
mtdblock: read on "rootfs" at 0x3b800, size 0x200
mtdblock: read on "rootfs" at 0x3ba00, size 0x200
mtdblock: read on "rootfs" at 0x3bc00, size 0x200
mtdblock: read on "rootfs" at 0x3be00, size 0x200
mtdblock: read on "rootfs" at 0x3c000, size 0x200
mtdblock: read on "rootfs" at 0x3c200, size 0x200
mtdblock: read on "rootfs" at 0x3c400, size 0x200
mtdblock: read on "rootfs" at 0x3c600, size 0x200
mtdblock: read on "rootfs" at 0x3c800, size 0x200
mtdblock: read on "rootfs" at 0x3ca00, size 0x200
mtdblock: read on "rootfs" at 0x3cc00, size 0x200
mtdblock: read on "rootfs" at 0x3ce00, size 0x200
mtdblock: read on "rootfs" at 0x3d000, size 0x200
mtdblock: read on "rootfs" at 0x3d200, size 0x200
mtdblock: read on "rootfs" at 0x3d400, size 0x200
mtdblock: read on "rootfs" at 0x3d600, size 0x200
mtdblock: read on "rootfs" at 0x3d800, size 0x200
mtdblock: read on "rootfs" at 0x3da00, size 0x200
mtdblock: read on "rootfs" at 0x3dc00, size 0x200
mtdblock: read on "rootfs" at 0x3de00, size 0x200
mtdblock: read on "rootfs" at 0x3e000, size 0x200
mtdblock: read on "rootfs" at 0x3e200, size 0x200
mtdblock: read on "rootfs" at 0x3e400, size 0x200
mtdblock: read on "rootfs" at 0x3e600, size 0x200
mtdblock: read on "rootfs" at 0x3e800, size 0x200
mtdblock: read on "rootfs" at 0x3ea00, size 0x200
mtdblock: read on "rootfs" at 0x3ec00, size 0x200
mtdblock: read on "rootfs" at 0x3ee00, size 0x200
mtdblock: read on "rootfs" at 0x3f000, size 0x200
mtdblock: read on "rootfs" at 0x3f200, size 0x200
mtdblock: read on "rootfs" at 0x3f400, size 0x200
mtdblock: read on "rootfs" at 0x3f600, size 0x200
Kernel panic - not syncing: Attempted to kill init!

I think we're almost there, it says VFS: Mounted root (squashfs filesystem) readonly.
So now the question is why init crashes..

Florian

floe wrote:

Have you already tried this patch?
https://dev.openwrt.org/ticket/1768
I haven't yet had time to try it out, but maybe it's just what we need.

Flo

This work!

LZMA loader for ADM5120, Copyright (C) 2007 OpenWrt.org
 
Looking for TRX header... found at 0xBFC30000, kernel in partition 0
decompressing kernel... done!
launching kernel...
 
Linux version 2.6.21.1 (root@dozor.pronet) (gcc version 4.1.2) #5 Mon Jun 11 13:28:48 EEST 2007
ADM5120P revision 8, running at 200MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d30000 @ 002d0000 (usable)
Wasting 23040 bytes for tracking 720 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs,yaffs2 init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 100.000 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13356k/13504k available (2286k kernel code, 148k reserved, 354k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs Jun 11 2007 13:28:27 Installing.
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 9) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 10) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00200000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x200000 at 0x1fc00000
adm5120 : using CFE flash mapping
bootloader size: 196608
Creating 4 MTD partitions on "adm5120 physically mapped flash":
0x00000000-0x00030000 : "cfe"
0x00030000-0x001f0000 : "linux"
0x000ff400-0x001f0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x001c0000-0x001f0000 : "rootfs_data"
0x001f0000-0x00200000 : "nvram"
block2mtd: version $Revision: 1.30 $
RB1xx nand
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
RB1xxx nand device not found
nf_conntrack version 0.5.0 (105 buckets, 840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 124k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
switching to jffs2
jffs2: Too few erase blocks (3)
jffs2 not ready yet; using ramdisk
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
- init -
init started:  BusyBox v1.4.2 (2007-06-11 11:06:14 EEST) multi-call binary
 
Please press Enter to activate this console. device eth0 entered promiscuous mode
device eth0 left promiscuous mode
br-lan: port 1(eth0) entering disabled state
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
jffs2: Too few erase blocks (3)
 
 
 
BusyBox v1.4.2 (2007-06-11 11:06:14 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
 
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r7552) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# uname -a
Linux OpenWrt 2.6.21.1 #5 Mon Jun 11 13:28:48 EEST 2007 mips unknown

Got it ;-))))))))) Yeah!!

I'm keen on this Edimax box since this article in c't. I could follow your instructions until the kernel panic. Many thanks for your posts, I would have given up without your hints! But now let's help you. The last steps have been:
- enable in the kernel the "mini fanout overlay system" in filesystems (mini_fo)
- add libgcc (openwrt configuration: Base system)
- add udevtrigger (openwrt configuration: Utilities)

I've temporarily added the devices from http://forum.openwrt.org/viewtopic.php?id=11021 and got some helpfull output from the preinit script. But finally they're not required to boot OpenWrt.

HTH! I happily answer all your questions!

Bernhard

This is totally awesome work! At revision 7576 everything is looking very good, however the USB host controller does not seem to do anything when a device is plugged in.

I think this is because there is no option to chose adm5120 HCD from the top-level "make menuconfig".  It would be nice to enable this so we can experiment with different devices, even if there are many bugs!

Many thanks...

Alright.. It took me a while to get it up and running, but now I have step-by-step instructions for the Edimax devices:

1. Get a fresh checkout of kamikaze (rev. 7671 works).
2. Downgrade memory.c: svn up -r 7630 target/linux/adm5120-2.6/files/arch/mips/adm5120/memory.c
3. Apply the following patch using patch -p0:

--- target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c       2007-06-15 12:15:05.000000000 +0200
+++ target/linux/adm5120-2.6/files/drivers/mtd/maps/adm5120_mtd.c       2007-06-19 09:48:20.000000000 +0200
@@ -433,7 +433,7 @@
 
 #ifdef CONFIG_MTD_PARTITIONS
 
-       if (adm5120_boot_loader == BOOT_LOADER_CFE)
+       if ( (adm5120_boot_loader == BOOT_LOADER_CFE) || (adm5120_boot_loader == BOOT_LOADER_UNKNOWN) ) 
        {
                printk(KERN_NOTICE "adm5120 : using CFE flash mapping\n");
                parts = init_mtd_partitions(adm5120_mtd, size);

4. Run make.
5. Apply the following patch using patch -p0:

--- build_mipsel/linux/drivers/mtd/chips/gen_probe.c    2007-06-19 09:55:46.000000000 +0200
+++ build_mipsel/linux/drivers/mtd/chips/gen_probe.c    2007-06-19 09:08:37.000000000 +0200
@@ -128,9 +128,9 @@
         * chip in read mode.
         */
 
-       for (i = 1; i < max_chips; i++) {
+       /*for (i = 1; i < max_chips; i++) {
                cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi);
-       }
+       }*/
 
        /*
         * Now allocate the space for the structures we need to return to

6. Run make again.
7. Profit!

Unfortunately, I'm quite sure that these patches are probably going to cause a lot of breakage with other devices, so I'd need some help from the true kernel hackers to really integrate this into the main OpenWRT tree.

Florian

P.S. If you have a bit of time, please try this, so I'm sure I didn't forget anything..

Oh, thanks, I'm already running the latest revision on the BR-6104K. There have been no more replies to this thread, therefore I wrongly assumed that there's not much interest in patches. I'm quite new to openwrt and still watching the development process.

DRAM-detection doesn't work any more, and my Macronix chip MX29LV160CB needs another ID:

Index: target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch
===================================================================
--- target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch       (Revision 7674)
+++ target/linux/adm5120-2.6/patches/101-cfi-fixup-macronix-bootloc.patch       (Arbeitskopie)
@@ -40,7 +40,8 @@
 +      /* TODO: put affected chip ids here */
 +      case MX29LV160B:
 +      case MX29LV320B:
-+              if (((major << 8) | minor) != 0x3131)
++              if (((major << 8) | minor) != 0x3130 &&
++                  ((major << 8) | minor) != 0x3131)
 +                      break;
 +
 +              if (extp->TopBottom == 2)

I'm somewhat unhappy about the move from compile-time configuration to runtime detection because of two reasons: it breaks things on edimax and it consumes space on the very tight 2 MB flash. Of course I unterstand that work is in progress and nothing is finished yet. At the moment I can't cleanly enable tweaks for the BR-6104K, because the code doesn't know that it's running on a BR-6104K. There's neither a compile-time configuration nor a runtime detection for this router. I've no idea how to distinguish between a BR-6104K and any other adm5120 board at runtime.
I don't know which way to go, therefore I'm still watching your commits!

Should I publish all my quick&dirty patches & configs required to run openwrt on BR-6104K? Somewhere on openwrt.org or on my webspace?

Why don't you just post your patches here? I would like to look them through in order to see what you have changed. For example, what does the patch in your last post do? Does it probably make my second patch unnecessary?

I noticed that I forgot myself to mention what my patches do:
- downgrading memory.c avoids the system to wrongly detect double memsize (but you could probably also just add "mem=16M" on the kernel command line)
- the first patch enables the four flash partitions to be found, the edimax loader seems to use the same flash layout as CFE
- the second patch avoids a kernel panic when probing for additional flash chips - perhaps your patch also does this.

In general, I'd suggest that we should discuss our patches here and, when we have decided on a complete set, should open a ticket with the merged patches. As for the topic of runtime detection: there is already a patch which I mentioned above for the easy5120 boards, which just adds another profile. I'd say that this is the easiest way. Otherwise, we might try to find the signature of the edimax bootloader at the begin of the flash..

floe wrote:

Why don't you just post your patches here?

Ok, please give me 1 or 2 days ...

floe wrote:

For example, what does the patch in your last post do?

There's a new fixup for the location of the bootblock in Macronix flash chips:
https://dev.openwrt.org/browser/trunk/t … h?rev=7618
The fixup didn't trigger on my MX29LV160CB. I've added the CFI-version of this chip.

floe wrote:

- downgrading memory.c avoids the system to wrongly detect double memsize (but you could probably also just add "mem=16M" on the kernel command line)

Ah, thanks for the hint.

floe wrote:

- the second patch avoids a kernel panic when probing for additional flash chips - perhaps your patch also does this.

I'm not quite sure, if your patch is still in my source. I've to check this later.

floe wrote:

In general, I'd suggest that we should discuss our patches here and, when we have decided on a complete set, should open a ticket with the merged patches. As for the topic of runtime detection: there is already a patch which I mentioned above for the easy5120 boards, which just adds another profile.

Ok, I'll post my patches here. A profile just adds some packages. I don't know how to enable tweaks for the edimax in the source. I'd like to add the BR-6104K to the list of boards in adm5120_info.c!

floe wrote:

Otherwise, we might try to find the signature of the edimax bootloader at the begin of the flash.

No more xmodem :-{] I'm using the tftp-bootloader from midge: http://midge.vlad.org.ua/wiki/bootloader-with-tftp. I'll see if I find some usefull in the boot block.

All adm5120 files for Kamikaze 7.06 are still in development. I know developers to rewrite a big part of code, so we have to wait to have total support for all the devices

Berny wrote:

I'm somewhat unhappy about the move from compile-time configuration to runtime detection because of two reasons: it breaks things on edimax and it consumes space on the very tight 2 MB flash. Of course I unterstand that work is in progress and nothing is finished yet.

I raised a ticket concerning non-working USB on the adm5120, and it was rejected.  The interesting thing was that the developer said the USB host controller would be auto-detected, resulting in compiled-in host controller.  Some of these devices don't use the onboard controller (I have a adm5120 device in front of me now with 4 USB ports on a PCI VIA chip), so why bloat the kernel with this?

With the greatest respect to the openwrt developers (particularly since I've not submitted any code!), auto-detection is nice from a usability point of view, but Openwrt requires quite a high level of knowledge to use in the first place, so I doubt there is anyone who can't read their board model and find out what hardware it has.

I have written a patch which allows the adm5120-hcd driver to compile as a module and load up to the root hub initialization.
Unfortunately, at least on my hardware, the interrupt code still seems to be buggy, as plugging a new device doesn't trigger an interrupt most of the time.
Here's the patch: https://dev.openwrt.org/ticket/1972

I'd be glad if somebody else can give this a try and see what happens on other hardware.

Thanks, Florian

Hello guys. Thank you all for your work. I will handle separately the HCD problem and the 2MB/Flash problem. Could you please post your patches on the trac with the relevant parts you needed to change so that we can plan on merging them to SVN ?

I've put my flash-related patches in this ticket: https://dev.openwrt.org/ticket/2012
The second one is still a rather crude hack. If anybody has a better idea, go ahead..

Florian

Proceeding as described boots linux 2.6.22-rc9 on an Edimax BR6104KP with kernel panic:

ADM5120 Boot:
no sys signature found!!

jump to linux code!!


LZMA loader for BR-6104KP, Copyright (C) 2007 OpenWrt.org

Looking for TRX header... found at 0xBFC30000, kernel in partition 0
decompressing kernel... done!
launching kernel...

mem_detect: disable buffers for both banks
mem_detect: checking for 16MB chip in 1st bank
mem_detect: chip size in 1st bank is 16MB
mem_detect: check presence of 2nd bank
mem_detect: write 0x55555555 to 0xA1FFFFFC
mem_detect: delay 10000 ns
mem_detect: pattern at 0xA1FFFFFC is 0x02003021
mem_detect: enable buffers for both banks
mem_detect: 1x16MB memory found
Linux version 2.6.22-rc6 (jahns@pcm1035) (gcc version 4.1.2) #2 Tue Jul 3 11:14:08 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
Memory size   : 16MB
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d3e000 @ 002c2000 (usable)
Wasting 22592 bytes for tracking 706 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 87.500 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13412k/13560k available (2235k kernel code, 148k reserved, 340k data, 132k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  ?© 2001-2006 Red Hat, Inc.
yaffs Jul  3 2007 09:52:03 Installing.
io scheduler noop registered
io scheduler deadline registered (default)
ttyS0 at I/O 0x12600000 (irq = 9) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 10) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
adm5120 physically mapped flash: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x200000 at 0x1fc00000
adm5120 : using CFE flash mapping
bootloader size: 196608
Creating 4 MTD partitions on "adm5120 physically mapped flash":
0x00000000-0x00030000 : "cfe"
0x00030000-0x001f0000 : "linux"
0x000fc000-0x001f0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x00190000-0x001f0000 : "rootfs_data"
0x001f0000-0x00200000 : "nvram"
$Id: pmc551.h,v 1.6 2005/11/07 11:14:55 gleixner Exp $
Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.
pmc551: not detected
block2mtd: version $Revision: 1.30 $
RB1xx nand
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
RB1xxx nand device not found
GPIO LEDs driver registered
Registered led device: gpio0
Registered led device: gpio1
Registered led device: gpio2
Registered led device: gpio3
gpio-led gpio-led.4: gpio_request failed
gpio-led: probe of gpio-led.4 failed with error -22
gpio-led gpio-led.5: gpio_request failed
gpio-led: probe of gpio-led.5 failed with error -22
gpio-led gpio-led.6: gpio_request failed
gpio-led: probe of gpio-led.6 failed with error -22
gpio-led gpio-led.7: gpio_request failed
gpio-led: probe of gpio-led.7 failed with error -22
Registered led device: port0led0
Registered led device: port0led1
Registered led device: port0led2
Registered led device: port1led0
Registered led device: port1led1
Registered led device: port1led2
Registered led device: port2led0
Registered led device: port2led1
Registered led device: port2led2
Registered led device: port3led0
Registered led device: port3led1
Registered led device: port3led2
Registered led device: port4led0
Registered led device: port4led1
Registered led device: port4led2
nf_conntrack version 0.5.0 (105 buckets, 840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
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>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 132k freed
Warning: unable to open an initial console.
Kernel panic - not syncing: Attempted to kill init!

What it is necessary to open an initial console? Any help is much appreciated.

Hm.. I'm not quite sure about this bug, but I suspect it's not the console, but the root fs instead - the message "VFS: Mounted root (squashfs filesystem) readonly." is probably misleading. I have noticed that your kernel command line doesn't contain the following: "rootfs=jffs2,squashfs,yaffs2" - perhaps you can give that a try and add yaffs2.

Florian

Volker, your kernel looks good and you're very close. The kernel panic just tells you that init (in our case: preinit) exited, which must not happen.

yaffs2 is not necessary in the command line, the root file system is squashfs, so "rootfs=squashfs" would be sufficient.

The message "Warning: unable to open an initial console." is normal. When init (= busybox) starts there's not a single device in /dev. I was stuck at the same point and added some devices to the image (see my posting above). This way I caught some valuable error messages (missing libraries). I don't know exactly, which device(s) are important, just try with console, tty0, ttyS0, stdin, stdout, null, zero, ...

Make sure that all tools used in the scripts "preinit" and "init" are in the image, including the libraries! If preinit makes it's way down to the start of "udevtrigger" then you'll see the "- preinit -" message.

I also played too much with the configuration, here is what I missed:
- libgcc (openwrt configuration: Base system)
- udevtrigger (openwrt configuration: Utilities)
- special mount-utilities

Good luck,
Bernhard