OpenWrt Forum Archive

Topic: D-Link DIR-815 A1 (Ralink RT3662) OpenWrt firmware development request

The content of this topic has been archived on 4 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

DIR-815 A1 use the same Ralink SoC of DIR-645 A1.
Is it possible to have the OpenWrt firmware also for DIR-815 A1?



D-Link DIR-815 A1 (from WikiDevi)
https://images-na.ssl-images-amazon.com/images/I/416hEB26KIL._SL160_.jpg

CPU1: Ralink RT3662
FLA1: 4 MiB (Macronix MX29LV320DBTI-70G)
RAM1: 32 MiB (ESMT M12L2561616A-6T)

Expansion IFs: none specified

WI1 chip1: Ralink RT3662
WI1 802dot11 protocols: an
WI1 MIMO config: 2x2:2
WI1 antenna connector: U.FL
WI2 chip1: Ralink RT3092
WI2 802dot11 protocols: bgn
WI2 MIMO config: 2x2:2
WI2 antenna connector: U.FL

ETH chip1: Ralink RT3662
Switch: IC+ IP175D
LAN speed: 10/100
LAN ports: 4
WAN speed: 10/100
WAN ports: 1


D-Link DIR-645 A1 (from WikiDevi)
https://images-na.ssl-images-amazon.com/images/I/31bfFsejRlL._SL160_.jpg

CPU1: Ralink RT3662 (500 MHz)
FLA1: 8 MiB (Macronix MX25L6406EMI-12G)
RAM1: 64 MiB (Winbond W9751G6KB-25)

Expansion IFs: USB 2.0
USB ports: 1

WI1 chip1: Ralink RT3662
WI1 802dot11 protocols: bgn
WI1 MIMO config: 2x2:2
WI1 antenna connector: U.FL

ETH chip1: Ralink RT3662
Switch: Realtek RTL8367RB
LAN speed: 10/100/1000
LAN ports: 4
WAN speed: 10/100/1000
WAN ports: 1

(Last edited by Pondera on 19 Dec 2016, 04:55)

i got a dir-815 a1 and would be interested... the chipset is already supported by openwrt as it is used in other routers so it shouldn't be a big deal.

i am willing to try to port openwrt to it if somebody can guide me in the right direction

the device is very very similar to the dir-645 which is supported.

i proceeded to modify the dir-645.dts and compile.

uploading the image via tftp i can get it to almost boot, but it's obvious the kernel can't load the filesystem. i imagine there are other places i need to modify to make it boot, but as of now i don't know where.

here is the boot log

U-Boot 1.1.3 (Jul 16 2010 - 11:25:10) (ALPHA)
SVN revision: 359
Target board: WRG-ND08

Board: Ralink APSoC DRAM:  32 MB
Flash: Bank 0, ID:000322a8, Size 4194304 (0x00400000)
============================================
Ralink UBoot Version: 3.3
--------------------------------------------
ASIC 3883_MP (MAC to MAC 100F MII Mode)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:Jul 16 2010  Time:11:25:10
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 GPIO pin 24 reset to switch

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
We have SEAMA, Image Size = 1114048
Verifying Checksum ...
Uncompressing SEAMA linux.lzma ... OK
## Transferring control to Linux (at address bc05000c) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.18.45 (bracco@bracco-VirtualBox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49389) ) #5 Mon Dec 19 22:13:37 CET 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-645
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29072K/32768K available (2393K kernel code, 122K rwdata, 436K rodata, 176K init, 185K bss, 3696K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.140000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.150000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.160000] Switched to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.170000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.210000] TCP: reno registered
[    0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.240000] NET: Registered protocol family 1
[    0.250000] rt-timer 10000100.timer: maximum frequency is 7629Hz
[    0.270000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.290000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.300000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 56
[    0.340000] io scheduler noop registered
[    0.350000] io scheduler deadline registered (default)
[    0.360000] ralink-usb-phy usbphy: invalid resource
[    0.370000] gpio-export gpio_export: 1 gpio(s) exported
[    0.380000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.400000] console [ttyS0] disabled
[    0.400000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.420000] console [ttyS0] enabled
[    0.420000] console [ttyS0] enabled
[    0.440000] bootconsole [early0] disabled
[    0.440000] bootconsole [early0] disabled
[    0.460000] ralink_soc_eth 10100000.ethernet: generated random MAC address e6:e4:d7:7c:05:09
[    0.480000] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[    0.490000] ralink_soc_eth 10100000.ethernet eth0 (uninitialized): link up (1000Mbps/Full duplex)
[    0.510000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    0.530000] rt2880_wdt 10000120.watchdog: Initialized
[    0.540000] TCP: cubic registered
[    0.540000] NET: Registered protocol family 17
[    0.550000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.580000] 8021q: 802.1Q VLAN Support v1.8
[    0.590000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    0.610000] Please append a correct "root=" boot option; here are the available partitions:
[    0.620000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.620000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   82.690000] random: nonblocking pool is initialized

anybody help?

a bootlog of the initramfs image, if helpful

U-Boot 1.1.3 (Jul 16 2010 - 11:25:10) (ALPHA)
SVN revision: 359
Target board: WRG-ND08

Board: Ralink APSoC DRAM:  32 MB
Flash: Bank 0, ID:000322a8, Size 4194304 (0x00400000)
============================================
Ralink UBoot Version: 3.3
--------------------------------------------
ASIC 3883_MP (MAC to MAC 100F MII Mode)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:Jul 16 2010  Time:11:25:10
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 GPIO pin 24 reset to switch

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.

You choosed 1
                                                                              0


1: System Load Linux to SDRAM via TFTP.
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.2.1) ==:192.168.2.1
        Input server IP (192.168.2.100) ==:192.168.2.100
        Input Linux Kernel filename (viram.bin) ==:u2ram.bin
1.set ge1 as normal mode
1.set ge1 as mii mode
enable turbo mii
Using Eth0 (10/100-M) device
TFTP from server 192.168.2.100; our IP address is 192.168.2.1
Filename 'u2ram.bin'.
Loading: checksum bad
checksum bad
checksum bad
T #################################################################
         #################################################################
         #################################################################
         ####################################Got ARP REQUEST, return our IP
#############################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################  done
Bytes transferred = 3270451 (31e733 hex)
Prepare config sector: ADDR[0xbc030000], SIZE[0x00010000], CONFIG SIZE[0x00001000]
Protect off BC030000 ... BC03FFFF
Un-Protected 1 sectors
Erasing Flash...
 done ret=0
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-3.18.45
   Created:      2016-12-19  21:48:26 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3270387 Bytes =  3.1 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.18.45 (bracco@bracco-VirtualBox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49389) ) #18 Mon Dec 19 22:48:18 CET 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-815
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26964K/32768K available (2393K kernel code, 122K rwdata, 436K rodata, 2288K init, 185K bss, 5804K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.140000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.150000] Switched to clocksource MIPS
[    0.160000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    3.490000] rt-timer 10000100.timer: maximum frequency is 7629Hz
[    3.500000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    3.530000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.540000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.560000] msgmni has been set to 52
[    3.580000] io scheduler noop registered
[    3.580000] io scheduler deadline registered (default)
[    3.600000] ralink-usb-phy usbphy: invalid resource
[    3.610000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.620000] console [ttyS0] disabled
[    3.630000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    3.650000] console [ttyS0] enabled
[    3.650000] console [ttyS0] enabled
[    3.660000] bootconsole [early0] disabled
[    3.660000] bootconsole [early0] disabled
[    3.680000] ralink_soc_eth 10100000.ethernet: generated random MAC address be:c2:5f:a2:94:24
[    3.700000] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[    3.710000] ralink_soc_eth 10100000.ethernet eth0 (uninitialized): link up (1000Mbps/Full duplex)
[    3.730000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    3.750000] rt2880_wdt 10000120.watchdog: Initialized
[    3.760000] TCP: cubic registered
[    3.770000] NET: Registered protocol family 17
[    3.770000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    3.800000] 8021q: 802.1Q VLAN Support v1.8
[    3.840000] Freeing unused kernel memory: 2288K (802e4000 - 80520000)
[    3.870000] init: Console is alive
[    3.880000] init: - watchdog -
[    4.880000] init: - preinit -
[    5.040000] ralink_soc_eth 10100000.ethernet eth0: link up (1000Mbps/Full duplex)
[    5.050000] 8021q: adding VLAN 0 to HW filter on device eth0
[    5.130000] random: mktemp urandom read with 7 bits of entropy available
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
[    8.300000] ralink_soc_eth 10100000.ethernet eth0: link down
[    8.320000] procd: - early -
[    8.330000] procd: - watchdog -
[    8.870000] procd: - ubus -
[    9.890000] procd: - init -
Please press Enter to activate this console.
[   10.900000] NET: Registered protocol family 10
[   10.930000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.980000] u32 classifier
[   10.980000]     input device check on
[   10.990000]     Actions configured
[   11.000000] Mirror/redirect action on
[   11.030000] nf_conntrack version 0.5.0 (457 buckets, 1828 max)
[   11.050000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   11.070000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   11.090000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.260000] xt_time: kernel timezone is -0000
[   11.400000] PPP generic driver version 2.4.2
[   11.410000] NET: Registered protocol family 24
[   11.460000] rt2800_wmac 10180000.wmac: failed to get mtd device "factory"
[   11.480000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[   11.500000] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[   11.520000] rt2800_wmac 10180000.wmac: Falling back to user helper
[   11.580000] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[   11.590000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[   11.610000] rt2800_wmac: probe of 10180000.wmac failed with error -11
[   20.210000] ralink_soc_eth 10100000.ethernet eth0: link up (1000Mbps/Full duplex)
[   20.230000] 8021q: adding VLAN 0 to HW filter on device eth0
[   20.270000] device eth0.1 entered promiscuous mode
[   20.280000] device eth0 entered promiscuous mode
[   20.340000] br-lan: port 1(eth0.1) entered forwarding state
[   20.350000] br-lan: port 1(eth0.1) entered forwarding state
[   22.350000] br-lan: port 1(eth0.1) entered forwarding state

managed to fix the flash issue, now the problem is getting the ethernet ports to work.

here is the bootlog. it seems the system detects them but they don't work in practice

[    0.000000] Linux version 3.18.45 (bracco@bracco-VirtualBox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49389) ) #102 Tue Dec 20 15:00:35 CET 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-815
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26836K/32768K available (2445K kernel code, 126K rwdata, 452K rodata, 2344K init, 186K bss, 5932K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.140000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.150000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.160000] Switched to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.170000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.210000] TCP: reno registered
[    0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.240000] NET: Registered protocol family 1
[    3.600000] rt-timer 10000100.timer: maximum frequency is 7629Hz
[    3.620000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    3.650000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.660000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.680000] msgmni has been set to 52
[    3.690000] io scheduler noop registered
[    3.700000] io scheduler deadline registered (default)
[    3.710000] ralink-usb-phy usbphy: invalid resource
[    3.720000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.740000] console [ttyS0] disabled
[    3.740000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    3.760000] console [ttyS0] enabled
[    3.760000] console [ttyS0] enabled
[    3.770000] bootconsole [early0] disabled
[    3.770000] bootconsole [early0] disabled
[    3.790000] physmap platform flash device: 01000000 at fc000000
[    3.810000] physmap-flash physmap-flash.0: map_probe failed
[    3.820000] 1c000000.nor-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    3.840000] Amd/Fujitsu Extended Query Table at 0x0040
[    3.850000]   Amd/Fujitsu Extended Query version 1.1.
[    3.860000] number of CFI chips: 1
[    3.870000] 6 ofpart partitions found on MTD device 1c000000.nor-flash
[    3.880000] Creating 6 MTD partitions on "1c000000.nor-flash":
[    3.900000] 0x000000000000-0x000000030000 : "uboot"
[    3.910000] 0x000000030000-0x000000034000 : "uboot-env"
[    3.920000] 0x000000034000-0x000000038000 : "factory"
[    3.930000] 0x000000038000-0x000000040000 : "nvram"
[    3.940000] 0x000000040000-0x000000050000 : "devdata"
[    3.950000] 0x000000050000-0x000000400000 : "firmware"
[    3.970000] libphy: mdio: probed
[    3.980000] ralink_soc_eth 10100000.ethernet: connected port 0 to PHY at mdio-bus:00 [uid=02430d80, driver=Generic PHY]
[    4.000000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    4.020000] rt2880_wdt 10000120.watchdog: Initialized
[    4.030000] TCP: cubic registered
[    4.030000] NET: Registered protocol family 17
[    4.040000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.070000] 8021q: 802.1Q VLAN Support v1.8
[    4.110000] Freeing unused kernel memory: 2344K (802f6000 - 80540000)
[    4.140000] init: Console is alive
[    4.150000] init: - watchdog -
[    5.150000] init: - preinit -
[    5.310000] 8021q: adding VLAN 0 to HW filter on device eth0
[    5.390000] random: mktemp urandom read with 8 bits of entropy available
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
[    7.980000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[    8.560000] procd: - early -
[    8.570000] procd: - watchdog -
[    8.980000] ralink_soc_eth 10100000.ethernet eth0: link down
[    9.150000] procd: - ubus -
[   10.160000] procd: - init -
Please press Enter to activate this console.
[   11.230000] NET: Registered protocol family 10
[   11.250000] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
[   11.290000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.350000] u32 classifier
[   11.360000]     input device check on
[   11.370000]     Actions configured
[   11.400000] Mirror/redirect action on
[   11.430000] nf_conntrack version 0.5.0 (455 buckets, 1820 max)
[   11.460000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   11.480000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   11.500000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.630000] xt_time: kernel timezone is -0000
[   11.770000] PPP generic driver version 2.4.2
[   11.780000] NET: Registered protocol family 24
[   11.840000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[   11.860000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 3853 detected
[   20.480000] 8021q: adding VLAN 0 to HW filter on device eth0
[   20.500000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.600000] device eth0.1 entered promiscuous mode
[   20.610000] device eth0 entered promiscuous mode
[   20.690000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.740000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   22.980000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   22.990000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   23.020000] br-lan: port 1(eth0.1) entered forwarding state
[   23.030000] br-lan: port 1(eth0.1) entered forwarding state
[   23.040000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   23.090000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.030000] br-lan: port 1(eth0.1) entered forwarding state



BusyBox v1.23.2 (2016-12-19 22:07:07 CET) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Chaos Calmer, r49389)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::3608:4ff:feb8:97e4/64 Scope:Link
          inet6 addr: fd30:292f:7d74::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1468 (1.4 KiB)

eth0      Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          inet6 addr: fe80::3608:4ff:feb8:97e4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:122 errors:0 dropped:11 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13200 (12.8 KiB)  TX bytes:6596 (6.4 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1514 (1.4 KiB)

eth0.2    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E5
          inet6 addr: fe80::3608:4ff:feb8:97e5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:3884 (3.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3936 (3.8 KiB)  TX bytes:3936 (3.8 KiB)

managed to get it to detect the ip175d switc ic but still no working ethernet

[    0.000000] Linux version 3.18.45 (bracco@bracco-VirtualBox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49389) ) #129 Tue Dec 20 16:36:01 CET 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-815
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26836K/32768K available (2451K kernel code, 125K rwdata, 456K rodata, 2336K init, 186K bss, 5932K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.140000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.150000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.160000] Switched to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.170000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.210000] TCP: reno registered
[    0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.240000] NET: Registered protocol family 1
[    3.600000] rt-timer 10000100.timer: maximum frequency is 7629Hz
[    3.620000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    3.650000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.660000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.680000] msgmni has been set to 52
[    3.690000] io scheduler noop registered
[    3.700000] io scheduler deadline registered (default)
[    3.710000] ralink-usb-phy usbphy: invalid resource
[    3.720000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    3.730000] console [ttyS0] disabled
[    3.740000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    3.760000] console [ttyS0] enabled
[    3.760000] console [ttyS0] enabled
[    3.770000] bootconsole [early0] disabled
[    3.770000] bootconsole [early0] disabled
[    3.790000] physmap platform flash device: 01000000 at fc000000
[    3.810000] physmap-flash physmap-flash.0: map_probe failed
[    3.820000] 1c000000.nor-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    3.840000] Amd/Fujitsu Extended Query Table at 0x0040
[    3.850000]   Amd/Fujitsu Extended Query version 1.1.
[    3.860000] number of CFI chips: 1
[    3.870000] 6 ofpart partitions found on MTD device 1c000000.nor-flash
[    3.880000] Creating 6 MTD partitions on "1c000000.nor-flash":
[    3.890000] 0x000000000000-0x000000030000 : "uboot"
[    3.900000] 0x000000030000-0x000000034000 : "uboot-env"
[    3.920000] 0x000000034000-0x000000038000 : "factory"
[    3.930000] 0x000000038000-0x000000040000 : "nvram"
[    3.940000] 0x000000040000-0x000000050000 : "devdata"
[    3.950000] 0x000000050000-0x000000400000 : "firmware"
[    3.960000] libphy: mdio: probed
[    3.980000] IP17xx: Found IP175D at mdio-bus:00
[    4.070000] ralink_soc_eth 10100000.ethernet: connected port 0 to PHY at mdio-bus:00 [uid=02430d80, driver=IC+ IP17xx]
[    4.090000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    4.110000] rt2880_wdt 10000120.watchdog: Initialized
[    4.120000] TCP: cubic registered
[    4.130000] NET: Registered protocol family 17
[    4.140000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.160000] 8021q: 802.1Q VLAN Support v1.8
[    4.200000] Freeing unused kernel memory: 2336K (802f8000 - 80540000)
[    4.230000] init: Console is alive
[    4.240000] init: - watchdog -
[    5.240000] init: - preinit -
[    5.400000] 8021q: adding VLAN 0 to HW filter on device eth0
[    5.480000] random: mktemp urandom read with 8 bits of entropy available
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
[    7.070000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[    8.640000] procd: - early -
[    8.650000] procd: - watchdog -
[    9.070000] ralink_soc_eth 10100000.ethernet eth0: link down
[    9.230000] procd: - ubus -
[   10.250000] procd: - init -
Please press Enter to activate this console.
[   11.310000] NET: Registered protocol family 10
[   11.330000] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
[   11.370000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.450000] u32 classifier
[   11.460000]     input device check on
[   11.470000]     Actions configured
[   11.490000] Mirror/redirect action on
[   11.520000] nf_conntrack version 0.5.0 (455 buckets, 1820 max)
[   11.540000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   11.560000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   11.580000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.720000] xt_time: kernel timezone is -0000
[   11.850000] PPP generic driver version 2.4.2
[   11.860000] NET: Registered protocol family 24
[   11.910000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[   11.930000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 3853 detected
[   20.500000] 8021q: adding VLAN 0 to HW filter on device eth0
[   20.520000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.620000] device eth0.1 entered promiscuous mode
[   20.630000] device eth0 entered promiscuous mode
[   20.710000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.800000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   21.070000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   21.110000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   21.120000] br-lan: port 1(eth0.1) entered forwarding state
[   21.130000] br-lan: port 1(eth0.1) entered forwarding state
[   21.140000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   21.220000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   23.130000] br-lan: port 1(eth0.1) entered forwarding state
[   79.870000] random: nonblocking pool is initialized



BusyBox v1.23.2 (2016-12-19 22:07:07 CET) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Chaos Calmer, r49389)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdbe:484d:6061::1/60 Scope:Global
          inet6 addr: fe80::3608:4ff:feb8:97e4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1984 (1.9 KiB)

eth0      Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          inet6 addr: fe80::3608:4ff:feb8:97e4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:386 errors:0 dropped:12 overruns:0 frame:0
          TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:45884 (44.8 KiB)  TX bytes:14458 (14.1 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E4
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1646 (1.6 KiB)

eth0.2    Link encap:Ethernet  HWaddr 34:08:04:B8:97:E5
          inet6 addr: fe80::3608:4ff:feb8:97e5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:11408 (11.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:144 errors:0 dropped:0 overruns:0 frame:0
          TX packets:144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10464 (10.2 KiB)  TX bytes:10464 (10.2 KiB)

i've made quite a lot of progress, wasted alot of time because of what seems to be big mistakes in the dir-645 files from CC 15.05.1

now ethernet works and wifi 5ghz too (it seems) but wifi 2.4ghz doesn't.

anyway here's a bootlog

## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-3.18.45
   Created:      2016-12-21  20:29:01 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3432323 Bytes =  3.3 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.18.45 (bracco@bracco-VirtualBox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r49389) ) #309 Wed Dec 21 21:28:53 CET 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-815 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26768K/32768K available (2458K kernel code, 122K rwdata, 460K rodata, 2392K init, 186K bss, 6000K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.110000] rt3883-pci 10140000.pci: mode: PCIe
[    1.710000] PCI host bridge /pci@10140000/host-bridge ranges:
[    1.720000]  MEM 0x0000000020000000..0x000000002fffffff
[    1.730000]   IO 0x0000000010160000..0x000000001016ffff
[    1.750000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    1.760000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    1.770000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    1.780000] PCI host bridge to bus 0000:00
[    1.780000] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    1.790000] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    1.800000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.810000] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.820000] pci 0000:00:01.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.830000] pci 0000:00:01.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
[    1.840000] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff]
[    1.850000] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.850000] pci 0000:00:01.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.860000] pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
[    1.870000] Switched to clocksource MIPS
[    1.880000] NET: Registered protocol family 2
[    1.880000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.900000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.910000] TCP: Hash tables configured (established 1024 bind 1024)
[    1.920000] TCP: reno registered
[    1.930000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.940000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.950000] NET: Registered protocol family 1
[    5.410000] rt-timer 10000100.timer: maximum frequency is 7629Hz
[    5.430000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    5.460000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.470000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.490000] msgmni has been set to 52
[    5.500000] io scheduler noop registered
[    5.510000] io scheduler deadline registered (default)
[    5.520000] ralink-usb-phy usbphy: invalid resource
[    5.530000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.540000] console [ttyS0] disabled
[    5.550000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    5.570000] console [ttyS0] enabled
[    5.570000] console [ttyS0] enabled
[    5.580000] bootconsole [early0] disabled
[    5.580000] bootconsole [early0] disabled
[    5.600000] physmap platform flash device: 01000000 at fc000000
[    5.620000] physmap-flash physmap-flash.0: map_probe failed
[    5.630000] 1c000000.nor-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    5.650000] Amd/Fujitsu Extended Query Table at 0x0040
[    5.660000]   Amd/Fujitsu Extended Query version 1.1.
[    5.670000] number of CFI chips: 1
[    5.680000] 6 ofpart partitions found on MTD device 1c000000.nor-flash
[    5.690000] Creating 6 MTD partitions on "1c000000.nor-flash":
[    5.700000] 0x000000000000-0x000000030000 : "uboot"
[    5.720000] 0x000000030000-0x000000034000 : "uboot-env"
[    5.730000] 0x000000034000-0x000000038000 : "factory"
[    5.740000] 0x000000038000-0x000000040000 : "nvram"
[    5.750000] 0x000000040000-0x000000050000 : "devdata"
[    5.760000] 0x000000050000-0x000000400000 : "firmware"
[    5.780000] libphy: mdio: probed
[    5.790000] IP17xx: Found IP175D at mdio-bus:00
[    5.880000] ralink_soc_eth 10100000.ethernet: connected port 0 to PHY at mdio-bus:00 [uid=02430d80, driver=IC+ IP17xx]
[    5.900000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    5.920000] rt2880_wdt 10000120.watchdog: Initialized
[    5.930000] TCP: cubic registered
[    5.940000] NET: Registered protocol family 17
[    5.950000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    5.970000] 8021q: 802.1Q VLAN Support v1.8
[    6.010000] Freeing unused kernel memory: 2392K (802fa000 - 80550000)
[    6.040000] init: Console is alive
[    6.050000] init: - watchdog -
[    6.100000] usbcore: registered new interface driver usbfs
[    6.110000] usbcore: registered new interface driver hub
[    6.120000] usbcore: registered new device driver usb
[    7.060000] init: - preinit -
[    7.210000] 8021q: adding VLAN 0 to HW filter on device eth0
[    7.290000] random: mktemp urandom read with 11 bits of entropy available
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
[    8.880000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   10.460000] procd: - early -
[   10.460000] procd: - watchdog -
[   10.880000] ralink_soc_eth 10100000.ethernet eth0: link down
[   11.030000] procd: - ubus -
[   12.050000] procd: - init -
Please press Enter to activate this console.
[   13.130000] NET: Registered protocol family 10
[   13.160000] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
[   13.210000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.260000] u32 classifier
[   13.260000]     input device check on
[   13.270000]     Actions configured
[   13.290000] Mirror/redirect action on
[   13.310000] nf_conntrack version 0.5.0 (455 buckets, 1820 max)
[   13.360000] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68
[   13.370000] Backport generated by backports.git backports-20151218-0-g2f58d9d
[   13.390000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.540000] xt_time: kernel timezone is -0000
[   13.680000] PPP generic driver version 2.4.2
[   13.690000] NET: Registered protocol family 24
[   13.740000] PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
[   13.750000] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3071, rev 021c detected
[   13.770000] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0001 detected
[   13.800000] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[   13.810000] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 3853 detected
[   22.790000] 8021q: adding VLAN 0 to HW filter on device eth0
[   22.800000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   22.870000] device eth0.1 entered promiscuous mode
[   22.880000] device eth0 entered promiscuous mode
[   22.890000] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   22.980000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   23.030000] br-lan: port 1(eth0.1) entered forwarding state
[   23.040000] br-lan: port 1(eth0.1) entered forwarding state
[   25.040000] br-lan: port 1(eth0.1) entered forwarding state



BusyBox v1.23.2 (2016-12-19 22:07:07 CET) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (Chaos Calmer, r49389)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@OpenWrt:/#

well, looks like i did it. now to clean things up and look at submitting the code. here is a bootlog of the device with everything in working order

## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-4.4.14
   Created:      2016-12-13  23:04:12 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3308346 Bytes =  3.2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 4.4.14 (bracco@bracco-VirtualBox) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 50019) ) #63 Thu Dec 22 13:03:51 UTC 2016
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is D-Link DIR-815 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26564K/32768K available (2717K kernel code, 135K rwdata, 588K rodata, 2184K init, 195K bss, 6204K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000012] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.015490] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.090669] pid_max: default: 32768 minimum: 301
[    0.100004] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.113034] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.134324] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.154050] pinctrl core: initialized pinctrl subsystem
[    0.165297] NET: Registered protocol family 16
[    0.181533] rt3883-pci 10140000.pci: mode: PCIe
[    1.781256] PCI host bridge /pci@10140000/host-bridge ranges:
[    1.792600]  MEM 0x0000000020000000..0x000000002fffffff
[    1.802950]   IO 0x0000000010160000..0x000000001016ffff
[    1.828907] rt2880_gpio 10000600.gpio: registering 24 gpios
[    1.839994] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    1.852456] rt2880_gpio 10000638.gpio: registering 16 gpios
[    1.864610] PCI host bridge to bus 0000:00
[    1.872618] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    1.886358] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    1.898068] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.911565] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.927921] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.944716] pci 0000:00:01.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.958141] pci 0000:00:01.0: BAR 1: assigned [mem 0x20100000-0x2010ffff]
[    1.971608] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x2000ffff]
[    1.985095] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.994935] pci 0000:00:01.0:   bridge window [mem 0x20000000-0x200fffff]
[    2.008566] pci 0000:00:01.0: of_irq_parse_pci() failed with rc=-22
[    2.022315] clocksource: Switched to clocksource MIPS
[    2.034394] NET: Registered protocol family 2
[    2.044187] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.058034] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.070597] TCP: Hash tables configured (established 1024 bind 1024)
[    2.083405] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.094974] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.107888] NET: Registered protocol family 1
[    5.197440] rt-timer 10000100.timer: maximum frequency is 3814Hz
[    5.210670] futex hash table entries: 256 (order: -1, 3072 bytes)
[    5.245432] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.257015] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.280684] io scheduler noop registered
[    5.288455] io scheduler deadline registered (default)
[    5.298941] ralink-usb-phy usbphy: invalid resource
[    5.309538] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.323842] console [ttyS0] disabled
[    5.330852] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    5.350662] console [ttyS0] enabled
[    5.350662] console [ttyS0] enabled
[    5.364404] bootconsole [early0] disabled
[    5.364404] bootconsole [early0] disabled
[    5.381817] 1c000000.nor-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    5.402990] Amd/Fujitsu Extended Query Table at 0x0040
[    5.413263]   Amd/Fujitsu Extended Query version 1.1.
[    5.423355] number of CFI chips: 1
[    5.434327] 6 ofpart partitions found on MTD device 1c000000.nor-flash
[    5.447431] Creating 6 MTD partitions on "1c000000.nor-flash":
[    5.459089] 0x000000000000-0x000000030000 : "uboot"
[    5.471262] 0x000000030000-0x000000034000 : "uboot-env"
[    5.484568] 0x000000034000-0x000000038000 : "factory"
[    5.497426] 0x000000038000-0x000000040000 : "nvram"
[    5.509956] 0x000000040000-0x000000050000 : "devdata"
[    5.522994] 0x000000050000-0x000000400000 : "firmware"
[    5.542588] libphy: mdio: probed
[    5.550236] IP17xx: Found IP175D at mdio-bus:00
[    5.638560] mtk_soc_eth 10100000.ethernet: connected port 0 to PHY at mdio-bus:00 [uid=02430d80, driver=IC+ IP17xx]
[    5.660491] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    5.677883] rt2880_wdt 10000120.watchdog: Initialized
[    5.689955] NET: Registered protocol family 10
[    5.704667] NET: Registered protocol family 17
[    5.713770] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    5.738958] 8021q: 802.1Q VLAN Support v1.8
[    5.776607] Freeing unused kernel memory: 2184K (8035e000 - 80580000)
[    5.808451] init: Console is alive
[    5.815727] init: - watchdog -
[    5.866638] usbcore: registered new interface driver usbfs
[    5.877816] usbcore: registered new interface driver hub
[    5.888630] usbcore: registered new device driver usb
[    5.907756] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.923582] ehci-platform: EHCI generic platform driver
[    5.939042] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.953746] ohci-platform: OHCI generic platform driver
[    5.975475] init: - preinit -
[    6.131022] 8021q: adding VLAN 0 to HW filter on device eth0
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
[    7.632455] mtk_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[    9.369191] procd: - early -
[    9.375236] procd: - watchdog -
[    9.632381] mtk_soc_eth 10100000.ethernet eth0: link down
[    9.962826] procd: - ubus -
[    9.979410] random: ubusd urandom read with 17 bits of entropy available
[   10.021725] procd: - init -
Please press Enter to activate this console.
[   10.966561] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.998203] Loading modules backported from Linux version wt-2016-05-12-0-g7a54796
[   11.013402] Backport generated by backports.git backports-20160216-0-ge3c56e4
[   11.034499] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.061828] nf_conntrack version 0.5.0 (449 buckets, 1796 max)
[   11.131258] xt_time: kernel timezone is -0000
[   11.239101] PPP generic driver version 2.4.2
[   11.252217] NET: Registered protocol family 24
[   11.308445] PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
[   11.320102] rt2800pci 0000:01:00.0: failed to load eeprom property
[   11.332498] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'rt2x00pci_1_0.eeprom'.
[   11.353285] rt2800pci 0000:01:00.0: Direct firmware load for rt2x00pci_1_0.eeprom failed with error -2
[   11.371873] rt2800pci 0000:01:00.0: Falling back to user helper
[   11.491105] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3071, rev 021c detected
[   11.506677] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0008 detected
[   11.563597] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[   11.579165] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 3853 detected
[   21.838931] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   21.850689] 8021q: adding VLAN 0 to HW filter on device eth0
[   21.935765] device eth0.1 entered promiscuous mode
[   21.945444] device eth0 entered promiscuous mode
[   22.034024] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.159384] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   22.632519] mtk_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   22.673715] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   22.752605] br-lan: port 1(eth0.1) entered forwarding state
[   22.763862] br-lan: port 1(eth0.1) entered forwarding state
[   22.775463] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   22.962543] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.762330] br-lan: port 1(eth0.1) entered forwarding state
[   73.192369] random: nonblocking pool is initialized



BusyBox v1.24.2 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 DESIGNATED DRIVER (Bleeding Edge, 50019)
 -----------------------------------------------------
  * 2 oz. Orange Juice         Combine all juices in a
  * 2 oz. Pineapple Juice      tall glass filled with
  * 2 oz. Grapefruit Juice     ice, stir well.
  * 2 oz. Cranberry Juice
 -----------------------------------------------------
root@OpenWrt:/#

Very impressive! Have you already compiled a firmware file (with LuCI working) suitable to be updated via web conf?

Bracco wrote:

what seems to be big mistakes in the dir-645 files from CC 15.05.1

What mistakes?

i compiled the image with luci and yes, it works, but i'm unsure about the update via stock web interface. i'm working through serial and tftp

found in rt3883.c

static struct rt2880_pmx_func lna_a_func[] = { FUNC("lna a", 0, 32, 3) };
static struct rt2880_pmx_func lna_g_func[] = { FUNC("lna a", 0, 35, 3) };

does it work fine if you fix lna_g ?

static struct rt2880_pmx_func lna_a_func[] = { FUNC("lna a", 0, 32, 3) };
static struct rt2880_pmx_func lna_g_func[] = { FUNC("lna g", 0, 35, 3) };

(Last edited by anarchy99 on 22 Dec 2016, 21:54)

Bracco wrote:

i'm unsure about the update via stock web interface. i'm working through serial and tftp

Is there any chance to have an OpenWrt image file updateble via web interface and then to revert to stock fw?

Have you worked also on LEDs? Is it possible to handle LEDs by LuCI?

good news and bad news:

first, the bad one: i don't know why, but when openwrt boots from flash, both lan&wifi don't work. at all. not even in failsafe mode. they do work perfectly when booting an initramfs.

good news is that the image is flashable and upgradeable through web interface, and leds all work. about configuring the leds via LuCI idk.

i think i found the reason, but i'm lost as for the solution.

i think that when loading the initramfs from tftp, the bootloader initializes the switch/cpu port, which is something it doesn't when loading the image from flash.

the problem is, i absolutely don't know what it does besides some criptic lines it prints, and even if i did, i don't know how to make openwrt do that too...

anyway, the bootloader says this. i guess it could mean it sets the cpu port @ turbo mii? the cpu port is already set @ mii in my DTS...

1: System Load Linux to SDRAM via TFTP.
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.2.1) ==:192.168.2.1
        Input server IP (192.168.2.100) ==:192.168.2.100
        Input Linux Kernel filename (815su.bin) ==:815su.bin
1.set ge1 as normal mode
1.set ge1 as mii mode
enable turbo mii
Using Eth0 (10/100-M) device
TFTP from server 192.168.2.100; our IP address is 192.168.2.1

and here is my current entry in the DTS

    ethernet@10100000 {
        status = "okay";
        mtd-mac-address = <&factory 0x4>;

        port@0 {
            phy-handle = <&phy0>;
            phy-mode = "mii";
        };

        mdio-bus {
            status = "okay";
            phy0: ethernet-phy@0 {
                phy-mode = "mii";
                reg = <0>;
            };
        };
    };

(Last edited by Bracco on 23 Dec 2016, 17:57)

Please show output of commands

swconfig list
swconfig dev switch0 show
123serge123 wrote:

Please show output of commands

swconfig list
swconfig dev switch0 show

there you go. the switch is seen in both initramfs and squashfs images and shows exactly the same configuration when network works and when it doesn't

root@OpenWrt:/# swconfig list
Found: switch0 - eth0
root@OpenWrt:/# swconfig dev switch0 show
Global attributes:
        enable_vlan: 1
        name: IP175D
        phy: 0
        reg: 0
        val: 12544
Port 0:
        status: down, auto-negotiate (in progress)
        link: 0
        tagged: 0
        pvid: 1
Port 1:
        status: up, 10 Mbps, half duplex, auto-negotiate
        link: 10
        tagged: 0
        pvid: 1
Port 2:
        status: down, auto-negotiate (in progress)
        link: 0
        tagged: 0
        pvid: 1
Port 3:
        status: up, 100 Mbps, full duplex, auto-negotiate
        link: 100
        tagged: 0
        pvid: 1
Port 4:
        status: down, auto-negotiate (in progress)
        link: 0
        tagged: 0
        pvid: 2
Port 5:
        status: up, 100 Mbps, cpu port
        link: 100
        tagged: 1
        pvid: 0
VLAN 1:
        vid: 1
        ports: 0 1 2 3 5t
VLAN 2:
        vid: 2
        ports: 4 5t
root@OpenWrt:/#

Previous OpenWrt compatible D-Link that uses an IC+ switch (IP175A) is the DSL-G604T (Texas Instruments TNETD7300).
If there is something related to IP175D maybe could it be useful to compare OpenWrt sources?

i already did some research... ip175D is quite different from other ip175x chips. the only device that has the IP175D is a mikrotik rb433 that is atheros based...

however, i suspect the switch is not the culprit since GPIO pin 24 resets it and resetting it has no effect on the network working state (except that when it works i have to /etc/init.d/network reload to set up vlans again but that's to be expected)

Bracco wrote:

when openwrt boots from flash, both lan&wifi don't work. at all. not even in failsafe mode. they do work perfectly when booting an initramfs

Therefore maybe it could be useful to compare to previous D-Link models: DIR-615 Dx (Ralink RT3052) & Hx (Ralink RT3352): as for other ramips rt305x models, Hx revision has a 3rd OpenWrt image file with "initramfs-uImage" suffix.

For Dx & Hx versions there is also DD-WRT (but on my DIR-615 H1, switch and WAN port have never worked, only WLAN).

DIR-815 Ax D-Link GPL Source Code v1.01 if it needs.

good news big_smile

thanks to Christian Lamparter, which did alot of searching and found out that the current driver just ignores the phy-mode setting and kindly provided me with some fix code to try out, i can say that now the device works.

there's a bit of a catch tho. what i thought were issues caused by poor rom development on d-link's part are actual hardware issues: for example, to get the wifi 2.4Ghz working you have to enable 5Ghz too. and to make them both work i still don't know the right order but it's really messy.

anyway, this device it's what it is, it will be nice enough to have openwrt/lede on it once the driver problem is properly sorted out

ps: i have a dir-615 D1 and it works no problem with OpenWRT CC

(Last edited by Bracco on 25 Dec 2016, 12:42)

Bracco wrote:

current driver just ignores the phy-mode setting
[...]
to get the wifi 2.4Ghz working you have to enable 5Ghz too
[...]
to make them both work i still don't know the right order but it's really messy
[...]
once the driver problem is properly sorted out

What you need to fix it?
Do you think then it will be possible to release your work in the OpenWrt repository?

my work is already online at github
https://github.com/Braccoz/openwrt
i ported it to lede too

however, since to work properly it basically depends on a yet to be finalized driver fix, i am waiting for that to send the pull requests.
you can clone and compile and it will flash and boot but ethernet won't work without the driver fix

(Last edited by Bracco on 26 Dec 2016, 18:20)

Does original driver included in D-Link GPL code work with OpenWrt code?

nope

The discussion might have continued from here.