Trendnet TEW-810DR mtd partition

Thanks. Fortunately, Ebay covers fake items but I will have to jump through alot of hoops.

You are covered by the eBay Money Back Guarantee if you receive an item that is not as described in the listing.

If and when it arrives, I'll open it up and look at the chips. If they look valid, will look at the serial ttl bootlog and pull the *bin from the flash chip.

I modified

&gsw {
             mediatek,port4 = "ephy4"
};

I was restoring my router by flashing back the factory image and using the factory U-boot to tftp flash the OpenWRT image. Can I directly flash the OpenWRT image?

What do you mean?

Bricked router (not accepting U-boot commands --programmer flash of OEM pull from flashchip --> router with OEM firmware --tftp serial flash from OEM U-boot --> router w/ OpenWrt

vs

Bricked router --programmer flash of OpenWRT--> router w/ OpenWrt

Just found this
https://openwrt.org/toh/tp-link/td-w9980

Upload the U-Boot Image from another terminal via:

# cat u-boot.asc > /dev/ttyUSB0
Watch the loading progress via the console and wait a few minutes until it boots the U-Boot file.

Interrupt booting by pressing “t” key several times.

Disconnect the R225 pin from GND. Though you can keep it there until the flashing is done.

Flash Firmware

Now we need to upload the new firmware via tftp and erase the OEM firmware via the following commands:

tftp $(loadaddr) openwrt-18.06.1-lantiq-xrx200-tplink_tdw8980-squashfs-sysupgrade.bin
# Note: If you get timeouts (T) executing this command, you probably did not set up the networking/tftpd correctly or your ethernet cable is bad.
sf erase 0x20000 0x7a0000
sf write $(loadaddr) 0x20000 0x$(filesize)
reset

For this procedure you need prepare special flash dump. Cut 0x170000 bytes of orignal dump, append openwrt sysupgrade.bin image and if needed pad upto 8 Mbytes.

I've have a backup router up 'n running and tested an initramfs image built in todays Master git pull


U-Boot 1.1.3 (Jan 17 2013 - 10:14:35)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83f98000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29 
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D

MAC: d8:eb:97:2c:9a:8f
============================================ 
Ralink UBoot Version: 4.1.1.0
TEW-810DR(1.00b02)
-------------------------------------------- 
ASIC 7620_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Jan 17 2013  Time:10:14:35
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size =64 Mbytes

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 4

 0 

   
4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Jan 17 2013 - 10:14:35)
MT7620 # printenv
bootcmd=tftp
bootdelay=3
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
serverip=192.168.0.100
DEVELOP=1
HW_BOARD_MODEL=TEW-810DR
SSID0=TRENDnet810_2.4GHz_YSVQ
SSID1=TRENDnet810_5GHz_YSVQ
KEY0=81031000778
KEY1=81031000778
HW_BOARD_REV=1.0R
CountryRegion=FCC
CountryRegionABand=US/NA
DPWD=C2ZC4Z8A
WSC_PIN=29095896
ipaddr=192.168.10.1
stdin=serial
stdout=serial
stderr=serial

Environment size: 371/4092 bytes
MT7620 # setenv serverip 192.168.10.100
MT7620 # tftpboot 0x81000000 bootm     test.bin

 netboot_common, argc= 3 

 NetTxPacket = 0x83FD3180 

 KSEG1ADDR(NetTxPacket) = 0xA3FD3180 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!! 
TFTP from server 192.168.10.100; our IP address is 192.168.10.1
Filename 'test.bin'.

 TIMEOUT_COUNT=10,Load address: 0x81000000
Loading: *Got ARP REPLY, set server/gtwy eth addr (a8:a1:59:00:28:76)
Got it
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################
done
Bytes transferred = 4122145 (3ee621 hex)
NetBootFileXferSize= 003ee621
MT7620 # bootm 0x81000000
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.176
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    4122081 Bytes =  3.9 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 4.14.176 (jsh@Kanga) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13138-3a79e3b185)) #0 Tue May 5 11:09:19 2020
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is TRENDnet TEW-810DR
[    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 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 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+0x98/0x4a0 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    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] Writing ErrCtl register=00064fd6
[    0.000000] Readback ErrCtl register=00064fd6
[    0.000000] Memory: 55992K/65536K available (3922K kernel code, 190K rwdata, 896K rodata, 3560K init, 212K bss, 9544K 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: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000011] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015469] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087723] pid_max: default: 32768 minimum: 301
[    0.097177] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110202] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.131244] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.150738] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.162945] pinctrl core: initialized pinctrl subsystem
[    0.173789] NET: Registered protocol family 16
[    0.185497] rt2880-pinmux pinctrl: error claiming hogs: -22
[    0.196482] rt2880-pinmux pinctrl: could not claim hogs: -22
[    0.207780] rt2880-pinmux: probe of pinctrl failed with error -22
[    0.225281] mt7620-pci 10140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    0.261414] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.272451] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.285034] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.296028] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.312823] clocksource: Switched to clocksource systick
[    0.324624] NET: Registered protocol family 2
[    0.334106] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.347890] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.360475] TCP: Hash tables configured (established 1024 bind 1024)
[    0.373260] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.384780] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.397551] NET: Registered protocol family 1
[    2.662812] random: fast init done
[    4.998294] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    5.011094] Crashlog allocated RAM at address 0x3f00000
[    5.023421] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    5.043496] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.055001] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.112681] io scheduler noop registered
[    5.120391] io scheduler deadline registered (default)
[    5.131360] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.144716] of_serial 10000c00.uartlite: could not find pctldev for node /pinctrl/uartlite, deferring probe
[    5.165038] spi-rt2880 10000b00.spi: could not find pctldev for node /pinctrl/spi_pins, deferring probe
[    5.184349] libphy: Fixed MDIO Bus: probed
[    5.203377] gsw: setting port4 to ephy mode
[    5.211579] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 3 link up (100Mbps/Full duplex)
[    5.229786] mtk_soc_eth 10100000.ethernet: generated random MAC address ae:d0:60:f4:e8:68
[    5.246093] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    5.258476] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    5.275343] rt2880_wdt 10000120.watchdog: Initialized
[    5.286706] NET: Registered protocol family 10
[    5.299537] Segment Routing with IPv6
[    5.306842] NET: Registered protocol family 17
[    5.315614] 8021q: 802.1Q VLAN Support v1.8
[    5.324571] mt7620-pci 10140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    5.342816] of_serial 10000c00.uartlite: could not find pctldev for node /pinctrl/uartlite, deferring probe
[    5.362188] spi-rt2880 10000b00.spi: could not find pctldev for node /pinctrl/spi_pins, deferring probe
[    5.382321] Warning: unable to open an initial console.
[    5.411977] Freeing unused kernel memory: 3560K
[    5.420851] This architecture does not have kernel memory protection.
[    5.448775] init: Console is alive
[    5.455840] init: - watchdog -
[    5.487792] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.503218] gpio-keys-polled keys: unable to claim gpio 1, err=-517
[    5.518282] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.534765] init: - preinit -
[    5.811505] random: jshn: uninitialized urandom read (4 bytes read)
[    5.908080] random: jshn: uninitialized urandom read (4 bytes read)
[    6.156388] random: jshn: uninitialized urandom read (4 bytes read)
[    6.593042] 8021q: adding VLAN 0 to HW filter on device eth0
[    8.816417] procd: - early -
[    8.822099] procd: - watchdog -
[    8.918695] procd: - watchdog -
[    8.925071] procd: failed to set stdio: No such device
[    8.935298] procd: - ubus -
[    8.948573] urandom_read: 5 callbacks suppressed
[    8.948583] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.973856] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.988094] procd: - init -
[    9.532462] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.580133] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.618482] Loading modules backported from Linux version v5.4.27-0-g585e0cc08069
[    9.633286] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
[    9.679867] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.715648] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.859500] xt_time: kernel timezone is -0000
[   10.022654] PPP generic driver version 2.4.2
[   10.049627] NET: Registered protocol family 24
[   10.099152] urngd: jent-rng init failed, err: 2
[   10.123866] rt2800_wmac 10180000.wmac: could not find pctldev for node /pinctrl/pa, deferring probe
[   10.143376] kmodloader: done loading kernel modules from /etc/modules.d/*
[   35.349140] 8021q: adding VLAN 0 to HW filter on device eth0
[   35.384397] br-lan: port 1(eth0.1) entered blocking state
[   35.395239] br-lan: port 1(eth0.1) entered disabled state
[   35.406237] device eth0.1 entered promiscuous mode
[   35.415657] device eth0 entered promiscuous mode
[   35.506861] br-lan: port 1(eth0.1) entered blocking state
[   35.517476] br-lan: port 1(eth0.1) entered forwarding state
[   35.528770] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   36.407212] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   47.957483] random: crng init done

Is this ready to try to install? Could you help with install guidance?

No. Something wrong with gpio. And spi/wmac controllers do not start correctly.

I based the *dts on your 19.07.1 dts and tried to update to Master. Device names and the jffs partition size were changed. I am also concerned about all the devices in
ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf", "ephy";
They were in your dts and some had been removed in Master.

/dts-v1/;

#include "mt7620a.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
	model = "TRENDnet TEW-810DR";

	aliases {
		led-boot = &led_power_green;
		led-failsafe = &led_power_green;
		led-running = &led_power_green;
		led-upgrade = &led_power_green;
		label-mac-device = &ethernet;
	};

	keys {
		compatible = "gpio-keys-polled";
		poll-interval = <20>;

		reset {
			label = "reset";
			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led_power_green: power_green {
			label = "tew-810dr:green:power";
			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		};

		wan {
			label = "tew-810dr:orange:wan";
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
		};

		lan {
			label = "tew-810dr:green:lan";
			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
		};

		power_orange {
			label = "tew-810dr:orange:power";
			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
		};
	};
};

&spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <10000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x30000>;
				read-only;
			};

			partition@30000 {
				label = "u-boot-env";
				reg = <0x30000 0x10000>;
				read-only;
			};

			factory: partition@40000 {
				label = "factory";
				reg = <0x40000 0x10000>;
				read-only;
			};

			factory5g: partition@50000 {
				label = "factory5g";
				reg = <0x50000 0x10000>;
				read-only;
			};

			partition@60000 {
				label = "Wolf_Config";
				reg = <0x60000 0x10000>;
				read-only;
			};

			partition@70000 {
				label = "MyDlink";
				reg = <0x70000 0x80000>;
				read-only;
			};

			partition@e0000 {
				label = "Jffs2";
				reg = <0xf0000 0x80000>;
				read-only;
			};

			partition@170000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x170000 0x690000>;
			};
		};
	};
};

&pinctrl {
	state_default: pinctrl0 {
		gpio {
			ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf", "ephy";
			ralink,function = "gpio";
		};
	};
};

&ethernet {
	mtd-mac-address = <&factory 0x28>;
	mediatek,portmap = "llllw";
};

&gsw {
	mediatek,port4 = "ephy";
};

&pcie {
	status = "okay";
};

&wmac {
	pinctrl-names = "default";
	pinctrl-0 = <&pa_pins>;

        ralink,mtd-eeprom = <&factory 0x0>;
	mtd-mac-address = <&factory 0x28>;
};

&pcie0 {
	wifi@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
		mtd-mac-address = <&factory 0x28>;
		mtd-mac-address-increment = <2>;
	};
};

&gpio2 {
	status = "okay";
};

GPIO pin control was changed.
Edit dts-file: replace

&pinctrl {
	state_default: pinctrl0 {
		gpio {
			ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf", "ephy";
			ralink,function = "gpio";
		};
	};
};

with

&state_default {
	gpio {
		groups = "mdio", "rgmii1", "i2c", "wled", "uartf", "ephy";
		function = "gpio";
	};
};
1 Like

This looks better - initramfs booted all the way to the prompt.

U-Boot 1.1.3 (Jan 17 2013 - 10:14:35)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83f98000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29 
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D

MAC: d8:eb:97:2c:9a:8f
============================================ 
Ralink UBoot Version: 4.1.1.0
TEW-810DR(1.00b02)
-------------------------------------------- 
ASIC 7620_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Jan 17 2013  Time:10:14:35
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size =64 Mbytes

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 4

0 

   
4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Jan 17 2013 - 10:14:35)
MT7620 # setenv serverip 192.168.10.100
MT7620 # tftpboot 0x81000000 test.bin

 netboot_common, argc= 3 

 NetTxPacket = 0x83FD3180 

 KSEG1ADDR(NetTxPacket) = 0xA3FD3180 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!! 
TFTP from server 192.168.10.100; our IP address is 192.168.10.1
Filename 'test.bin'.

 TIMEOUT_COUNT=10,Load address: 0x81000000
Loading: *Got ARP REPLY, set server/gtwy eth addr (a8:a1:59:00:28:76)
Got it
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################
done
Bytes transferred = 4122440 (3ee748 hex)
NetBootFileXferSize= 003ee748
MT7620 # bootm
## Booting image at 81000000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.176
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    4122376 Bytes =  3.9 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 4.14.176 (jsh@Kanga) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13138-3a79e3b185)) #0 Wed May 6 15:50:31 2020
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is TRENDnet TEW-810DR
[    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 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 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+0x98/0x4a0 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    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] Writing ErrCtl register=00064fd6
[    0.000000] Readback ErrCtl register=00064fd6
[    0.000000] Memory: 55992K/65536K available (3922K kernel code, 190K rwdata, 896K rodata, 3560K init, 212K bss, 9544K 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: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000011] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015469] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087706] pid_max: default: 32768 minimum: 301
[    0.097160] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110184] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.131210] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.150703] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.162911] pinctrl core: initialized pinctrl subsystem
[    0.173758] NET: Registered protocol family 16
[    0.666007] PCI host bridge /pcie@10140000 ranges:
[    0.675406]  MEM 0x0000000020000000..0x000000002fffffff
[    0.685778]   IO 0x0000000010160000..0x000000001016ffff
[    0.714669] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.725708] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.738287] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.749283] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.762373] PCI host bridge to bus 0000:00
[    0.770372] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.784090] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.795818] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.809317] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.825542] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.842534] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.855587] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.869402] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.882902] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.896413] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.909908] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.923406] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.933255] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.951501] clocksource: Switched to clocksource systick
[    0.963317] NET: Registered protocol family 2
[    0.972771] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.986551] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.999137] TCP: Hash tables configured (established 1024 bind 1024)
[    1.011923] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.023446] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.036210] NET: Registered protocol family 1
[    2.871495] random: fast init done
[    5.637407] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    5.650209] Crashlog allocated RAM at address 0x3f00000
[    5.662498] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    5.682556] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.694061] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.751777] io scheduler noop registered
[    5.759420] io scheduler deadline registered (default)
[    5.770502] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.784197] console [ttyS0] disabled
[    5.791191] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    5.810964] console [ttyS0] enabled
[    5.810964] console [ttyS0] enabled
[    5.824736] bootconsole [early0] disabled
[    5.824736] bootconsole [early0] disabled
[    5.846383] spi spi0.0: force spi mode3
[    5.854918] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    5.864760] 8 fixed-partitions partitions found on MTD device spi0.0
[    5.877425] Creating 8 MTD partitions on "spi0.0":
[    5.886995] 0x000000000000-0x000000030000 : "u-boot"
[    5.897859] 0x000000030000-0x000000040000 : "u-boot-env"
[    5.909428] 0x000000040000-0x000000050000 : "factory"
[    5.920480] 0x000000050000-0x000000060000 : "factory5g"
[    5.931903] 0x000000060000-0x000000070000 : "Wolf_Config"
[    5.943612] 0x000000070000-0x0000000f0000 : "MyDlink"
[    5.954623] 0x0000000f0000-0x000000170000 : "Jffs2"
[    5.965319] 0x000000170000-0x000000800000 : "firmware"
[    5.990075] libphy: Fixed MDIO Bus: probed
[    6.007032] gsw: setting port4 to ephy mode
[    6.015446] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 3 link up (100Mbps/Full duplex)
[    6.033904] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    6.046429] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    6.063476] rt2880_wdt 10000120.watchdog: Initialized
[    6.074969] NET: Registered protocol family 10
[    6.088048] Segment Routing with IPv6
[    6.095540] NET: Registered protocol family 17
[    6.104492] 8021q: 802.1Q VLAN Support v1.8
[    6.134827] Freeing unused kernel memory: 3560K
[    6.143893] This architecture does not have kernel memory protection.
[    6.173477] init: Console is alive
[    6.180499] init: - watchdog -
[    6.212723] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.232806] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.249206] init: - preinit -
[    6.526441] random: jshn: uninitialized urandom read (4 bytes read)
[    6.624783] random: jshn: uninitialized urandom read (4 bytes read)
[    6.907392] random: jshn: uninitialized urandom read (4 bytes read)
[    7.342591] 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.949934] procd: - early -
[    7.955897] procd: - watchdog -
[    8.088470] procd: - watchdog -
[    8.095176] procd: - ubus -
[    8.108596] urandom_read: 5 callbacks suppressed
[    8.108606] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.134171] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.148559] procd: - init -
Please press Enter to activate this console.
[    8.690201] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.734144] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.779600] Loading modules backported from Linux version v5.4.27-0-g585e0cc08069
[    8.794584] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
[    8.839394] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.872251] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.013736] xt_time: kernel timezone is -0000
[    9.172251] PPP generic driver version 2.4.2
[    9.197657] NET: Registered protocol family 24
[    9.232864] urngd: jent-rng init failed, err: 2
[    9.247195] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    9.259797] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[    9.273233] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[    9.314997] mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00
[    9.377370] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    9.391856] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    9.437650] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.477928] kmodloader: done loading kernel modules from /etc/modules.d/*
[   27.519387] 8021q: adding VLAN 0 to HW filter on device eth0
[   27.555083] br-lan: port 1(eth0.1) entered blocking state
[   27.565937] br-lan: port 1(eth0.1) entered disabled state
[   27.577086] device eth0.1 entered promiscuous mode
[   27.586684] device eth0 entered promiscuous mode
[   27.675263] br-lan: port 1(eth0.1) entered blocking state
[   27.686090] br-lan: port 1(eth0.1) entered forwarding state
[   27.697430] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   28.584058] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



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

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r13151-c3a43753b9
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# 

My guess as to how to load.

  1. U-boot 4 command line
  2. tftpboot 0x82000000 firmware.bin
  3. erase bc690000 170000
  4. cp.b 0x82000000 bc690000
  5. reset
    ?

If your initramfs image work correctly you can flash firmware.bin from its web interface.
As for loading and flashing from uboot. Steps are right but some parameters are incorrect.

tftpboot 0x82000000 firmware.bin
erase bc170000 690000
cp.b 0x82000000 bc170000 690000
reset

See details:

1 Like

The erase and cp command syntax was not accepted by Trendnets U-Boot and I did not explore it further. I loaded the image from the initramfs web interface without issue and it is running well. LEDs and MAC look good. Wireless N/AC works but AC range is poor with the internal antennae.

I'll try to submit to openwrt.git today.

Thanks for all your help.

Good luck!

I did submit a patch but it does not seem to be drawing any attention. I'd submitted earlier and the reviewer wanted a *dtsi to cover the D-Link DIR-810L (same Cameo Manfactured board). I do not have a D-Link and think it is inappropriate to make changes on device I do not have and cannot test.

On another note, 19.07.3 was tagged and in general, I like to run release versions. I'm looking at building the TEW-810DR in a 19.07.3 tag. You described a problem with 19.07.2 which was reverted. Are you aware of any ramips issues with 19.07.3? Any recommended changes in your *dts?

19.07.3 is not even officially released.

I have a git pull tagged at 19.07.3. I was asking because @123serge123, who was extremely helpful in getting this device to build, was using 19.07.1 because of an mtd-parser issue in 19.07.2.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=fdfca33350150644481096f1c7a80db2b670cdec

I would think that community builds would be encouraged after a release is tagged so bugs can be reported prior to release builds.

No. No. :slight_smile:

Well, my submission was finally looked at:
http://lists.infradead.org/pipermail/openwrt-devel/2020-May/023571.html

Some of the reviewer's comments could also be applied to the D-Link DIR-810L, a device the reviewer has made commits. I have some Sunday chores, I'll try to address the comments later.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=168e4c91d890da9d27ce562a67fe962bfe0f3a41

This was a team effort and, in no small part, due to your help.
:grinning:

1 Like

Congratulations! :smile: