Hi

I'm using OpenWRT custom kernels to boot Debian from USB (stick/2.5" disk) as described in nice project under http://wpkg.org/Running_Debian_on_ASUS_WL-500G_deluxe
If I'm running Debian with default 16MB of memory (sdram_init=0x000b) everything work perfect.
If I only switch to 32MB (sdram_init=0x0009) lots of segmentation faults and bus errors start to occur.
Those errors causes serious booting problems, generally I can say that only 3 of 10 boots are finished with success.
So sometimes system boots properly without even one error, sometimes it hangs due to segmentation faults.

I've tried compiling many revisions (5375 , 6850, 9442, 10517) but problem still persists.
I've tried original Kamikaze 7.09 with 32MB and I get only one segmentation fault at the end of booting process but there is big improvement - in spite of mentioned one segmentation fault system is in working order.
Old Whiterussian rc6 and original Asus firmware 1.9.7.5 run fine with 32MB.

So I don't understand where the problem is. I'm sure it is something connected with memory, but don't know should I dig into nvram settings or rather kernel.
Other people run Debian with 32MB without similar problems, but I've found their nvram's "hardware_version" value is WL500gp-01-02-00-00.
Mine is hardware_version=WL500gH-01-00-00-00 .Could this be an issue? Do I have some old trash?

If I have to be honest I do not understand why we are using 0x0009 setting to expend our ram to 32MB
Referring to Oleg's site http://wl500g.dyndns.org/sdram.html it looks like this setting enables 64MB. I think this informations are reliable if we take a look what Oleg do with soldering iron (big respect to him)
Maybe I got wrong value of sdram_ncdl , but I was trying it with many settings and of course with recommended 0.

I will be very thankful for any suggestions because I've found the only one person who got similar problem to mine ( http://wl500g.info/showthread.php?t=6339 ) but unfortunately this post is without resolution and I can't contact with author.

Thanks in advance
Tomasz


PS: I'm attaching logs captured via serial console

Fail boot with enabled 32MB and custom kernel built based on OpenWRT r10517

Code:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: ¤T 12¤ë 14 15:54:18 CST 2005 (root@localhost.localdomain)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0
rndis0: Broadcom USB RNDIS Network Adapter (P-t-P)
CPU type 0x29006: 264MHz
Total memory: 33554432 KBytes

Total memory used by CFE:  0x80800000 - 0x8089B590 (636304)
Initialized Data:          0x80831700 - 0x80833DE0 (9952)
BSS Area:                  0x80833DE0 - 0x80835590 (6064)
Local Heap:                0x80835590 - 0x80899590 (409600)
Stack Area:                0x80899590 - 0x8089B590 (8192)
Text (code) segment:       0x80800000 - 0x80831700 (202496)
Boot area (physical):      0x0089C000 - 0x008DC000
Relocation Factor:         I:00000000 - D:00000000

Device eth0:  hwaddr 00-17-31-DC-05-70, ipaddr 192.168.1.1, mask 255.255.255.0
        gateway not set, nameserver not set
Null Rescue Flag.
Loader:raw Filesys:raw Dev:flash0.os File: Options:(null)
Loading: .. 3740 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
Linux version 2.6.23.16 (orlik@testdeb) (gcc version 4.1.2) #2 Sat Feb 23 09:08:55 EST 2008
CPU revision is: 00029006
ssb: Sonics Silicon Backplane found at address 0x18000000
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists in Zone order.  Total pages: 8128
Kernel command line: root=/dev/sda1 rootdelay=10 console=ttyS0,115200
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (21 instructions).
Synthesized TLB load handler fastpath (33 instructions).
Synthesized TLB store handler fastpath (33 instructions).
Synthesized TLB modify handler fastpath (32 instructions).
PID hash table entries: 128 (order: 7, 512 bytes)
Using 132.000 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29628k/32768k available (2237k kernel code, 3140k reserved, 350k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
Registering a PCI bus after boot
PCI: Fixing up bridge 0000:00:00.0
PCI: Fixing up device 0000:00:00.0
PCI: Fixing latency timer of device 0000:00:00.0 to 168
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
detected lzma initramfs
initramfs: LZMA lc=1,lp=2,pb=2,origSize=512
JFFS2 version 2.2. (NAND) �  2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 3) is a 16550A
b44.c:v1.01 (Jun 16, 2006)
eth0: Broadcom 10/100BaseT Ethernet 00:17:31:dc:05:70
eth1: Broadcom 10/100BaseT Ethernet 40:10:18:00:00:2d
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
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: 0x800000 at 0x1fc00000
bootloader size: 262144
Creating 4 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x007f0000 : "linux"
0x00120000-0x007f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "Physically mapped flash"
0x007f0000-0x00800000 : "nvram"
PCI: Enabling device 0000:00:03.2 (0000 -> 0002)
PCI: Fixing up device 0000:00:03.2
ehci_hcd 0000:00:03.2: EHCI Host Controller
ehci_hcd 0000:00:03.2: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:03.2: irq 6, io mem 0x40000000
ehci_hcd 0000:00:03.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 4 ports detected
ohci_hcd ssb0:2: SSB OHCI Controller
ohci_hcd ssb0:2: new USB bus registered, assigned bus number 2
ohci_hcd ssb0:2: irq 6, io mem 0x18003000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
PCI: Enabling device 0000:00:03.0 (0000 -> 0001)
PCI: Fixing up device 0000:00:03.0
uhci_hcd 0000:00:03.0: UHCI Host Controller
uhci_hcd 0000:00:03.0: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:03.0: irq 6, io base 0x00000100
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 1-2: new high speed USB device using ehci_hcd and address 2
PCI: Enabling device 0000:00:03.1 (0000 -> 0001)
PCI: Fixing up device 0000:00:03.1
uhci_hcd 0000:00:03.1: UHCI Host Controller
uhci_hcd 0000:00:03.1: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:03.1: irq 6, io base 0x00000120
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
usb 1-2: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Waiting 10sec before mounting root device...
scsi 0:0:0:0: Direct-Access     TOSHIBA  MK1016GAP        U1.1 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 19640880 512-byte hardware sectors (10056 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 19640880 512-byte hardware sectors (10056 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 124k freed
Algorithmics/MIPS FPU Emulator v1.5
INIT: version 2.86 booting
/etc/init.d/rc: line 77:   153 Bus error               $@
/etc/init.d/rc: line 77:   169 Bus error               $@
/etc/init.d/rc: line 77:   172 Bus error               $@
/etc/rcS.d/S03udev: line 60:   207 Done                    grep '^[^#]' /etc/udev/links.conf
...
...
...
(there are characters limitations to show remaining part of logs, but nothing special here :) )