Adding support for Netgear DGND3300v2? Kernel Issues

Hi,

I've been working on adding LEDE/OpenWrt support for the DGND3300v2 router by Netgear.

Using the tools provided with the GPL source and the Firmware Mod Kit, I've been able to create a firmware image that will flash and begin to boot, but will fail when initializing the ethernet switch.

To create my firmware image, I had to extract the SquashFS from a generic LEDE image for the 96358VW2 using FMK, then copy it to the GPL source directory. After running the ./build.sh script, I was left with a firmware that passed the bootloader verification tests and would successfully flash. I needed to do this because the kernel included in the GPL source doesn't seem to support the little endian filesystem created by the LEDE/OpenWrt build system.

If I try to use the SquashFS from the standard LEDE image, I get this error message on boot:

No filesystem could mount root, tried:  squashfs msdos vfat fuseblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)
Rebooting in 1 seconds..

If I use my custom image, I can get it to boot this far:

VFS: Mounted root (squashfs filesystem) readonly.                               
Freeing unused kernel memory: 108k freed                                        
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    
ifconfig: SIOCGIFFLAGS: No such device                                          
open: No such file or directory                                                 
open: No such file or directory                                                 
open: No such file or directory                                                 

If I press f, I can enter LEDE failsafe mode, but have no network interfaces detected when running ifconfig -a.

This seems to be a result of using the stock kernel in my image, which lacks the b53 driver needed for the switch.

If I compile a compressed kernel using the LEDE/OpenWrt build system, then include it in an image using the method above, it fails to boot immediately and dumps info to the console in this format:

*** Press any key to stop auto run (3 seconds) ***                              
Auto run second count down: 0                                                   
Booting from only image (0xbe060000) ...                                        
**Exception 32: EPC=80528D7C, Cause=80420B60 (Exc24    )                        
                 RA=00000000, VAddr=80420B60                                     
                                                                            
    0  ($00) = 66726F6D     AT ($01) = 7920696D                             
    v0 ($02) = 28307862     v1 ($03) = 30303029                             
    a0 ($04) = 0A000000     a1 ($05) = 00000000                             
    a2 ($06) = 00000000     a3 ($07) = 00000000                             
    t0 ($08) = 00000000     t1 ($09) = 80414350                             
    t2 ($10) = 80528E0C     t3 ($11) = 003DA000                             
    t4 ($12) = 80528E0C     t5 ($13) = 003DA000                             
    t6 ($14) = 80412A2C     t7 ($15) = 00000000                             
    s0 ($16) = 00000000     s1 ($17) = 08300A00                             
    s2 ($18) = 20736563     s3 ($19) = 636F756E                             
    s4 ($20) = 776E3A20     s5 ($21) = 756E2028                             
    s6 ($22) = 636F6E64     s7 ($23) = 2A2A0A00                             
    t8 ($24) = 00000000     t9 ($25) = 00000000                             
    k0 ($26) = 00000000     k1 ($27) = 00000000                             
    gp ($28) = 00000000     sp ($29) = 00000000                             
    fp ($30) = 00000000     ra ($31) = 00000000     

Has anyone encountered anything like this before, and if so, do you have any tips on what to do next?

I've discovered one of these in my attic. If anyone has any further information on this device, or a response to this comment from 2018, I'd be very interested to hear it. Seems a shame to bin this thing.