Standard OpenWrt on Chinese device with custom build: Ralink MT7620a + MT7610e evaluation board

I'm not sure if this will help but you forgot about one partition named config, which was available in older openwrt image at 0x5000 maybe. You may need it for wifi to work?

See this:

Ah - schoolboy error - the wifi was disabled in config :slight_smile: Seems to be OK at the moment...

Still interested in what would happen were I to want to load openWrt on in the future though without having to edit the memory locations by hand...

This would have to be done in the bootloader. It depends on what is built into your particular build of uboot. If it has a saveenv command that actually works you can change bootcmd to 'bootm 0xbc050000' and it would then boot from the standard place. Then you can manually load a regular build there. You'd only have to manually load once, a sysupgrade would flash to the proper place.

Your hacked build has the partition table kind of screwy anyway.

Good and bad news...

I do have a saveenv, which seems to be persistent, but when I try to load new firmware manually I still see:

## Booting image at bc060000 ...

Full dump below:

MT7620 # printenv
bootdelay=5
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
filesize=3802d6
fileaddr=80A00000
ipaddr=10.10.10.123
serverip=10.10.10.3
autostart=no
bootfile=test.bin
bootcmd=bootm 0xbc050000
stdin=serial
stdout=serial
stderr=serial

Environment size: 226/4092 bytes
MT7620 # tftp

 netboot_common, argc= 1 

 NetTxPacket = 0x87FE4A00 

 KSEG1ADDR(NetTxPacket) = 0xA7FE4A00 

 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 10.10.10.3; our IP address is 10.10.10.123
Filename 'test.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (1c:39:47:da:8f:4b)
Got it
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ######################################################
done
Bytes transferred = 3932332 (3c00ac hex)
NetBootFileXferSize= 003c00ac
MT7620 # boot
## Booting image at 80100000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.95
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1437435 Bytes =  1.4 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover


U-Boot 1.1.3 (Jul 20 2016 - 01:03:47)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87fb8000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 29 
spi device id: ef 40 18 0 0 (40180000)
find flash: W25Q128BV
raspi_read: from:30000 len:1000 
raspi_read: from:30000 len:1000 
============================================ 
Ralink UBoot Version: 4.3.0.0
-------------------------------------------- 
ASIC 7620_MP (Port5<->None)
DRAM_CONF_FROM: Auto-detection 
DRAM_TYPE: DDR2 
DRAM component: 1024 Mbits
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:Jul 20 2016  Time:01:03:47
============================================ 
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 =128 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. 
 0 
   
3: System Boot system code via Flash.
## Booting image at bc060000 ...
raspi_read: from:60000 len:40 
   Image Name:   MIPS OpenWrt Linux-4.14.95
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1437435 Bytes =  1.4 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:60040 len:15eefb 
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.14.95 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7627-753531d)) #0 Mon Jan 28 08:54:32 2019
[    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 Ralink MT7620a + MT7610e evaluation board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 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-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from 0x8042472c with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00040000
[    0.000000] Readback ErrCtl register=00040000
[    0.000000] Memory: 125212K/131072K available (3590K kernel code, 178K rwdata, 464K rodata, 176K init, 214K bss, 5860K 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.000013] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015479] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087714] pid_max: default: 32768 minimum: 301
[    0.097141] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110160] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.130143] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149622] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.161801] pinctrl core: initialized pinctrl subsystem
[    0.173440] NET: Registered protocol family 16
[    0.186975] Can't analyze schedule() prologue at 8037d498
[    0.450666] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.463893] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.493802] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.504833] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.521199] clocksource: Switched to clocksource systick
[    0.532834] NET: Registered protocol family 2
[    0.542417] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.556194] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.568783] TCP: Hash tables configured (established 1024 bind 1024)
[    0.581555] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.593060] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.605761] NET: Registered protocol family 1
[    0.617087] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.629827] Crashlog allocated RAM at address 0x3f00000
[    0.642058] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.660773] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.672267] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.702252] io scheduler noop registered
[    0.709897] io scheduler deadline registered (default)
[    0.721101] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.736544] console [ttyS0] disabled
[    0.743597] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.763264] console [ttyS0] enabled
[    0.763264] console [ttyS0] enabled
[    0.777085] bootconsole [early0] disabled
[    0.777085] bootconsole [early0] disabled
[    0.793666] cacheinfo: Failed to find cpu0 device node
[    0.803942] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.823591] spi spi0.0: force spi mode3
[    0.842309] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.851744] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.864403] Creating 4 MTD partitions on "spi0.0":
[    0.873962] 0x000000000000-0x000000030000 : "u-boot"
[    0.884808] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.896335] 0x000000040000-0x000000050000 : "factory"
[    0.907309] 0x000000050000-0x000000800000 : "firmware"
[    1.851459] libphy: Fixed MDIO Bus: probed
[    1.861775] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 0 link up (100Mbps/Full duplex)
[    1.880017] mtk_soc_eth 10100000.ethernet: generated random MAC address 16:6e:5e:11:07:7a
[    1.896490] libphy: mdio: probed
[    1.906067] mdio_bus mdio-bus: MDIO device at address 5 is missing.
[    1.918902] mtk_soc_eth 10100000.ethernet: connected port 4 to PHY at mdio-bus:04 [uid=03a2940d, driver=Generic PHY]
[    1.940018] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.952474] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.969491] rt2880_wdt 10000120.watchdog: Initialized
[    1.980981] NET: Registered protocol family 10
[    1.994295] Segment Routing with IPv6
[    2.001774] NET: Registered protocol family 17
[    2.010683] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.036517] 8021q: 802.1Q VLAN Support v1.8
[    2.047648] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    2.062626] Please append a correct "root=" boot option; here are the available partitions:
[    2.079282] 1f00             192 mtdblock0 
[    2.079287]  (driver?)
[    2.092326] 1f01              64 mtdblock1 
[    2.092330]  (driver?)
[    2.105352] 1f02              64 mtdblock2 
[    2.105356]  (driver?)
[    2.118387] 1f03            7872 mtdblock3 
[    2.118391]  (driver?)
[    2.131421] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    2.148959] Rebooting in 1 seconds..


U-Boot 1.1.3 (Jul 20 2016 - 01:03:47)

I have seen this before. They hard-coded the bootm in the bootloader, ignoring the environment completely.

If you dump the bootloader to a file then examine it with a hex editor you may find it. In my case it was in a block of ASCII text along with error messages. There was also a block at the end which is the default environment variables, but patching that didn't change anything since it doesn't use the environment bootcmd in any case.

Wouldn't it be better to replace the bootloader completely with a new one? The one which works with OpenWrt. Going through the hassle of editing it may put the device at risk if the bootloader gets corrupted.

I did look at doing this - but looking at the config files for u-boot, couldn't see anything for the MT-7620A

But looking at the config files, it looked possible that that for the MT-7688 might be compatible....?

Thanks. Yes, there seem to be some openWRT forks with SI3226 support, but nothing current.

It's a pity, since the network is a lot more stable on the newer openWRT, but the hope was to use this as an ATA so I may have to rely on the official firmware!

Sorry for bothering you and reviving the thread.

Did you have any success with this device in the meantime?