viernes, 8 de junio de 2012

Versión ASL-26555_CL

Existe una versión de este router distribuida en Chile y otros países de América que difiere del ASL-26555_ES distribuido en España y que emplea un chip flash SPI 25FL064P de 8 MB (0x0800000) en vez del 25FL128P de 16 MB (0x1000000):

El particionado es diferente de modo que el firmware es específico:

[ 4.620000] Creating 8 MTD partitions on "spi0.0":
[ 4.630000] 0x000000000000-0x000000030000 : "uboot"
[ 4.640000] 0x000000030000-0x000000040000 : "devdata"
[ 4.660000] 0x000000040000-0x000000050000 : "rgbd"
[ 4.670000] 0x000000050000-0x000000130000 : "kernel"
[ 4.680000] 0x000000130000-0x0000007e0000 : "rootfs"
[ 4.700000] mtd: partition "rootfs" set to be root filesystem
[ 4.710000] split_squashfs: no squashfs found in "spi0.0"
[ 4.720000] 0x0000007e0000-0x0000007f0000 : "cert"
[ 4.730000] 0x0000007f0000-0x000000800000 : "langpack"
[ 4.750000] 0x000000050000-0x0000007e0000 : "linux"



 Pongo aquí los enlaces del firmware de ramdisk y flasheo adaptados:

Firmware ramdisk ASL 26556_C

Sysupgrade squashfs ASL 26556_C para flashear

(actualizados con extracción de eeprom y MAC de Wifi correcta)

El firmware se escribirá en la partición linux (tamaño 0x790000) una vez que hayamos arrancando con el firmware ramdisk mediante TFTP como explico para el ASL26555_ES con:


mtd -r write <nombre fichero> linux

Sacaremos copia antes de la partición linux desde el firmware RAM a un pendrive formateado en VFAT o EXT3/4 (montado en /mnt/sda1) mirando en /proc/mtd la partición asociada según:

dd if=/dev/mtdX of=/mnt/sda1/copia_linux.bin


lunes, 4 de junio de 2012

Arrancando OpenWrt en ADB D.BG A4001N

Por fin arranca pero por ahora no fucionan el WIFI ni el puerto USB...


[    0.000000] Linux version 3.3.7 (chisco@chisco-aluminio) (gcc version 4.6.3 20120201 (prerelease) (Li2
[    0.000000] Detected Broadcom 0x6328 CPU revision 10b0
[    0.000000] CPU frequency is 320 MHz
[    0.000000] 32MB of RAM installed
[    0.000000] registering 32 GPIOs
[    0.000000] gpiochip_add: registered GPIOs 0 to 31 on device: bcm63xx-gpio
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: unknown
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0002a075 (Broadcom BMIPS4350)
[    0.000000] board_bcm963xx: board name: 963281T_TEF
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 8029d730, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] Reserving 0MB of memory at 0MB for crashkernel
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Memory: 29416k/32768k available (2219k kernel code, 3352k reserved, 396k data, 196k init,)
[    0.000000] NR_IRQS:128
[    0.000000] Calibrating delay loop... 318.46 BogoMIPS (lpj=636928)
[    0.036000] pid_max: default: 32768 minimum: 301
[    0.040000] Mount-cache hash table entries: 512
[    0.048000] NET: Registered protocol family 16
[    0.276000] registering PCI controller with io_map_base unset
[    0.284000] bio: create slab <bio-0> at 0
[    0.292000] PCI host bridge to bus 0000:00
[    0.296000] pci_bus 0000:00: root bus resource [mem 0x10f00000-0x11efffff]
[    0.300000] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.304000] pci 0000:00:00.0: [14e4:6328] type 1 class 0x000604
[    0.304000] pci 0000:00:00.0: PME# supported from D0 D3hot
[    0.304000] pci 0000:01:00.0: [14e4:a8d8] type 0 class 0x000280
[    0.304000] pci 0000:01:00.0: reg 10: [mem 0x00000000-0x00003fff 64bit]
[    0.304000] pci 0000:01:00.0: supports D1 D2
[    0.304000] pci 0000:00:00.0: BAR 8: assigned [mem 0x10f00000-0x10ffffff]
[    0.308000] pci 0000:01:00.0: BAR 0: assigned [mem 0x10f00000-0x10f03fff 64bit]
[    0.312000] pci 0000:00:00.0: PCI bridge to [bus 01-01]
[    0.316000] pci 0000:00:00.0:   bridge window [mem 0x10f00000-0x10ffffff]
[    0.320000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[    0.324000] Switching to clocksource MIPS
[    0.332000] NET: Registered protocol family 2
[    0.336000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.344000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.352000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.360000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.364000] TCP reno registered
[    0.368000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.376000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.384000] NET: Registered protocol family 1
[    0.388000] PCI: CLS 0 bytes, default 16
[    0.388000] audit: initializing netlink socket (disabled)
[    0.396000] type=2000 audit(0.396:1): initialized
[    0.400000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.408000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat,.
[    0.420000] msgmni has been set to 57
[    0.420000] io scheduler noop registered
[    0.424000] io scheduler deadline registered (default)
[    0.432000] bcm63xx_uart.0: ttyS0 at MMIO 0xb0000100 (irq = 36) is a bcm63xx_uart
[    0.440000] console [ttyS0] enabled, bootconsole disabled
[    0.460000] bcm63xx-hsspi bcm63xx-hsspi.0: registered master spi0
[    0.460000] spi spi0.0: setup mode 0, 8 bits/w, 40000000 Hz max --> 0
[    0.460000] m25p80 spi0.0: found mx25l12805d, expected m25p80
[    0.468000] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.472000] bcm63xxpart: CFE boot tag found with version 6 and board type 963281T_TEF
[    0.480000] bcm63xxpart: Partition 0 is CFE offset 0 and length 10000
[    0.488000] bcm63xxpart: Partition 1 is kernel offset 10100 and length eff00
[    0.492000] bcm63xxpart: Partition 2 is rootfs offset 100000 and length ef0000
[    0.500000] bcm63xxpart: Partition 3 is nvram offset ff0000 and length 10000
[    0.508000] bcm63xxpart: Partition 4 is linux offset 10000 and length fe0000
[    0.516000] bcm63xxpart: Spare partition is offset 2c0004 and length d2fffc
[    0.524000] 5 bcm63xxpart partitions found on MTD device spi0.0
[    0.528000] Creating 5 MTD partitions on "spi0.0":
[    0.532000] 0x000000000000-0x000000010000 : "CFE"
[    0.540000] 0x000000010100-0x000000100000 : "kernel"
[    0.548000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller thy
[    0.564000] 0x000000100000-0x000000ff0000 : "rootfs"
[    0.572000] mtd: partition "rootfs" set to be root filesystem
[    0.576000] mtd: partition "rootfs_data" created automatically, ofs=2C0000, len=D30000
[    0.584000] 0x0000002c0000-0x000000ff0000 : "rootfs_data"
[    0.592000] 0x000000ff0000-0x000001000000 : "nvram"
[    0.600000] 0x000000010000-0x000000ff0000 : "linux"
[    0.608000] bcm63xx-hsspi bcm63xx-hsspi.0: registered child spi0.0
[    0.644000] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.652000] Registered led device: 963281T_TEF::internet
[    0.652000] Registered led device: 963281T_TEF::power
[    0.652000] Registered led device: 963281T_TEF::internet-fail
[    0.656000] Registered led device: 963281T_TEF::power-fail
[    0.656000] Registered led device: 963281T_TEF::wps
[    0.656000] Registered led device: 963281T_TEF::dsl
[    0.656000] TCP westwood registered
[    0.660000] NET: Registered protocol family 17
[    0.664000] 8021q: 802.1Q VLAN Support v1.8
[    0.680000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.688000] Freeing unused kernel memory: 196k freed
[    3.252000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 4, 100Mbps, full-duplex
[    3.412000] roboswitch: Probing device eth0:
[    3.416000] bcm63xx_enet: could not find a used port with phy_id 0, assuming phy is external
[    3.424000] No Robo switch in managed mode found, phy_id = 0xffffffff
[    3.432000] roboswitch: Probing device eth1: No such device
[    3.440000] roboswitch: Probing device eth2: No such device
[    3.444000] roboswitch: Probing device eth3: No such device
[   10.880000] Compat-wireless backport release: compat-wireless-2012-05-16-3-gde86a47
[   10.888000] Backport based on wireless-testing.git master-2012-05-29
[   10.896000] compat.git: wireless-testing.git
[   10.952000] cfg80211: Calling CRDA to update world regulatory domain
[   10.956000] cfg80211: World regulatory domain updated:
[   10.964000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   10.972000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.980000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.988000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   10.996000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.004000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.468000] SCSI subsystem initialized
[   11.512000] There is already a switch registered on the device 'eth0'
[   11.520000] roboswitch: Probing device eth1: No such device
[   11.524000] roboswitch: Probing device eth2: No such device
[   11.532000] roboswitch: Probing device eth3: No such device
[   11.836000] usbcore: registered new interface driver usbfs
[   11.840000] usbcore: registered new interface driver hub
[   11.852000] usbcore: registered new device driver usb
[   12.544000] Broadcom 43xx driver loaded [ Features: PNL ]
[   12.572000] Button Hotplug driver version 0.4.1
[   13.376000] PPP generic driver version 2.4.2
[   14.392000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.676000] NET: Registered protocol family 24
[   14.896000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   14.940000] nf_conntrack version 0.5.0 (462 buckets, 1848 max)
[   15.636000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   15.848000] usbcore: registered new interface driver snd-usb-audio
[   15.972000] Initializing USB Mass Storage driver...
[   15.976000] usbcore: registered new interface driver usb-storage
[   15.984000] USB Mass Storage support registered.
[   21.064000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 4, 100Mbps, full-duplex
[   21.076000] device eth0 entered promiscuous mode
[   21.080000] br-lan: port 1(eth0) entered forwarding state
[   21.088000] br-lan: port 1(eth0) entered forwarding state
[   23.092000] br-lan: port 1(eth0) entered forwarding state
[   34.676000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   34.692000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   34.700000] jffs2_build_filesystem(): erasing all blocks after the end marker...

sábado, 2 de junio de 2012

Puerto serie en Homestation ADB D.BG A4001N


En la siguiente imagen vemos como conectar al puerto serie de la consola del router con un conversor TTL-USB y 115200 8N1 sin control de flujo.

Hay que hacer dos puentes marcados en rojo para las líneas TX y RX; podemos utilizar estaño o una resistencia smd de pequeño valor.

Podemos acceder al CFE pulsando una tecla al arrancar el router.

Luego con un navegador podemos apuntar a la dirección 192.168.1.1 para actualizar el firmware...


HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN




CFE version 1.0.37-106.24 for A4001N TEF 0002 BCM96328 (32bit,SP,BE)
Build Date: Wed Jan 26 12:59:25 CET 2011 (zu1costast@thorold)
Copyright (C) 2000-2009 Broadcom Corporation.


HS Serial flash device: name MX25L128, id 0xc218 size 16384KB
Total Flash size: 16384K with 4096 sectors
Chip ID: BCM6328B0, MIPS: 320MHz, DDR: 320MHz, Bus: 160MHz
Main Thread: TP0
Memory Test Passed
Total Memory: 33554432 bytes (32MB)
Boot Address: 0xb8000000


Board IP address                  : 192.168.1.1:ffffff00  
Host IP address                   : 192.168.1.10  
Gateway IP address                :   
Run from flash/host (f/h)         : f  
Default host run file name        : vmlinuz  
Default host flash file name      : bcm963xx_fs_kernel  
Boot delay (0-9 seconds)          : 9  
Boot image (0=latest, 1=previous) : 0  
Board Id (0-4)                    : 963281T_TEF  
Number of MAC Addresses (1-32)    : 11  
Base MAC Address                  : 30:39:f2:87:8f:41  
PSI Size (1-64) KBytes            : 24  
Enable Backup PSI [0|1]           : 1  
System Log Size (0-256) KBytes    : 0  
Main Thread Number [0|1]          : 0  
Voice Board Configuration (0-11)  :   


*** Press any key to stop auto run (9 seconds) ***
Auto run second count down: 9
web info: Waiting for connection on socket 0.
CFE> 




OpenWrt en Homestation ADB P.DG A4001N

Por fin hay soporte para bcm6328 en OpenWrt... la cosa promete y ya el kernel inicialmente arranca y detecta el micro correctamente (aunque falta adaptar OpenWrt a este modelo)..



Booting from latest image (0xb8010000) ...
Code Address: 0x80010000, Entry Address: 0x80010000
LZMA: Prossible old LZMA format, trying to decompress..
Decompression OK!
Entry at 0x80010000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
3 buffers found.
Closing DMA Channels.
Starting program at 0x80010000
[    0.000000] Linux version 3.3.7 (chisco@chisco-aluminio) (gcc version 4.6.3 20120201 (prer2
[    0.000000] Detected Broadcom 0x6328 CPU revision 10b0
[    0.000000] CPU frequency is 320 MHz
[    0.000000] 32MB of RAM installed
[    0.000000] registering 32 GPIOs
[    0.000000] gpiochip_add: registered GPIOs 0 to 31 on device: bcm63xx-gpio
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: unknown
[    0.000000] board_bcm963xx: unknown bcm963xx board: 963281T_TEF
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0002a075 (Broadcom BMIPS4350)
[    0.000000] Kernel panic - not syncing: unable to detect bcm963xx board


gracias al comando led scan todos los leds han quedado identificados...

ADSL GREEN on gpio ..............  03 
ADSL RED  on gpio     ...........  05 
Wireless GREEN on gpio ..........  09 
Wireless RED led on gpio ........  10 
Remote Service GREEN on gpio ....  06 
Remote Service RED led on gpio ..  07 
ETH GREEN on gpio ...............  31 
ETH Fail RED on gpio ............  20 
Wan data GREEN on gpio ..........  11 
Wan data RED on gpio ............  02 
Power ON GREEN on gpio  .........  04 
STOP CFE RED on gpio  ...........  08 
VOIP1 led on gpio ................ 06 


mañana más...


PD: siempre podremos volver al fw orignal que viene con el software de telefónica