He estado revisando el CFE de danitool y ya he conseguido que al arrancar desde la SPI y cargar un CFEram (gracias danitool) detecte tambien la NAND y se pueda borrar, leer bloques o hacer un dump de la zona spare con una nueva opcion del menu y sub-opciones que no aparecen en la ayuda.
Ahora ya solo es cosa de añadir un menu con todas las opciones que tendria un programador de memorias.
En el buildcfe-RAM.sh hay que poner "make BRCM_CHIP=6328 BLD_SPI_NAND=1" en lugar de "make BRCM_CHIP=6328 BLD_NAND=1"
Sale un warning-error al compilar pero se soluciona comentando la declaracion static de checkForResetToDefaultHold en bcm63xx_devs.c
Este es el log:
(He modificado algo del codigo fuente para que identifique el modelo de mi NAND y muestre en pantalla bloques completos)
reset
Resetting board...HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN
CFE version 2.0.3 for BCM63XX (32bit,SP,BE)
Build Date: Fri Aug 18 14:21:52 CEST 2017 (dani@tool)
Copyright (C) 2000-2009 Broadcom Corporation.
HS Serial flash device: name S25FL128, id 0x0118 size 16384KB
Total Flash size: 16384K with 256 sectors
Chip ID: BCM6328B0, MIPS: 320MHz, DDR: 320MHz, Bus: 160MHz
Main Thread: TP0
Memory Test Passed
Total Memory: 134217728 bytes (128MB)
Boot Address: 0xb8000000
Board IP address : 192.168.3.130:ffffff00
Host IP address : 192.168.3.40
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) : 2
Board Id (0-3) : 96328avngr
Number of MAC Addresses (1-32) : 10
Base MAC Address : 00:11:22:33:44:55
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
Voice Board Configuration (0-11) : AVNGR_SI32176
*** Press any key to stop auto run (2 seconds) ***
Auto run second count down: 2211
CFE>
web info: Waiting for connection on socket 0.
CFE>
CFE> r cfe6328
0x80700000/165520 0x80728690/71284 Entry at 0x80700000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
0 buffers found.
Closing DMA Channels.
Starting program at 0x80700000
CFE version 2.0.3 for BCM63XX (32bit,SP,BE)
Build Date: lun ene 1 10:50:30 CET 2018 (openwrt@openwrt)
Copyright (C) 2000-2009 Broadcom Corporation.
HS Serial flash device: name S25FL128, id 0x0118 block 64KB size 16384KB
NAND flash device: name ESMT F59L1G81MA, id 0xc8d1 block 128KB size 131072KB
Total Flash size: 16384K with 256 sectors
Chip ID: BCM6328B0, MIPS: 320MHz, DDR: 320MHz, Bus: 160MHz
Main Thread: TP0
Memory Test Passed
Total Memory: 134217728 bytes (128MB)
Boot Address: 0xb8000000
Board IP address : 192.168.3.130:ffffff00
Host IP address : 192.168.3.40
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) : 2
Board Id (0-4) : 96328avngr
Number of MAC Addresses (1-32) : 10
Base MAC Address : 00:11:22:33:44:55
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
Voice Board Configuration (0-11) : AVNGR_SI32176
CFE>
web info: Waiting for connection on socket 0.
CFE> help
Available commands:
tftpd Start TFTP server
checkmem Check memory.
fr read data from flash.
nmrp start memory or registers.
sm Set memory or registers.
dm Dump memory or registers.
chw Write chkw image start from beginning of the flash
w Write the whole image start from beginning of the flash
e Erase [n]vram or [a]ll flash except bootrom
n Erase NAND flash
r Run program from flash image or from host depend on [f/h] flag
p Print boot line and board parameter info
c Change booline parameters
f Write image to the flash
i Erase persistent storage data
a Change board AFE ID
b Change board parameters
reset Reset the board
bid write board id to nand flash.
flashimage Flashes a compressed image after the bootloader.
ping Ping a remote IP host.
arp Display or modify the ARP Table
ifconfig Configure the Ethernet interface
help Obtain help for CFE commands
For more information about a command, enter 'help command-name'
*** command status = 0
CFE> n r 0x00
block read into buffer at 0x8083c110
8083c110: 10 00 00 1c 00 00 00 00 80 00 57 44 80 00 57 50 ..........WD..WP
8083c120: 80 00 5b d0 80 00 5f 30 80 00 00 00 80 00 5b d0 ..[..._0......[.
8083c130: 80 00 db a0 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c140: 80 00 0b c0 80 00 0c 80 80 00 0c 78 80 00 4f b8 ...........x..O.
8083c150: 80 00 50 f4 80 00 50 f4 80 00 50 f4 80 00 50 fc ..P...P...P...P.
8083c160: 80 00 10 78 80 00 51 04 80 00 52 04 80 00 41 0c ...x..Q...R...A.
8083c170: 80 00 3a c8 80 00 3a d0 80 00 0c cc 80 00 3a ac ..:...:.......:.
8083c180: 80 00 0e 38 00 00 e0 21 04 11 00 01 00 00 00 00 ...8...!........
8083c190: 00 00 00 00 3c 16 1f ff 02 df b0 24 02 c0 20 21 ....<......$.. !
8083c1a0: 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 27 ff 00 ac <...'{.0<...'...
8083c1b0: 03 7f d8 22 04 11 00 01 00 00 00 00 03 7f d8 21 ..."...........!
8083c1c0: 3c 01 a0 00 03 61 d8 25 8f 7b 00 00 03 76 d8 21 <....a.%.{...v.!
8083c1d0: 3c 01 a0 00 03 61 d8 25 03 60 f8 09 00 00 00 00 <....a.%.`......
8083c1e0: 3c 04 48 45 34 84 4c 4f 3c 1b 80 00 27 7b 00 30 <.HE4.LO<...'{.0
8083c1f0: 3c 1f 80 00 27 ff 00 f4 03 7f d8 22 04 11 00 01 <...'......"....
8083c200: 00 00 00 00 03 7f d8 21 3c 01 a0 00 03 61 d8 25 .......!<....a.%
8083c210: 8f 7b 00 04 03 76 d8 21 3c 01 a0 00 03 61 d8 25 .{...v.!<....a.%
8083c220: 03 60 f8 09 00 00 00 00 3c 1b 80 00 27 7b 00 30 .`......<...'{.0
8083c230: 3c 1f 80 00 27 ff 01 34 03 7f d8 22 04 11 00 01 <...'..4..."....
8083c240: 00 00 00 00 03 7f d8 21 3c 01 a0 00 03 61 d8 25 .......!<....a.%
8083c250: 8f 7b 00 0c 03 76 d8 21 3c 01 a0 00 03 61 d8 25 .{...v.!<....a.%
8083c260: 03 60 f8 09 00 00 00 00 04 11 02 92 00 00 00 00 .`..............
8083c270: 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 27 ff 01 7c <...'{.0<...'..|
8083c280: 03 7f d8 22 04 11 00 01 00 00 00 00 03 7f d8 21 ..."...........!
8083c290: 8f 7b 00 40 03 76 d8 21 03 60 f8 09 00 00 00 00 .{.@.v.!.`......
8083c2a0: 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 27 ff 01 ac <...'{.0<...'...
8083c2b0: 03 7f d8 22 04 11 00 01 00 00 00 00 03 7f d8 21 ..."...........!
8083c2c0: 8f 7b 00 38 03 76 d8 21 03 60 f8 09 00 00 00 00 .{.8.v.!.`......
8083c2d0: 3c 04 44 52 34 84 41 4d 3c 1b 80 00 27 7b 00 30 <.DR4.AM<...'{.0
8083c2e0: 3c 1f 80 00 27 ff 01 e4 03 7f d8 22 04 11 00 01 <...'......"....
8083c2f0: 00 00 00 00 03 7f d8 21 8f 7b 00 04 03 76 d8 21 .......!.{...v.!
8083c300: 03 60 f8 09 00 00 00 00 3c 1b 80 00 27 7b 00 30 .`......<...'{.0
8083c310: 3c 1f 80 00 27 ff 02 14 03 7f d8 22 04 11 00 01 <...'......"....
8083c320: 00 00 00 00 03 7f d8 21 8f 7b 00 08 03 76 d8 21 .......!.{...v.!
8083c330: 03 60 f8 09 00 00 00 00 00 40 20 21 3c 1b 80 00 .`.......@ !<...
8083c340: 27 7b 00 30 3c 1f 80 00 27 ff 02 48 03 7f d8 22 '{.0<...'..H..."
8083c350: 04 11 00 01 00 00 00 00 03 7f d8 21 8f 7b 00 20 ...........!.{.
8083c360: 03 76 d8 21 03 60 f8 09 00 00 00 00 3c 1b 80 00 .v.!.`......<...
8083c370: 27 7b 00 30 3c 1f 80 00 27 ff 02 78 03 7f d8 22 '{.0<...'..x..."
8083c380: 04 11 00 01 00 00 00 00 03 7f d8 21 8f 7b 00 3c ...........!.{.<
8083c390: 03 76 d8 21 03 60 f8 09 00 00 00 00 00 40 d0 21 .v.!.`.......@.!
8083c3a0: 17 40 00 11 00 00 00 00 3c 04 52 41 34 84 4d 58 .@......<.RA4.MX
8083c3b0: 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 27 ff 02 bc <...'{.0<...'...
8083c3c0: 03 7f d8 22 04 11 00 01 00 00 00 00 03 7f d8 21 ..."...........!
8083c3d0: 8f 7b 00 04 03 76 d8 21 03 60 f8 09 00 00 00 00 .{...v.!.`......
8083c3e0: 10 00 ff ff 00 00 00 00 24 18 01 00 03 1a 08 2a ........$......*
8083c3f0: 14 20 00 02 00 00 00 00 03 40 c0 21 00 18 c5 00 . .......@.!....
8083c400: 24 1e 00 00 24 19 00 00 3c 04 80 00 24 84 00 08 $...$...<...$...
8083c410: 3c 1f 80 00 27 ff 03 14 00 9f 20 22 04 11 00 01 <...'..... "....
8083c420: 00 00 00 00 00 9f 20 21 8c 9c 00 18 03 9e e0 20 ...... !.......
8083c430: 3c 04 5a 42 34 84 53 53 3c 1b 80 00 27 7b 00 30 <.ZB4.SS<...'{.0
8083c440: 3c 1f 80 00 27 ff 03 44 03 7f d8 22 04 11 00 01 <...'..D..."....
8083c450: 00 00 00 00 03 7f d8 21 8f 7b 00 04 03 76 d8 21 .......!.{...v.!
8083c460: 03 60 f8 09 00 00 00 00 3c 04 80 00 24 84 00 08 .`......<...$...
8083c470: 3c 1f 80 00 27 ff 03 74 00 9f 20 22 04 11 00 01 <...'..t.. "....
8083c480: 00 00 00 00 00 9f 20 21 8c 82 00 14 8c 83 00 0c ...... !........
8083c490: 00 5e 10 20 00 7e 18 20 ac 40 00 00 ac 40 00 04 .^. .~. .@...@..
8083c4a0: ac 40 00 08 ac 40 00 0c 20 42 00 10 00 43 08 2a .@...@.. B...C.*
8083c4b0: 14 20 ff f9 00 00 00 00 3c 04 43 4f 34 84 44 45 . ......<.CO4.DE
8083c4c0: 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 27 ff 03 cc <...'{.0<...'...
8083c4d0: 03 7f d8 22 04 11 00 01 00 00 00 00 03 7f d8 21 ..."...........!
8083c4e0: 8f 7b 00 04 03 76 d8 21 03 60 f8 09 00 00 00 00 .{...v.!.`......
8083c4f0: 3c 04 80 00 24 84 00 08 3c 1f 80 00 27 ff 03 fc <...$...<...'...
8083c500: 00 9f 20 22 04 11 00 01 00 00 00 00 00 9f 20 21 .. ".......... !
8083c510: 8c 89 00 10 01 20 b8 21 8c 8a 00 10 01 56 50 21 ..... .!.....VP!
8083c520: 8c 8b 00 00 01 76 58 21 8d 4c 00 00 8d 4d 00 04 .....vX!.L...M..
8083c530: 8d 4e 00 08 8d 4f 00 0c ad 2c 00 00 ad 2d 00 04 .N...O...,...-..
8083c540: ad 2e 00 08 ad 2f 00 0c 21 29 00 10 21 4a 00 10 ...../..!)..!J..
8083c550: 01 4b 08 2b 14 20 ff f4 00 00 00 00 3c 04 44 41 .K.+. ......<.DA
8083c560: 34 84 54 41 3c 1b 80 00 27 7b 00 30 3c 1f 80 00 4.TA<...'{.0<...
8083c570: 27 ff 04 70 03 7f d8 22 04 11 00 01 00 00 00 00 '..p..."........
8083c580: 03 7f d8 21 8f 7b 00 04 03 76 d8 21 03 60 f8 09 ...!.{...v.!.`..
8083c590: 00 00 00 00 3c 04 80 00 24 84 00 08 3c 1f 80 00 ....<...$...<...
8083c5a0: 27 ff 04 a0 00 9f 20 22 04 11 00 01 00 00 00 00 '..... "........
8083c5b0: 00 9f 20 21 8c 89 00 04 01 36 48 21 24 08 00 0f .. !.....6H!$...
8083c5c0: 01 28 48 20 01 00 40 27 01 28 48 24 8c 8a 00 04 .(H ..@'.(H$....
8083c5d0: 8c 8b 00 08 01 5e 50 20 01 7e 58 20 8d 2c 00 00 .....^P .~X .,..
8083c5e0: 8d 2d 00 04 8d 2e 00 08 8d 2f 00 0c ad 4c 00 00 .-......./...L..
8083c5f0: ad 4d 00 04 ad 4e 00 08 ad 4f 00 0c 21 29 00 10 .M...N...O..!)..
8083c600: 21 4a 00 10 01 4b 08 2b 14 20 ff f4 00 00 00 00 !J...K.+. ......
8083c610: 10 00 01 20 00 00 00 00 00 00 00 00 00 00 00 00 ... ............
8083c620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c630: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c640: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c680: 63 66 65 2d 76 01 00 26 72 b9 00 00 00 00 00 00 cfe-v..&r.......
8083c690: 00 00 00 06 65 3d 31 39 32 2e 31 36 38 2e 31 2e ....e=192.168.1.
8083c6a0: 31 3a 66 66 66 66 66 66 30 30 20 68 3d 31 39 32 1:ffffff00 h=192
8083c6b0: 2e 31 36 38 2e 31 2e 31 30 30 20 67 3d 20 72 3d .168.1.100 g= r=
8083c6c0: 66 20 66 3d 76 6d 6c 69 6e 75 78 20 69 3d 62 63 f f=vmlinux i=bc
8083c6d0: 6d 39 36 33 78 78 5f 66 73 5f 6b 65 72 6e 65 6c m963xx_fs_kernel
8083c6e0: 20 64 3d 31 20 70 3d 30 20 00 00 00 00 00 00 00 d=1 p=0 .......
8083c6f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c790: 00 00 00 00 39 36 33 32 38 61 76 6e 67 72 00 00 ....96328avngr..
8083c7a0: 00 00 00 00 00 00 00 00 00 00 00 18 00 00 00 10 ................
8083c7b0: 94 4a 0c 55 a8 c0 00 00 00 00 00 00 00 00 00 00 .J.U............
8083c7c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c7d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c7e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8083c800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
.
.
.