Support for Netgear DGND3700v2

I'd like to know if someone is working for adding support for Netgear DGND3700v2, I'd like to help but unfortunately I'm not a serious developer... thanks.

Doesn't look like the xDSL is supported.

https://wikidevi.com/wiki/Netgear_DGND3700v2
https://openwrt.org/docs/techref/hardware/soc/soc.broadcom.bcm63xx?s[]=bcm6361

don't know if it is useful but netgear has published that source codes:

https://kb.netgear.com/2649/NETGEAR-Open-Source-Code-for-Programmers-GPL

I have a DGND3700V2, and have been looking into how to flash it.

Got the serial port soldered onto the board, note that it's [ GND/TXD/??/RXD ] not [GND/TXD/RXD/VCC] as is more common.
Looks like the OEM is sercomm.
Uses cfe-v2, and sc_tftp to flash images
The image is a 512 bytes header, magic "sErCoMm" followed by a zip file containing another image.
The header contains a checksum (byte 511), the version of the binary and some other strings (ABL and A001)
The checksum byte makes every byte in the entire file add up to zero mod 256

The GPL release appears to have binaries, but not source to create the image under DGND3700v2_V1.1.00.26_NA_src_bak/Source/image/ ... see the "bb" and "bb.GPL" scripts.

Made a bit more progress. The kernel appears to be loaded from the jffs2 filesystem on /dev/mtd0, and is compressed with lzma. A 12 byte header is added, which appears to be (load_addr, entry_point, compressed_size), followed by the lzma compressed kernel.

The kernel can be unpacked with "tail -c +13 vmlinux.lz | lzma -dc > vmlinux".

Managed to make a kernel that I can start up via TFTP. Device tree needs more work...

# makefile chunk - use lzma command from cfe
# NNN - load address, entry, uncompressed length (12 bytes, i.e. 3 machine words, followed by lzma data)

       $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux -d22 -fb64 -a1 $(KDIR)/vmlinux.lzma
       ( \
               perl -e 'print pack("N", $(LOADADDR))'; \
               perl -e 'print pack("N", $(KERNEL_ENTRY))'; \
               perl -e '@s = stat("$(KDIR)/vmlinux"); print pack("N", @s[7])'; \
               cat $(KDIR)/vmlinux.lzma \
       ) > $(TARGET_DIR)/vmlinux.lz

# copy to tftp server

mike@macbook:~/openwrt$ hexdump -C /home/mike/openwrt/build_dir/target-mips_mips32_musl-1.1.16/root-brcm63xx/vmlinux.lz | head -1
00000000  80 01 00 00 80 01 00 00  00 45 bf 10 5d 00 00 40  |.........E..]..@|

# minicom terminal output (error -18 means the network isn't working)

CFE> r 192.168.1.99:vmlinux.lz.20180813
*** command status = -18

> CFE> r 192.168.1.99:vmlinux.lz.20180813
> Retry loading it as a compressed image.
> Loading 192.168.1.99:vmlinux.lz.20180813 ...
> Finished loading 1395853 bytes
> Code Address: 0x80010000, Entry Address: 0x80010000
> Decompression OK!
> Entry at 0x80010000
> Closing network.
> Disabling Switch ports.
> Flushing Receive Buffers...
> 2 buffers found.
> Closing DMA Channels.
> Starting program at 0x80010000
> [    0.000000] Linux version 4.4.140 (mike@macbook) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3934-e5b7404f25) ) #0 SMP Wed8
> [    0.000000] Detected Broadcom 0x6362 CPU revision b0
> [    0.000000] CPU frequency is 400 MHz
> [    0.000000] 64MB of RAM installed
> [    0.000000] board_bcm963xx: Boot address 0xb8000000
> [    0.000000] board_bcm963xx: CFE version: unknown
> [    0.000000] bcm63xx_nvram: nvram checksum failed, contents may be invalid (expected ffffffff, got d0f67401)
> [    0.000000] board_bcm963xx: unknown bcm963xx board: ����
> [    0.000000] bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 0002a070 (Broadcom BMIPS4350)
> [    0.000000] Kernel panic - not syncing: unable to detect bcm963xx board
> [    0.000000] Rebooting in 1 seconds..
> HELO 0.000000] triggering watchdog soft-reset...

Looks like the CFE config block needs to be read from NAND flash, and cannot be read directly through the CPU address space.

Adding a stub NAND flash reader and DGND3700v2 board with board id 96362ADVN2xh gets further. Now crashing in LED code somewhere.

CFE>                                                                                                                
CFE> r 192.168.1.99:vmlinux.lz.20180825                                                                             
Retry loading it as a compressed image.                                                                             
Loading 192.168.1.99:vmlinux.lz.20180825 ...                                                                        
Finished loading 1724928 bytes                                                                                      
Code Address: 0x80010000, Entry Address: 0x80010000                                                                 
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 4.14.63+ (mike@macbook) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7878+7-d1ea8ac3b4)) #0 8
[    0.000000] Detected Broadcom 0x6362 CPU revision b0                                                             
[    0.000000] CPU frequency is 400 MHz                                                                             
[    0.000000] 64MB of RAM installed                                                                                
[    0.000000] detect flash type -> strapbus : 00077fff                                                             
[    0.000000] bcm63xx_flash_detect: flash_type=2                                                                   
[    0.000000] board_bcm963xx: CFE version: 1.0 (flash)                                                             
[    0.000000] bootconsole [early0] enabled                                                                         
[    0.000000] CPU0 revision is: 0002a070 (Broadcom BMIPS4350)                                                      
[    0.000000] board: board name: 96362ADVN2xh                                                                      
[    0.000000] Determined physical RAM map:                                                                         
[    0.000000]  memory: 04000000 @ 00000000 (usable)                                                                
[    0.000000] Initrd not found or empty - disabling initrd                                                         
[    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] Zone ranges:                                                                                         
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]                                               
[    0.000000] Movable zone start for each node                                                                     
[    0.000000] Early memory node ranges                                                                             
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]                                              
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]                                     
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x4ac with crng_init=0                        
[    0.000000] percpu: Embedded 14 pages/cpu @81083000 s25904 r8192 d23248 u57344                                   
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256                                         
[    0.000000] Kernel command line:                                                                                 
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)                                                  
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)                                        
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)                                         
[    0.000000] Memory: 58004K/65536K available (4067K kernel code, 181K rwdata, 944K rodata, 1328K init, 229K bss, )
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=2, Nodes=1                                           
[    0.000000] Hierarchical RCU implementation.                                                                     
[    0.000000] NR_IRQS: 256                                                                                         
[    0.000000] genirq: irq_chip bcm6345-periph-intc did not update eff. affinity mask of irq 48                     
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns               
[    0.000015] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns                            
[    0.008153] Calibrating delay loop... 397.82 BogoMIPS (lpj=795648)                                               
[    0.046473] pid_max: default: 32768 minimum: 301                                                                 
[    0.051585] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)                                          
[    0.058416] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)                                     
[    0.069423] Hierarchical SRCU implementation.                                                                    
[    0.075865] smp: Bringing up secondary CPUs ...                                                                  
[    0.082063] SMP: Booting CPU1...                                                                                 
[    0.090418] Primary instruction cache 64kB, VIPT, 4-way, linesize 16 bytes.                                      
[    0.090436] Primary data cache 32kB, 2-way, VIPT, cache aliases, linesize 16 bytes                               
[    0.090758] CPU1 revision is: 0002a070 (Broadcom BMIPS4350)                                                      
[    0.117592] Synchronize counters for CPU 1:                                                                      
[    0.138282] SMP: CPU1 is running                                                                                 
[    0.138286] done.                                                                                                
[    0.148176] smp: Brought up 1 node, 2 CPUs                                                                       
[    0.156932] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns      
[    0.166996] futex hash table entries: 512 (order: 1, 8192 bytes)                                                 
[    0.173382] pinctrl core: initialized pinctrl subsystem                                                          
[    0.179994] NET: Registered protocol family 16                                                                   
[    0.186132] unsupported NAND flash detected                                                                      
[    0.234317] clocksource: Switched to clocksource MIPS                                                            
[    0.243423] NET: Registered protocol family 2                                                                    
[    0.249940] TCP established hash table entries: 1024 (order: 0, 4096 bytes)                                      
[    0.257212] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)                                             
[    0.263846] TCP: Hash tables configured (established 1024 bind 1024)                                             
[    0.270902] UDP hash table entries: 256 (order: 1, 8192 bytes)                                                   
[    0.277047] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)                                              
[    0.284119] NET: Registered protocol family 1                                                                    
[    0.291254] Crashlog allocated RAM at address 0x3f00000                                                          
[    0.298934] workingset: timestamp_bits=30 max_order=14 bucket_order=0                                            
[    0.322727] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                   
[    0.328822] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.      
[    0.349077] io scheduler noop registered                                                                         
[    0.353170] io scheduler deadline registered (default)                                                           
[    0.369436] libphy: Fixed MDIO Bus: probed                                                                       
[    0.374813] bcm63xx-wdt bcm63xx-wdt:  started, timer margin: 30 sec                                              
[    0.382324] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 803fbd88, ra == 8024
[    0.393281] Oops[#1]:                                                                                            
[    0.395558] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.63+ #0

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.