DWR-921 C3 - Compilation ok but image does not work

Hello everyone,
I just compiled an OpenWrt image for my D-Link DWR-921 C3 router.
The compilation worked.
I then flash my * factory * image file from curl which returns SUCCESS to me.
The problem is that my router does not boot, all the lights are on and no ssh connection possible.
Could you help me please ?
Thank you.
Reynald.

Doesn't the JBOOT web interface work ?

Connect serial, to see what's going on under the hood.

1 Like

Thank you for your reply.
The serial link is in the housing of the DWR-921. I'll see what I can do.
[Doesn't the JBOOT web interface work?]: I tried the web interface but same result.

I compared the start of an openwrt bin file that works with mine and the first bytes are the same, it is a string.
I also compiled the rootfs in tar.gz in order to verify the nature of the executable files and it is indeed a cross-compiler file for mips32 target.

I was able to connect a terminal to the uart of my DWR-321 C3.
Here are the logs:
With a working firmaware:

CTG561DL_0T3 Jboot B923
JRecovery Version R1.2 2020/04/20 11:54
spi device id: ef 40 18 0 0 (40180000)
SPI FLASH: W25Q128FV 16M
.
...........................
Starting kernel @80000000...
[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    0.000000] Board has DDR1
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620N ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DWR-921 C1
[    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

here the log continues ...

With my compilation of firmaware:

CTG561DL_0T3 Jboot B923
JRecovery Version R1.2 2020/04/20 11:54
spi device id: ef 40 18 0 0 (40180000)
SPI FLASH: W25Q128FV 16M
.
...........................
[    0.000000] Linux version 5.4.162 (reynald@reynald) (gcc version 11.2.0 (OpenWrt GCC 11.2.0 r18264-ab241e0937)) #0 Thu Dec 2 1
[    0.000000] Board has DDR1
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620N ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Ralink MT7620A evaluation board```

here the log stop.
We see that in the working firmware, the declared machine is <MIPS: machine is D-Link DWR-921 C1> while in my non-working firmware it is: <MIPS: machine is Ralink MT7620A evaluation board>

So I tried to compile a firmware with the C1 model of the DWR921 but it was not accepted at the start of flashing.

Looks like the problem is with the target setup but I can't find the right combination.
Do you have a suggestion?
Thanks in advance for your help.
Reynald

In fact, it is the selection of the devicetree that does not offer the right platform.

Conclusion: I have compiled an image for DWR-921 C1 to flash my C3.
In order for the firmware to be accepted by jboot, it is necessary to modify the ROMID in ./target/linux/ramips/image/mt7620.mk of target C1, by placing the ROMID of C3 there.
This is if it can help ...

1 Like