OpenWrt Forum Archive

Topic: Thomson TG585v7

The content of this topic has been archived between 6 Feb 2018 and 20 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

I got OpenWrt up and running on the device using Netboot. WiFi does not work, not even after applying a modified version of the patch apop suggested. Switch configuration does not work, too. The LEDs are working, except Wireless, which is probably controlled by the Radio / b43.

Concerning WiFi: I can't see any devices under /sys/bus/ssb/devices, shouldn't there be the wireless card?

I edited linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm63xx.c. Put the following patch into target/linux/brcm63xx/patches-2.6.32 as 240-baord_cant-p.patch and rebuild your image.

--- linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c.orig    2010-04-15 21:47:37.540477619 +0200
+++ linux-2.6.32.10/arch/mips/bcm63xx/boards/board_bcm963xx.c    2010-04-15 21:54:59.404452162 +0200
@@ -83,6 +83,48 @@ static struct board_info __initdata boar
     },
 };
 
+static struct board_info __initdata board_cantp = {
+    .name                = "CANT-P",
+    .expected_cpu_id        = 0x6338,
+
+    .has_enet0            = 1,
+
+    .enet0 = {
+        .force_speed_100    = 1,
+        .force_duplex_full    = 1,
+    },
+
+    .leds = {
+        {
+            .name        = "power:red",
+            .gpio        = 0,
+        },
+        {
+            .name        = "power:green",
+            .gpio        = 1,
+            .default_trigger = "default-on"
+        },
+        {
+            .name        = "adsl",
+            .gpio        = 2,
+            .active_low    = 1,
+        },
+        {
+            .name        = "eth",
+            .gpio        = 3,
+            .active_low    = 1,
+        },
+        {
+            .name        = "ppp-fail",
+            .gpio        = 4,
+        },
+        {
+            .name        = "ppp",
+            .gpio        = 5,
+        },
+    },
+};    
+
 static struct board_info __initdata board_96338w = {
     .name                = "96338W",
     .expected_cpu_id        = 0x6338,
@@ -722,6 +764,7 @@ static const struct board_info __initdat
 #ifdef CONFIG_BCM63XX_CPU_6338
     &board_96338gw,
     &board_96338w,
+    &board_cantp,
 #endif
 #ifdef CONFIG_BCM63XX_CPU_6345
     &board_96345gw2,

I'm not sure if I got everything correct, please correct it if there are problems!

EDIT: To answer my question to ali1234: The new CFE can flash OpenWrt and it actually boots from Flash. You need to apply to following patch to generate a firmware image for CANT-P. After the second boot I get loads of jffs2 errors and after the third or fourth boot the image is completely destroyed!
My netboot image can't erase the flash, it fails on random blocks.
Any ideas?

Index: target/linux/brcm63xx/image/Makefile
===================================================================
--- target/linux/brcm63xx/image/Makefile    (revision 20817)
+++ target/linux/brcm63xx/image/Makefile    (working copy)
@@ -169,6 +169,8 @@
     
     # RG100A,DB120 etc.
     $(call Image/Build/RG100A,$(1),96358VW2,6358,0x20000,RG100A_DB120)
+    # CANT-P
+    $(call Image/Build/CFE,$(1),CANT-P,6338,CANT-P)
 
 endef

(Last edited by mauritzius on 16 Apr 2010, 00:54)

For the Thomson ST585v6 the board name is "BANT-W", is almost the same board

For the flash chip I ran into the following problems when trying to write to the chip:

root@OpenWrt:/# mtd erase linux
Unlocking linux ...
Erasing linux ...
Failed to erase block on linux at 0x20000
Failed to erase block on linux at 0x280000
Failed to erase block on linux at 0x330000
root@OpenWrt:/# mtd erase linux
Unlocking linux ...
Erasing linux ...
Failed to erase block on linux at 0x0
Failed to erase block on linux at 0x20000
Failed to erase block on linux at 0x80000
Failed to erase block on linux at 0xc0000
Failed to erase block on linux at 0x100000
Failed to erase block on linux at 0x130000
Failed to erase block on linux at 0x1b0000
Failed to erase block on linux at 0x220000
Failed to erase block on linux at 0x240000
Failed to erase block on linux at 0x270000
Failed to erase block on linux at 0x2b0000
Failed to erase block on linux at 0x310000
Failed to erase block on linux at 0x330000
Failed to erase block on linux at 0x350000
Failed to erase block on linux at 0x3b0000

As you can see it fails on different blocks everytime I issue mtd erase linux. This is the bootlog:

0x80010000/3651344 0x8038b710/138912 Entry at 0x80014310
Closing network.
Starting program at 0x80014310
Linux version 2.6.32.10 (andy@andy-vbox) (gcc version 4.3.3 (GCC) ) #7 Sat Apr 17 23:37:40 CEST 2010
Detected Broadcom 0x6338 CPU revision a2
CPU frequency is 240 MHz
16MB of RAM installed
registering 8 GPIOs
board_bcm963xx: CFE version: 1.0.37-6.5
bootconsole [early0] enabled
CPU revision is: 00029010 (Broadcom BCM6338)
board_bcm963xx: board name: CANT-P
Determined physical RAM map:
 memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00001000
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 12468k/16384k available (2049k kernel code, 3916k reserved, 364k data, 1152k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:128
Calibrating delay loop... 238.59 BogoMIPS (lpj=477184)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
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
NET: Registered protocol family 1
audit: initializing netlink socket (disabled)
type=2000 audit(4.351:1): initialized
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 24
io scheduler noop registered
io scheduler deadline registered (default)
gpiodev: gpio device registered with major 254
gpiodev: gpio platform device registered with access mask FFFFFFFF
bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0300 (irq = 10) is a bcm63xx_uart
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: 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.
bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE boot tag found with version ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ and board type ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
bcm963xx_flash: Partition 1 is rootfs offset 40400000 and length bfff0000
bcm963xx_flash: Partition 2 is nvram offset 3f0000 and length 10000
bcm963xx_flash: Partition 3 is linux offset 10000 and length 3f0000
bcm963xx_flash: Spare partition is 20000 offset and length 3d0000
Creating 4 MTD partitions on "bcm963xx":
0x000000000000-0x000000010000 : "CFE"
0x000040400000-0x0001003f0000 : "rootfs"
mtd: partition "rootfs" is out of reach -- disabled
mtd: partition "rootfs" set to be root filesystem
split_squashfs: error occured while reading from "bcm963xx"
0x0000003f0000-0x000000400000 : "nvram"
0x000000010000-0x000000400000 : "linux"
bcm63xx_wdt started, timer margin: 30 sec
Registered led device: power:red
Registered led device: power:green
Registered led device: adsl
Registered led device: eth
Registered led device: ppp-fail
Registered led device: ppp
TCP westwood registered
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>
Freeing unused kernel memory: 1152k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -

Please press Enter to activate this console.

As you can see, board type and boot tag are wrong and rootfs has completely weird offsets. Can anyone help?

That is weird. It looks like your image is busted and does not specify the flash partitions (they are in the trx not the CFE). I just patch and then flash the 6338W image.

About wireless: The 6338 doesn't seem to have PCI. It looks like the wireless is connected on SDIO over SPI. So the existing driver won't work.

This is how I defined my board:


static struct board_info __initdata board_cant_p = {
    .name                = "CANT-P",
    .expected_cpu_id        = 0x6338,

    .has_enet0            = 1,
    .enet0 = {
        .force_speed_100    = 1,
        .force_duplex_full    = 1,
    },

    .leds = {
        {
            .name        = "stop",
            .gpio        = 0,
            .active_low    = 0,
        },
        {
            .name        = "power",
            .gpio        = 1,
            .active_low    = 0,
            .default_trigger = "default-on",
        },
        {
            .name        = "eth",
            .gpio        = 2,
            .active_low    = 1,
        },
        {
            .name        = "ppp",
            .gpio        = 3,
            .active_low    = 1,
        },
        {
            .name        = "adsl",
            .gpio        = 5,
            .active_low    = 0,
        },
        {
            .name        = "adsl-fail",
            .gpio        = 4,
            .active_low    = 0,
        },
    },
};

It might help if, in CFE, you do an "erase all flash except bootrom" and then reconfigure it and reflash openwrt image.

This is what I get on bootup. It says 6338W cos I use that image file.

bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE boot tag found with version 6 and board type 6338W
bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
bcm963xx_flash: Partition 1 is kernel offset 10100 and length eff00
bcm963xx_flash: Partition 2 is rootfs offset 100000 and length 2f0000
bcm963xx_flash: Partition 3 is nvram offset 3f0000 and length 10000
bcm963xx_flash: Partition 4 is linux offset 10000 and length 3e0000
bcm963xx_flash: Spare partition is 330000 offset and length c0000
Creating 5 MTD partitions on "bcm963xx":
0x000000000000-0x000000010000 : "CFE"
0x000000010100-0x000000100000 : "kernel"
mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
0x000000100000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=330000, len=C0000 
0x000000330000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
0x000000010000-0x0000003f0000 : "linux"

Also, regarding images, you can use them, just don't hotlink them as I might delete them someday.

AFAIK, also the Wii has its WiFi card connected via SDIO, if I'm not mistaken, there is already a working driver for it.

While researching this a bit I found at least one device that runs Linux and has the WiFi connected via SDIO: A Modem/Router Combo from Conitech, an Italian company. However, they don't even offer Firmware upgrades on their site! I found a bootlog at: http://www.dd-wrt.com/phpBB2/viewtopic.php?p=153493

(Last edited by mauritzius on 29 Apr 2010, 11:36)

I don't think there is anything new in that source. The SDHC controller driver seems to be bundled in with the binary-only ADSL driver.

I have a SpeedTouch 580 DSL router and a 585 DSL2+ router, both with a Broadcom CPU. I also have a client manual and update binaries. If you need help, I hope to be welcome to give any.

Im just in the process of wiring the jtag but i have a problem,

im running debian lenny and that doesn't have pylzma thats reqired for ali1234's 'cfe-build.py' script so can someone send me the modified cfe please?

and can you just clarify for me

working -
boot console
boot ethernet

not working -
adsl
wi-fi

i have a 2.6.8.1 kernel and build env for bcm63xx chips but only with binary drivers for 6348.

need to find a 6338 based router using a 2.6.8.1 kernel with binary drivers to match.

then read this http://open-wrt.ru/forum/viewtopic.php?id=11735

should work but we'll be stuck with kernel 2.6.8.1

Right, serial console and ethernet are working, but it is not possible to configure the ethernet switch. LEDs do work too. Mine has still got problems reading/writing from Flash as mentioned above in this thread. I'll look into this further when I'm done with exams.

You can try to install pylzma from source[0] or to use easy_install [1]. I had to prepare a custom package for Arch Linux too before being able to patch the CFE.

Actually I found a few devices based on 6338 and running 2.6.8.1 - but none with an available firmware update.

[0] http://pypi.python.org/pypi/pylzma/
[1] http://www.joachim-bauch.de/projects/pylzma/

(Last edited by mauritzius on 5 Jul 2010, 20:07)

i have found a firmware here http://rapidshare.com/files/69671317/T2H-0Q-001.rar

CFE version 1.0.37-6.5.17 for BCM96338 (32bit,SP,BE)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbfc00000

Initializing Arena.
Initializing Devices.
Parallel flash device: name AM29LV320MB, id 0x2200, size 4096KB
Auto-negotiation timed-out
10 MB Half-Duplex (assumed)
CPU type 0x29010: 240MHz
Total memory: 16777216 bytes (16MB)

Total memory used by CFE:  0x80401000 - 0x805283F0 (1209328)
Initialized Data:          0x8041D7F0 - 0x8041FA50 (8800)
BSS Area:                  0x8041FA50 - 0x804263F0 (27040)
Local Heap:                0x804263F0 - 0x805263F0 (1048576)
Stack Area:                0x805263F0 - 0x805283F0 (8192)
Text (code) segment:       0x80401000 - 0x8041D7E8 (116712)
Boot area (physical):      0x00529000 - 0x00569000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.1.1:ffffff00
Host IP address                   : 192.168.1.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 3
Boot image (0=latest, 1=previous) : 0
Board Id Name                     : CANT-P
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 5
Base MAC Address                  : 00:22:11:22:11:22
Ethernet PHY Type                 : External
Memory size in MB                 : 16
CMT Thread Number                 : 0
Dying Gasp Enable (0:Disable 1:Enable)  : 1

*** Press Enter to stop auto run (3 seconds) ***
Auto run second count down: 0
Booting from latest image (0xbfe00000) ...
Code Address: 0x80010000, Entry Address: 0x8017b018
Decompression OK!
Entry at 0x8017b018
Closing network.
Starting program at 0x8017b018
Linux version 2.6.8.1 (root@localhost.localdomain) (gcc version 3.4.2) #1 Wed Jun 14 22:51:53 CST 2006
Parallel flash device: name AM29LV320MB, id 0x2200, size 4096KB
Total Flash size: 4096K with 71 sectors
***Board id is not set****: Using the default PSI size: 24
CANT-P prom init
CPU revision is: 00029010
Determined physical RAM map:
 memory: 00fa0000 @ 00000000 (usable)
On node 0 totalpages: 4000
  DMA zone: 4000 pages, LIFO batch:1
  Normal zone: 0 pages, LIFO batch:1
  HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: root=31:0 ro noinitrd
brcm mips: enabling icache and dcache...
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB 2-way, linesize 16 bytes.
PID hash table entries: 64 (order 6: 512 bytes)
Using 120.000 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 14160k/16000k available (1262k kernel code, 1820k reserved, 186k data, 68k init, 0k highmem)
Calibrating delay loop... 239.20 BogoMIPS
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for 'wait' instruction...  unavailable.
NET: Registered protocol family 16
Can't analyze prologue code at 8014a134
PPP generic driver version 2.4.2
NET: Registered protocol family 24
Using noop io scheduler
bcm963xx_mtd driver v1.0
brcmboard: brcm_board_init entry
bcm963xx_serial driver v2.0
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 1024)
NET: Registered protocol family 1
NET: Registered protocol family 17
Ebtables v2.0 registered
NET: Registered protocol family 8
NET: Registered protocol family 20
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 68k freed
init started:  BusyBox v1.00 (2006.06.14-14:54+0000) multi-call binary
Algorithmics/MIPS FPU Emulator v1.5


BusyBox v1.00 (2006.06.14-14:54+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.


Loading drivers and kernel modules...

atmapi: module license 'Proprietary' taints kernel.
blaadd: blaa_detect entry
adsl: adsl_init entry
Broadcom BCMPROCFS v1.0 initialized
BCM63xx_ENET board id not set
insmod: cannot insert `/lib/modules/2.6.8.1/extra/bcm_enet.ko': Success (19): Success
Broadcom BCM6338A2 USB Network Device v0.4 Jun 14 2006 22:50:20
usb0: MAC Address: 00 22 11 22 11 22
usb0: Host MAC Address: 00 22 11 22 11 23
BcmAdsl_Initialize=0xC005D228, g_pFnNotifyCallback=0xC0070F84
AdslCoreHwReset: AdslOemDataAddr = 0xA0FFB114
dgasp: kerSysRegisterDyingGaspHandler: dsl0 registered
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.1 (125 buckets, 0 max) - 368 bytes per conntrack
ip_conntrack_pptp version 2.1 loaded
ip_nat_pptp version 2.0 loaded
ip_conntrack_h323: init
ip_nat_h323: initialize the module!
ip_conntrack_rtsp v0.01 loading
ip_nat_rtsp v0.01 loading

==>   Bcm963xx Software Version: 3.04L.01.A2pB021c.d16m   <==

device usb0 entered promiscuous mode
pvc2684d: Interface "nas_1_32" created sucessfully

pvc2684d: Communicating over ATM 0.1.32, encapsulation: LLC

clear port snooping failed: No such device
device nas_1_32 entered promiscuous mode
pvc2684d: Interface "nas_0_35" created sucessfully

pvc2684d: Communicating over ATM 0.0.35, encapsulation: LLC

device nas_0_35 entered promiscuous mode

Note: If you have problem with Backspace key, please make sure you configure your terminal emulator settings. For instance, from HyperTerminal you would need to use File->Properties->Setting->Back Space key.


   Main Menu

1.  ADSL Link State
2.  LAN
3.  WAN
4.  DNS Server
5.  Route Setup
6.  NAT
7.  Firewall
8.  Quality Of Service
9.  Management
10. Passwords
11. OamDiag
12. Reset to Default
13. Save and Reboot
14. Exit
 -> sh


BusyBox v1.00 (2006.06.14-14:54+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

# ifconfig -a
atm0            Link encap:UNSPEC  HWaddr 61-20-00-00-00-20-00-42-00-00-00-00-00-00-00-00
                [NO FLAGS]  MTU:0  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 B)  TX bytes:0 (0.0 B)

br0             Link encap:Ethernet  HWaddr 00:22:11:22:11:22
                BROADCAST ALLMULTI 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:0
                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

cpcs0           Link encap:UNSPEC  HWaddr 24-20-00-00-00-00-00-00-00-00-00-00-00-00-00-00
                [NO FLAGS]  MTU:65535  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 B)  TX bytes:0 (0.0 B)

dsl0            Link encap:UNSPEC  HWaddr 24-20-00-00-00-00-00-00-00-00-00-00-00-00-00-00
                [NO FLAGS]  MTU:0  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 B)  TX bytes:0 (0.0 B)

lo              Link encap:Local Loopback
                inet addr:127.0.0.1  Mask:255.0.0.0
                UP LOOPBACK RUNNING  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 B)  TX bytes:0 (0.0 B)

nas_0_35        Link encap:Ethernet  HWaddr 00:22:11:22:11:25
                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:1000
                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

nas_1_32        Link encap:Ethernet  HWaddr 00:22:11:22:11:24
                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:1000
                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0            Link encap:Ethernet  HWaddr 00:22:11:22:11:22
                BROADCAST 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:1000
                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 /dev/tty
  5 /dev/console
 10 misc
108 ppp
205 atmapi
206 bcrmboard
208 adsl
212 bcm

Block devices:
 31 mtdblock
#

need to extract the drivers from the firmware image.

i dont know exactly if they're working but they look like it. i cant connect to the phone line and my rig at the same time so i cant really test it (too far away from each other).

still no ethernet switch

# insmod /lib/modules/2.6.8.1/extra/bcm_enet.ko
BCM63xx_ENET board id not set
insmod: cannot insert `/lib/modules/2.6.8.1/extra/bcm_enet.ko': Success (19): Success

any thoughts?

according to http://bc.whirlpool.net.au/bc/hardware/ … del_id=563 is using the 5325 switch

(Last edited by routednbooted on 6 Jul 2010, 07:18)

right, got the ethernet working, got dsl working. im posting this over it.

just waiting on someone to point me in the direction of a 6338 router with a 4318 wifi chip.

had to change ali1234's cfe-patch-cant-p.py from

CANT-P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x06\xff\xff\x00\x04\x00\x01\x00\x00

to

96338W\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x06\xff\xff\x00\x04\x00\x01\x00\x00

to get the ethernet driver to

a, load
b, load in the right mode

with DLink_DSL-2540U gpl firmware builder

I might have found a firmware for a 6338 based router including WiFi, however it is only a .img file including CFE like the D-Link one. Does anybody know how to turn it into anything useful?

I dont know how the binary drivers react to kernels they weren't built with but im up for finding out. the firmware image parts can usually be extracted then uncrammed or unsquashed one way or the other.

can you host the image somewhere or pass a link?

and ill see what i can come up with.

Sure, actually I found two of them. One for a product from Dynamode called R-ADSL-C4W-G1. It has the same casing as the Conitech-device mentioned above (the Conitech definitely runs Linux 2.6.8.1 and has its WiFi-part connected via SDIO).

You can find the firmware download at http://www.dynamode-drivers.com it's the second device.

The other firmware I found was for a product called USRouter US104. The company's homepage is gone and the links are all offline. I found one firmware file in a chinese forum: http://www.chinaqos.com/viewthread.php?tid=30310  (you need to register to be able to download the file attached to the first post. The password for the downloaded file is chinadsl.net, took me quite some time to figure that out, thank you Google Translate!).

Both are just suspicions based on the CFE output from the Conitech device, so there may not even be Linux on those devices!

EDIT: I unsquashfs'd them: The chinese one does NOT have wl.ko, while the Dynamode one includes wl.ko! Well, file-listing is working, for now it says: zlib::uncompress failed, unknown error -3

(Last edited by mauritzius on 7 Jul 2010, 23:14)

great, ill have a look at them tomorrow i just put the router all back together and reflashed the thomson-ware back on. i didnt think id be cracking it back open so soon.

that error,

zlib::uncompress failed, unknown error -3

is probably because the rootfs is 'squash-lzma' which is usually the default in these images.

Hello there.
Seems like my D-Link DSL-2640U/BRU/C is something similar to your device - 6338 CPU and 4312 WiFi chips, it can run OpenWrt without dsl and wifi. D-Link site doesnt have GPL firmware for this model, but binary firmware can be downloaded.

How do you get dsl work on OpenWrt? Or I didnt get something?

hi takuto, im using the proprietary binary drivers. the plan is to use a vendors firmware builder then try to port a few openwrt packages to it.

look here for yours ftp://ftp.dlink.ru/pub/ADSL/GPL_source_code/

anyways....

i found a firmware builder with all the support we need

heres the boot log,

CFE version 1.0.37-6.5.17 for BCM96338 (32bit,SP,BE)

Copyright (C) 2000-2005 Broadcom Corporation.



Boot Address 0xbfc00000



Initializing Arena.

Initializing Devices.

Parallel flash device: name AM29LV320MB, id 0x2200, size 4096KB

Auto-negotiation timed-out

10 MB Half-Duplex (assumed)

CPU type 0x29010: 240MHz

Total memory: 16777216 bytes (16MB)



Total memory used by CFE:  0x80401000 - 0x805283F0 (1209328)

Initialized Data:          0x8041D7F0 - 0x8041FA50 (8800)

BSS Area:                  0x8041FA50 - 0x804263F0 (27040)

Local Heap:                0x804263F0 - 0x805263F0 (1048576)

Stack Area:                0x805263F0 - 0x805283F0 (8192)

Text (code) segment:       0x80401000 - 0x8041D7E8 (116712)

Boot area (physical):      0x00529000 - 0x00569000

Relocation Factor:         I:00000000 - D:00000000



Board IP address                  : 192.168.0.1

Host IP address                   : 192.168.0.33

Gateway IP address                :

Run from flash/host (f/h)         : f

Default host run file name        : vmlinux

Default host flash file name      : bcm963xx_fs_kernel

Boot delay (0-9 seconds)          : 3

Board Id Name                     : 96338W

Psi size in KB                    : 24

Number of MAC Addresses (1-32)    : 18

Base MAC Address                  : 00:11:22:33:44:55

Ethernet PHY Type                 : External

Memory size in MB                 : 16

CMT Thread Number                 : 0

Dying Gasp Enable (0:Disable 1:Enable)  : 1



*** Press Enter to stop auto run (3 seconds) ***

Auto run second count down: 0

Code Address: 0x80010000, Entry Address: 0x801bb018

Decompression OK!

Entry at 0x801bb018

Closing network.

Starting program at 0x801bb018

Linux version 2.6.8.1 (person@localhost) (gcc version 3.4.2) #1 Thu Jul 8 10:36:22 BST 2010

Parallel flash device: name AM29LV320MB, id 0x2200, size 4096KB

96338W prom init

CPU revision is: 00029010

Determined physical RAM map:

 memory: 00fa0000 @ 00000000 (usable)

On node 0 totalpages: 4000

  DMA zone: 4000 pages, LIFO batch:1

  Normal zone: 0 pages, LIFO batch:1

  HighMem zone: 0 pages, LIFO batch:1

Built 1 zonelists

Kernel command line: root=31:0 ro noinitrd console=ttyS0,115200

brcm mips: enabling icache and dcache...

Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.

Primary data cache 8kB 2-way, linesize 16 bytes.

PID hash table entries: 64 (order 6: 512 bytes)

Using 120.000 MHz high precision timer.

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory: 13864k/16000k available (1483k kernel code, 2116k reserved, 220k data, 68k init, 0k highmem)

KLOB Pool 1 Initialized: 1048576 bytes <0x80e00000 ... 0x80f00000>

Calibrating delay loop... 239.20 BogoMIPS

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

Checking for 'wait' instruction...  unavailable.

NET: Registered protocol family 16

Total Flash size: 4096K with 71 sectors

File system address: 0xbfc10100

Blk# BlkOff Blks  MemLen Partition Name

   0   1408    1    1024 NVRAM

  69  40960    1   24576 Config 2

  70  32768    1    8192 Scratch PAD

  70  40960    1   24576 Config 1

Can't analyze prologue code at 801817c4

Initializing Cryptographic API

PPP generic driver version 2.4.2

PPP Deflate Compression module registered

PPP BSD Compression module registered

MPPE/MPPC encryption/compression module registered

NET: Registered protocol family 24

Using noop io scheduler

bcm963xx_mtd driver v1.0

brcmboard: brcm_board_init entry

SES: Button Interrupt 0x0 is enabled

SES: LED GPIO 0x8005 is enabled

Serial: BCM63XX driver $Revision: 3.00 $

ttyS0 at MMIO 0xfffe0300 (irq = 10) is a BCM63XX

NET: Registered protocol family 2

IP: routing cache hash table of 512 buckets, 4Kbytes

TCP: Hash tables configured (established 512 bind 1024)

Initializing IPsec netlink socket

NET: Registered protocol family 1

NET: Registered protocol family 17

NET: Registered protocol family 15

Ebtables v2.0 registered

NET: Registered protocol family 8

NET: Registered protocol family 20

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: 68k freed


init started:  BusyBox v1.00 (2010.07.08-09:48+0000) multi-call binary

Algorithmics/MIPS FPU Emulator v1.5





BusyBox v1.00 (2010.07.08-09:48+0000) Built-in shell (msh)

Enter 'help' for a list of built-in commands.





Loading drivers and kernel modules...



atmapi: module license 'Proprietary' taints kernel.

adsl: adsl_init entry

blaadd: blaa_detect entry

Broadcom BCMPROCFS v1.0 initialized

SDIOH mode switch from 1 to 2

available commands: sdio sdioh



---SDIO init SUCCEEDED--- sromless



chipid 0x4024318

bcmsdh_attach, sdioh_attach successful, bcmsdh->sdioh 0x80e58bd0

wl0: wlc_attach: use mac addr from the system pool by id: 0x776c0000

wl0: MAC Address: 00:11:22:33:44:55

wl0: Broadcom BCM4318 802.11 Wireless Controller 3.131.35.6.cpe1.0a.sd-e1

dgasp: kerSysRegisterDyingGaspHandler: wl0 registered

Trying to free free IRQ25

Broadcom BCM6338A2 Ethernet Network Device v0.3 Apr 10 2009 20:28:04

Config Ethernet Switch Through MDIO Pseudo PHY Interface

ethsw: found bcm5325m!

dgasp: kerSysRegisterDyingGaspHandler: eth0 registered

eth0: MAC Address: 00:11:22:33:44:56

BcmAdsl_Initialize=0xC00663E8, g_pFnNotifyCallback=0xC0080FE4

AnnexCParam=0x7FFF7EB8 AnnexAParam=0x00000980 adsl2=0x00000000

pSdramPHY=0xA0FFFFF8, 0x1B77C2 0xDEADBEEF

AdslCoreHwReset:  AdslOemDataAddr = 0xA0FEF96C

AnnexCParam=0x7FFF7EB8 AnnexAParam=0x00000980 adsl2=0x00000000

dgasp: kerSysRegisterDyingGaspHandler: dsl0 registered

ATM proc init !!!



==>   Bcm963xx Software Version: 3.12L.01.A2pB025c1.d20k_rc2   <==



device eth0 entered promiscuous mode

br0: port 1(eth0) entering learning state

br0: topology change detected, propagating

br0: port 1(eth0) entering forwarding state

Unsupported

wlctl: Setting SSID "DLink"

Setting SSID "Guest"

Setting country code using abbreviation: "US"

Unsupported

Unsupported

wlctl: device wl0 entered promiscuous mode

device wl0.1 entered promiscuous mode

br0: port 2(wl0) entering learning state

br0: topology change detected, propagating

br0: port 2(wl0) entering forwarding state

Unsupported

wlctl: br0: port 1(eth0) entering disabled state



CONSOLED launched



Login:

see all the 'Unssuported' messages, im sure theyre from wlctl

# ifconfig -a

atm0            Link encap:UNSPEC  HWaddr 71-40-00-00-00-40-00-42-00-00-00-00-00-00-00-00

                [NO FLAGS]  MTU:0  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 B)  TX bytes:0 (0.0 B)



br0             Link encap:Ethernet  HWaddr 00:11:22:33:44:55

                inet addr:192.168.1.1  Bcast:192.168.1.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:5 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:0

                RX bytes:0 (0.0 B)  TX bytes:300 (300.0 B)



cpcs0           Link encap:UNSPEC  HWaddr 66-80-00-00-00-02-00-00-00-00-00-00-00-00-00-00

                [NO FLAGS]  MTU:65535  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 B)  TX bytes:0 (0.0 B)



dsl0            Link encap:UNSPEC  HWaddr 66-80-00-00-00-02-00-00-00-00-00-00-00-00-00-00

                [NO FLAGS]  MTU:0  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 B)  TX bytes:0 (0.0 B)



eth0            Link encap:Ethernet  HWaddr 00:11:22:33:44:56

                BROADCAST MULTICAST  MTU:1500  Metric:1

                RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:6 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:1000

                RX bytes:0 (0.0 B)  TX bytes:384 (384.0 B)

                Interrupt:23 Base address:0x2500



lo              Link encap:Local Loopback

                inet addr:127.0.0.1  Mask:255.0.0.0

                UP LOOPBACK RUNNING  MTU:16436  Metric:1

                RX packets:38 errors:0 dropped:0 overruns:0 frame:0

                TX packets:38 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:0

                RX bytes:1748 (1.7 KiB)  TX bytes:1748 (1.7 KiB)



pppbr           Link encap:Ethernet  HWaddr 00:00:00:00:00:00

                BROADCAST 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:0

                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



wl0             Link encap:Ethernet  HWaddr 00:11:22:33:44:55

                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                TX packets:1 errors:0 dropped:0 overruns:0 carrier:0

                collisions:0 txqueuelen:1000

                RX bytes:0 (0.0 B)  TX bytes:68 (68.0 B)

                Interrupt:25



wl0.1           Link encap:Ethernet  HWaddr 00:11:22:33:44:55

                BROADCAST 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:1000

                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

However wifi still doesn't seem to be working,

# wl scan

# wl scanresults

if i,

# wl dump

wl0: Nov 20 2007 10:33:28 version 3.131.35.6.cpe1.0a.sd-e1



resets 1

perm_etheraddr 00:11:22:33:44:55 cur_etheraddr 00:11:22:33:44:55

board 0x44b, board rev 2.2

rate_override: A 0, B 0

antdiv_override 0 txant 0



BSS Config 0: "DLink"

enable 1 up 1 wlif 0x00000000 "wl0"

wsec 0x0 auth 0 wsec_index -1 wep_algo 0



BSS Config 1: "Guest"

enable 0 up 0 wlif 0x80eb3e30 "wl0.1"

wsec 0x0 auth 0 wsec_index -1 wep_algo 0

current_bss.BSSID 00:11:22:33:44:55

current_bss.SSID ""

associated 1

means its ready to go, just a misconfiguration somewhere. but where?

Right, having at least Linux on the device is a GREAT improvement over the default firmware.

Anyway, which firmware builder are you using right now?

After exams (final one tomorrow) I'll play around again with the device!

Can anyone shed any light on this,

regardless of which firmware i use i always get

br0: port 1(eth0) entering disabled state

last in the boot sequence.

and,

wifi seems to work, even the wlan led flashes when i send something destined for the wlan, but i dont see any transmission and the router doesn't hear anything. as if the radio is turned off

is it possible thomson have wired a gpio to the wifi chips radio on/off pin?

could it be something similar with the ethernet allways downing after boot?