Equipos y materiales > Openwrt & LEDE
[Desarrollo] OpenWrt en Huawei HG622
(1/32) > >>
gmtii:
Buenas,

Algo del router: http://wiki.openwrt.org/toh/huawei/hg622

El GIT de Pteridium tiene los parches aplicados para crear el firmware:

https://github.com/Pteridium/openwrt/tree/bcm63xx-r36529

Todo funcional a falta del problema de renombrado de ficheros con kernel SMP.

FLASHEO VIA TFTP:

Suponiendo que usamos ubuntu/debian:

- para flashear montamos un servidor tftp, como por ejemplo el tftpd-hpa (apt-get install tftpd-hpa)

- editamos el ficher /etc/default/tftpd-hpa, poniendo la ruta donde iran los firmwares en TFTP_DIRECTORY (por ejemplo /home/mi_usuario/tftp):

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/mi_usuario/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

- reiniciamos el servicio: sudo service tftpd-hpa restart

- arrancamos el router y pulsamos una tecla desde la consola serial para acceder a la línea de comandos del CFE antes de 3 segundos

- configuramos la IP de tu PC como 192.168.1.100

- el firmware debe llamarse bcm963xx_fs_kernel y estar el directorio de servidor tftpd.

- con el comando f en la línea de comandos del CFE se iniciará el proceso de flasheo.


COPIA DE SEGURIDAD DE DATOS DE CALIBRACIÓN EN PARTICIÓN CAL_DATA

Una vez instalado es importante hacer una copia de nuestro cal_data por si las moscas.

Si la partición es mtd4 por ejemplo haremos un:

cd /tmp
dd if=/dev/mtd4 of=cal_data.bin

y lo guardamos en el pc vía scp o similar.

Empleando URJTAG y un cable clon del usbblaster por ejemplo, sería algo como:

cable usbblaster
endian big
detect
register BR 1
register DIR 32
register EJIMPCODE 32
register EJADDRESS 32
register EJDATA 32
register EJCONTROL 32
register EJALL 96
instruction length 5
instruction BYPASS 11111 BR
instruction IDCODE 00001 DIR
instruction EJTAG_IMPCODE 00011 EJIMPCODE
instruction EJTAG_ADDRESS 01000 EJADDRESS
instruction EJTAG_DATA 01001 EJDATA
instruction EJTAG_CONTROL 01010 EJCONTROL
instruction EJTAG_ALL 01011 EJALL
instruction IDCODE
shift ir
shift dr
dr
initbus ejtag
readmem 0x38FA0000 0x200 RT2X00_HG622.bin




Saludos.
Pteridium:

--- Cita de: gmtii en 13-08-2013, 13:29 (Martes) ---
El CFE hace cosas raras como no dejar modificar las ip, tiempo de espera y demás... he metido con jtag el equivalente del modelo chino y permite modificar pero no acaba de ir fino...
--- Fin de la cita ---
No esperes mucho de huawei, ya sabes los dolores de cabeza que le dio a Noltari el HG556.


--- Cita de: gmtii en 13-08-2013, 13:29 (Martes) ---Necesitaría ayuda de alguien que tenga el router para verificar el offset exacto de los datos de calibración del wifi. Creo que es el 0xee0000, comienzo de la partición /dev/mtd4 cal_data ...


[    0.328000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x00227e
[    0.340000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.344000]   Amd/Fujitsu Extended Query version 1.3.
[    0.352000] number of CFI chips: 1
[    0.356000] bcm63xxpart: CFE boot tag found with version 6 and board type 96368MVWG_hg622
[    0.364000] bcm63xxpart: Partition 0 is CFE offset 0 and length 20000
[    0.368000] bcm63xxpart: Partition 1 is kernel offset 20100 and length 10ff00
[    0.376000] bcm63xxpart: Partition 2 is rootfs offset 130000 and length db0000
[    0.384000] bcm63xxpart: Partition 3 is cal_data offset ee0000 and length 20000
[    0.392000] bcm63xxpart: Partition 4 is nvram offset fe0000 and length 20000
[    0.400000] bcm63xxpart: Partition 5 is linux offset 20000 and length ec0000
[    0.408000] bcm63xxpart: Spare partition is offset 330004 and length bafffc
[    0.412000] 6 bcm63xxpart partitions found on MTD device physmap-flash.0
[    0.420000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.428000] 0x000000000000-0x000000020000 : "CFE"
[    0.432000] 0x000000020100-0x000000130000 : "kernel"
[    0.440000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.452000] 0x000000130000-0x000000ee0000 : "rootfs"
[    0.460000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.472000] mtd: partition "rootfs" set to be root filesystem
[    0.480000] mtd: partition "rootfs_data" created automatically, ofs=340000, len=BA0000
[    0.488000] 0x000000340000-0x000000ee0000 : "rootfs_data"
[    0.496000] 0x000000ee0000-0x000000f00000 : "cal_data"
[    0.504000] 0x000000fe0000-0x000001000000 : "nvram"
[    0.508000] 0x000000020000-0x000000ee0000 : "linux"

[   10.028000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'rt2x00.eeprom'.
[   10.048000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3572, rev 0223 detected
[   10.056000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0008 detected


--- Fin de la cita ---
Tampoco te creas que se hayan roto los cuernos pensando en cómo organizar la partición "cal_data", es más, me juego unas birras a que si lleva el mismo chip wifi Ralink que el HG556a la organización será la misma.
Rectifico: Perdón, sí que estos desgraciados hicieron cambios en cal_data según los parches que colgaste.

Cualquier cosa que necesites dentro de lo que pueda no dudes en decirlo, y felicidades por enfrentarte a ese bicho desalmado.  >:(

Un saludo.

P.D.: a ver si esto te vale de algo
http://huaweihg612hacking.wordpress.com/

P.P.D.: este parche está vacío 931-board_96368MVWG_hg622.patch
zorrua:
Hola, estoy interesado en meterle openwrt a este router. Tengo varias preguntas:

1. La wifi admite norma N con openwrt?
2. Como hago la copia con el JTAG?

Tengo este router y lo quiero de AP en mi casa, eso de que tenga USB me gusta.

Saludos.
gmtii:
el problema es que el fw original espera los datos de calibración en 0xFA0000, pero en openwrt, ninguna partición incluye ese direccionamiento... así pues, algo raro tiene este CFE y la autodetección de particiones :-I

[    0.384000] bcm63xxpart: Partition 3 is cal_data offset ee0000 and length 20000
[    0.392000] bcm63xxpart: Partition 4 is nvram offset fe0000 and length 20000

entre el final de la cal_data 0xF00000 y el principio de la nvram 0xFE0000 quedan 0xE0000 , 896 KB en tierra de nadie... y ahí justo están realmente los datos de calibración creo

gracias por el link!
gmtii:
Si tiene N.

Ahora mismo creo que es mejor esperar un poco a tener controlado el tema de particiones para no poner en riesgo los cal_data. Si tienes JTAG, Pteridium ha puesto un link con instrucciones.

El fichero de comandos para le urjtag para extraer los datos de calibración sería algo como:


--- Código: ---cable usbblaster
endian big
detect
register BR 1
register DIR 32
register EJIMPCODE 32
register EJADDRESS 32
register EJDATA 32
register EJCONTROL 32
register EJALL 96
instruction length 5
instruction BYPASS 11111 BR
instruction IDCODE 00001 DIR
instruction EJTAG_IMPCODE 00011 EJIMPCODE
instruction EJTAG_ADDRESS 01000 EJADDRESS
instruction EJTAG_DATA 01001 EJDATA
instruction EJTAG_CONTROL 01010 EJCONTROL
instruction EJTAG_ALL 01011 EJALL
instruction IDCODE
shift ir
shift dr
dr
initbus ejtag
readmem 0x38FA0000 0x200 RT2X00_HG622.bin

--- Fin del código ---

El parámetro de cable va en función de tu JTAG.

Saludos.


--- Cita de: zorrua en 13-08-2013, 14:51 (Martes) ---Hola, estoy interesado en meterle openwrt a este router. Tengo varias preguntas:

1. La wifi admite norma N con openwrt?
2. Como hago la copia con el JTAG?

Tengo este router y lo quiero de AP en mi casa, eso de que tenga USB me gusta.

Saludos.

--- Fin de la cita ---
Navegación
Índice de Mensajes
Página Siguiente

Ir a la versión completa