Seguridad Wireless - Wifi

Equipos y materiales => Puntos de acceso, routers, switchs y bridges => Openwrt & LEDE => Mensaje iniciado por: danitool en 10-08-2017, 22:43 (Jueves)

Título: [MOD] Overclocking en routers BCM6368
Publicado por: danitool en 10-08-2017, 22:43 (Jueves)
Por defecto los routers basados en BCM6368 vienen con la CPU (2 cores) a una frecuencia de 400 MHz. Con este mod subiremos  la frecuencia a 533 MHz, y de esta forma conseguiremos un mejor rendimiento.

El mod se basa en programar la CPU en placa mediante boot straps, que no son más que resistencias (en nuestro caso pulldown), que se colocan en ciertos pines del SoC.

Resistencia pulldown: es una resistencia unida a GND, en nuestro caso se usará un valor de 4700 ohm

El mod es muy sencillo, pero requiere de cierta habilidad soldando en placa ya que los puntos donde debemos soldar, dependiendo del router, serán muy pequeños.

Yo simplemente he probado el overclocking a modo de experimentación, por comprobar que efectivamente funciona, y tratando de encontrar algunas combinaciones de frecuencias.

Pues bien, vamos allá, la forma de localizar los puntos donde hay que soldar la resistencia consiste en usar el pinout de la memoria flash. Los pines de la flash donde se pueden soldar resistencias para configurar la frecuencia son:

DQ0   DQ8   DQ1   DQ9   DQ10


Para ello se puede usar el datasheet de la memoria flash que tiene nuestro router. En algunos routers ya habrá unos pads para poder soldar estas resistencias, en otros hay que buscar unos puntos apropiados donde hacerlo, o bien directamente en los pines de la flash.

A modo de ejemplo pongo una foto esquemática de mi DGND3700v1, donde se indican los pines que modifican la frecuencia de la CPU, y las resistencias usadas para configurarla a 533 MHz. Mi router ya venía preparado para colocar estas resistencias, aunque no tenía todos los pads al lado de la memoria flash, sino 1 al lado de la flash y 2 al lado de la tarjeta miniPCI.

(http://img.pixady.com/2017/08/997543_dgnd3700v1overclock.jpg) (http://img.pixady.com/2017/08/997543_dgnd3700v1overclock.jpg)

Ojo que esta flash es de 56 pines al ser una memoria grande de 32 MB, otros routers usan memorias flash de 48 pines y el pinout es diferente, ya que hay dos pines menos en cada esquina del chip.

He elaborado una tabla con algunas frecuencias encontradas combinando estos straps. La segunda fila (ADXX) se corresponde con los pines en la interfaz mini PCI.


DQ0DQ8DQ1DQ9DQ10CPU clock (MHz)
AD27AD28AD29AD30AD31
266
320
384
400
426
533

✔ Resistencia pulldown 4,7 kohm soldada
☐ Resistencia pulldown sin soldar (por defecto)


No he probado todas las combinaciones posibles, ya que únicamente para las pruebas solo usé 3 pines de los cinco posibles.

Ahí va un bootlog después de subirle la CPU a 533 MHz a mi router

Citar
DGND3700 Boot Code V1.0.8
CFE version 1.0.37-104.4 for BCM96368 (32bit,SP,BE)
Build Date: Mon Feb 21 17:59:46 CST 2011 (finerain@moonlight)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name AM29LV320MT, id 0x2201 size 32768KB
Total Flash size: 32768K with 256 sectors
ethsw: found bcm53115!
Chip ID: BCM6368B2, MIPS: 533MHz
Main Thread: TP0
Total Memory: 134217728 bytes (128MB)
Boot Address: 0xb8000000

Board IP address                  : 192.168.1.1:ffffff00  
Host IP address                   : 192.168.1.2  
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)          : 1  
Board Id (0-11)                   : 96368MVWG  
Number of MAC Addresses (1-32)    : 10  
Base MAC Address                  : 20:4e:7f:de:ad:de  
PSI Size (1-64) KBytes            : 24  
Enable Backup PSI [0|1]           : 0  
System Log Size (0-256) KBytes    : 0  
Main Thread Number [0|1]          : 0  

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
Booting from only image (0xb8020000) ...
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...
0 buffers found.
Closing DMA Channels.
Starting program at 0x80010000
[    0.000000] Linux version 3.10.49 (dani@tool) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r44441) ) #2 SMP Wed Feb 18 22:07:18 CE5
[    0.000000] Detected Broadcom 0x6368 CPU revision b2
[    0.000000] CPU frequency is 533 MHz
[    0.000000] 128MB of RAM installed
[    0.000000] registering 38 GPIOs
[    0.000000] board_bcm963xx: Boot address 0xb8000000
[    0.000000] board_bcm963xx: CFE version: 1.0.37-104.4
[    0.000000] Overriding boardid with 'DGND3700v1_3800B'
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0002a031 (Broadcom BMIPS4350)
[    0.000000] board: board name: DGND3700v1_3800B
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] PERCPU: Embedded 7 pages/cpu @81103000 s6624 r8192 d13856 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 125892k/131072k available (2642k kernel code, 5180k reserved, 745k data, 320k init, 0k highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] Calibrating delay loop... 531.45 BogoMIPS (lpj=1062912)
[    0.032000] pid_max: default: 32768 minimum: 301
[    0.036000] Mount-cache hash table entries: 512
[    0.044000] SMP: Booting CPU1...
[    0.048000] CPU revision is: 0002a031 (Broadcom BMIPS4350)
[    0.048000] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.
[    0.048000] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.084000] Synchronize counters for CPU 1: done.
[    0.084000] SMP: CPU1 is running
[    0.088000] Brought up 2 CPUs
[    0.108000] NET: Registered protocol family 16
[    0.116000] registering PCI controller with io_map_base unset
[    0.120000] registering PCI controller with io_map_base unset
[    0.132000] bio: create slab <bio-0> at 0
[    0.136000] PCI host bridge to bus 0000:00
[    0.140000] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    0.144000] pci_bus 0000:00: root bus resource [io  0x8000000-0x8007fff]
[    0.148000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.180000] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
[    0.184000] pci 0000:00:02.0: BAR 0: assigned [mem 0x30004000-0x30007fff]
[    0.188000] PCI host bridge to bus 0000:01
[    0.192000] pci_bus 0000:01: root bus resource [mem 0x38000000-0x3fffffff]
[    0.196000] pci_bus 0000:01: root bus resource [io  0x8008000-0x800ffff]
[    0.200000] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.204000] pci 0000:01:1e.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.208000] pci 0000:01:1e.0: BAR 10: assigned [mem 0x38000000-0x3fffffff]
[    0.212000] pci 0000:01:1e.0: BAR 7: assigned [io  0x8008000-0x80080ff]
[    0.216000] pci 0000:01:1e.0: BAR 8: assigned [io  0x8008400-0x80084ff]
[    0.220000] pci 0000:01:1e.0: CardBus bridge to [bus 02-05]
[    0.224000] pci 0000:01:1e.0:   bridge window [io  0x8008000-0x80080ff]
[    0.228000] pci 0000:01:1e.0:   bridge window [io  0x8008400-0x80084ff]
[    0.232000] pci 0000:01:1e.0:   bridge window [mem 0x38000000-0x3fffffff]
[    0.236000] PCI: Enabling device 0000:01:1e.0 (0000 -> 0003)
[    0.240000] Switching to clocksource MIPS
[    0.252000] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.280000] ssb: Found chip with id 0xA8D6, rev 0x00 and package 0x08
[    0.344000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.352000] PCI: Enabling device 0000:00:02.0 (0000 -> 0002)
[    0.380000] ssb: Found chip with id 0xA8D6, rev 0x00 and package 0x08
[    0.444000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:02.0
[    0.452000] NET: Registered protocol family 2
[    0.456000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.464000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.472000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.480000] TCP: reno registered
[    0.480000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.488000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.496000] NET: Registered protocol family 1
[    0.504000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.508000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.520000] msgmni has been set to 245
[    0.524000] io scheduler noop registered
[    0.528000] io scheduler deadline registered (default)
[    0.544000] console [ttyS0] enabled, bootconsole disabled= 10) is a bcm63xx_uart
[    0.544000] console [ttyS0] enabled, bootconsole disabled
[    0.556000] bcm63xx-rng bcm63xx-rng: registered RNG driver
[    0.564000] physmap platform flash device: 08000000 at 18000000
[    0.568000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002201
[    0.580000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.584000]   Amd/Fujitsu Extended Query version 1.3.
[    0.592000] number of CFI chips: 1
[    0.596000] bcm63xxpart: CFE boot tag found with version 6 and board type 96368MVWG
[    0.604000] bcm63xxpart: Partition 0 is CFE offset 0 and length 20000
[    0.608000] bcm63xxpart: Partition 1 is kernel offset 20100 and length 13ff00
[    0.616000] bcm63xxpart: Partition 2 is rootfs offset 160000 and length 1ce0000
[    0.624000] bcm63xxpart: Partition 3 is cal_data offset 1e40000 and length 20000
[    0.632000] bcm63xxpart: Partition 4 is nvram offset 1fe0000 and length 20000
[    0.640000] bcm63xxpart: Partition 5 is linux offset 20000 and length 1e20000
[    0.648000] bcm63xxpart: Spare partition is offset 3e0004 and length 1a5fffc
[    0.652000] 6 bcm63xxpart partitions found on MTD device physmap-flash.0
[    0.660000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.668000] 0x000000000000-0x000000020000 : "CFE"
[    0.672000] 0x000000020100-0x000000160000 : "kernel"
[    0.680000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-oy
[    0.692000] 0x000000160000-0x000001e40000 : "rootfs"
[    0.700000] mtd: device 2 (rootfs) set to be root filesystem
[    0.708000] mtd: partition "rootfs_data" created automatically, ofs=0x3e0000, len=0x1a60000
[    0.716000] 0x0000003e0000-0x000001e40000 : "rootfs_data"
[    0.724000] 0x000001e40000-0x000001e60000 : "cal_data"
[    0.732000] 0x000001fe0000-0x000002000000 : "nvram"
[    0.736000] 0x000000020000-0x000001e40000 : "linux"
[    0.748000] bcm63xx-spi bcm63xx-spi: at 0xb0000800 (irq 9, FIFOs size 542)
[    0.768000] b53_common: found switch: BCM53115, rev 8
[    0.808000] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec
[    0.820000] TCP: cubic registered
[    0.824000] NET: Registered protocol family 17
[    0.828000] 8021q: 802.1Q VLAN Support v1.8
[    0.840000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    0.848000] Freeing unused kernel memory: 320K (80360000 - 803b0000)
procd: Console is alive
procd: - watchdog -
[    2.952000] usbcore: registered new interface driver usbfs
[    2.960000] usbcore: registered new interface driver hub
[    2.964000] usbcore: registered new device driver usb
[    2.976000] Button Hotplug driver version 0.4.1
[    3.044000] SCSI subsystem initialized
[    3.056000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.064000] ehci-platform: EHCI generic platform driver
[    3.176000] ehci-platform ehci-platform: EHCI Host Controller
[    3.180000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    3.188000] ehci-platform ehci-platform: irq 15, io mem 0xb0001500
[    3.208000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00, overcurrent ignored
[    3.216000] hub 1-0:1.0: USB hub found
[    3.220000] hub 1-0:1.0: 2 ports detected
[    3.228000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.236000] ohci-platform ohci-platform: Generic Platform OHCI Controller
[    3.240000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[    3.248000] ohci-platform ohci-platform: irq 13, io mem 0xb0001600
[    3.316000] hub 2-0:1.0: USB hub found
[    3.320000] hub 2-0:1.0: 2 ports detected
[    3.332000] usbcore: registered new interface driver usb-storage
[    3.340000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled.0/input/input0
procd: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
jffs2 is ready
jffs2 is ready
[    6.888000] jffs2: notice: (278) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and.
switching to overlay
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[    8.608000] NET: Registered protocol family 10
[    9.100000] wl: module license 'unspecified' taints kernel.
[    9.108000] Disabling lock debugging due to kernel taint
[    9.196000] SSB/BCMA glue driver successfully attached
[    9.248000] wl0: Broadcom BCM4351 802.11 Wireless Controller 5.10.56.27
[    9.308000] wl1: Broadcom BCM4350 802.11 Wireless Controller 5.10.56.27
[    9.352000] nf_conntrack version 0.5.0 (1972 buckets, 7888 max)
[    9.372000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.396000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.504000] xt_time: kernel timezone is -0000
[    9.516000] PPP generic driver version 2.4.2
[    9.524000] NET: Registered protocol family 24
[   13.976000] device eth0.1 entered promiscuous mode
[   13.980000] device eth0 entered promiscuous mode
[   13.992000] br-lan: port 1(eth0.1) entered forwarding state
[   13.996000] br-lan: port 1(eth0.1) entered forwarding state
procd: - init complete -
[   16.000000] br-lan: port 1(eth0.1) entered forwarding state



BusyBox v1.22.1 (2015-02-18 16:59:57 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I$*.E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Barrier Breaker, r44441)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# cat /proc/cpuinfo
system type             : bcm63xx/DGND3700v1_3800B (0x6368/0xB2)
machine                 : Unknown
processor               : 0
cpu model               : Broadcom BMIPS4350 V3.1
BogoMIPS                : 531.45
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
isa                     : mips1 mips2 mips32r1
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : Broadcom BMIPS4350 V3.1
BogoMIPS                : 531.45
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : no
isa                     : mips1 mips2 mips32r1
ASEs implemented        :
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:/#

Post relacionado -> https://foro.seguridadwireless.net/openwrt/(mod)-overclock-en-placas-bcm6348/

Saludos
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: jar229 en 11-08-2017, 09:47 (Viernes)
Muy interesante. Le pongo chincheta unas semanas y lo añado al [Índice] Hilos relevantes de OpenWrt (https://foro.seguridadwireless.net/openwrt/(indice)-hilos-relevantes-de-openwrt/)

Gracias danitool  >:(
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: Warryor en 11-08-2017, 23:48 (Viernes)
Acabo de probar en un Telecom VH4032N

Citar
CFE version 1.0.37-102.15 for BCM96368 (32bit,SP,BE)
Build Date: Wed Feb 10 09:57:47 CST 2010 (link@hpnb)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB
CPU type 0x2A031: 533MHz, Bus: 160MHz, Ref: 64MHz
CPU running TP0
Total memory: 134217728 bytes (128MB)
Boot Address 0xb8000000
(http://img.pixady.com/2017/08/117970_img20170811231043969_460x259.jpg)
http://img.pixady.com/2017/08/117970_img20170811231043969.jpg (http://img.pixady.com/2017/08/117970_img20170811231043969.jpg)
(http://img.pixady.com/2017/08/763074_img20170811231059265_460x818.jpg)
http://img.pixady.com/2017/08/763074_img20170811231059265.jpg (http://img.pixady.com/2017/08/763074_img20170811231059265.jpg)
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: danitool en 12-08-2017, 22:13 (Sábado)
Acabo de probar en un Telecom VH4032N

Citar
CFE version 1.0.37-102.15 for BCM96368 (32bit,SP,BE)
Build Date: Wed Feb 10 09:57:47 CST 2010 (link@hpnb)
Copyright (C) 2000-2009 Broadcom Corporation.

Parallel flash device: name AM29LV320MT, id 0x2201, size 32768KB
CPU type 0x2A031: 533MHz, Bus: 160MHz, Ref: 64MHz
CPU running TP0
Total memory: 134217728 bytes (128MB)
Boot Address 0xb8000000

Buen trabajo localizando los puntos exactos donde soldar las resistencias. Lo he añadido a la propia wiki del router, gracias!.
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: Tki2000 en 13-08-2017, 10:19 (Domingo)
Buen trabajo danitool.

Yo también incluiría una advertencia. Los chip Broadcom tienden a calentarse mucho. Si les subimos demasiado la frecuencia, tendríamos que mejorar de alguna forma la refrigeración, bien con algún disipador más grande, bien con más ventilación en la carcasa.

 >:( >:( >:(
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: Warryor en 14-08-2017, 14:54 (Lunes)
Por un 33% mas de potencia bien vale la pena un radiador e un ventilador
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: edudi en 19-08-2017, 20:06 (Sábado)
¡¡ Magnífico señores !!! Esto es como volver a la época del pentium II y III pero explotando las carácterísticas. Lo que no recuerdo ni tener WiFi ni nada que pinchar a un puerto USB, jaja.

De 400 a 533 MHz en la época era un salto cuántico eh, se notaba una burrada. A por unos ventiladores fijo, que merece mucho ponerlos a trabajar a 533. Es posible que algunos routers como el HG556a que se sobrecargan con el uso de gestores de torrent, se queden más sueltos y estables. Gracias (fuerte cariño le cogí yo a este router en concreto, un fiel aliado en estos 5 años ya)

Mágico seguir mejorando las posibilidades de los routers.
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: antares en 22-08-2017, 12:06 (Martes)
Aqui va otro. Comtrend WAP-5813n a 533MHz con las tres resistencias de la foto soldadas. Q1 y Q10 estan al lado de la flash y Q9 bajo la tarjeta wifi.
Ejecute dos procesos "md5sum < /dev/urandom" que han puesto la CPU al 100% y durante una hora no ha subido mas de 51 grados la temperatura, medida en el disipador y con la carcasa abierta.

(http://img.pixady.com/2017/08/344423_q10q1_460x345.jpg)
http://pixady.com/image/053v/ (http://pixady.com/image/053v/)
(http://img.pixady.com/2017/08/754956_q9_460x345.jpg)
http://pixady.com/image/053x/ (http://pixady.com/image/053x/)
Título: Re: [MOD] Overclocking en routers BCM6368
Publicado por: danitool en 24-08-2017, 14:17 (Jueves)
Hola antares estupendo trabajo. He añadido esta info del wap-5813n a la wiki.

Gracias!