No firmware (uImage) generation for MT7621

Hello! I am newbie and trying to make a simple uImage firmware for my router based on mediatek chip (MT7621). I am using 18.06.2 OpenWRT. Make was succsessful with no errors. It was done with intuctions from But there is extremly no uImage file in /bin/ folder. Also there is no generic initramfs-kernel.bin, squashfs-factory.bin, squashfs-factory.dlf, initramfs-uImage.bin as described in doc " Firmware image names". There is only some bins called "openwrt-ramips-mt7621-wndr3700v5-initramfs-kernel.bin" (a lot of them) which seems can not be used by an U-boot.
Which file should I load through the U-boot to the router to make it works?
Thanks a lot!

1 Like

The firmware is both chip- and board-specific. Not all boards based on an MT7621 are "wired" the same. Which router are you using?

Thank for reply. It's not a typical router. I have this .It has MT7621AT with MT7603EN, MT7610EN wlans. I'm not sure if OpenWRT supports my stuff, but I want to try a generic version.

There isn't a "generic" version of things, as every manufacturer decides just how to wire up the board. Each variant requires different GPIOs, different partitioning of the flash, ... It's not like a PC where there is a standard way for the kernel to be able to configure itself based on the BIOS and scanning the busses.

With a cheap "clone", they may be using a reference design so that it might work with a different board, but that's a crap shoot, at best.

You might get a kernel and serial running using an initramfs image, loaded to RAM and booted through the boot loader. What are the options presented by U-Boot?

1 Like

Oh i see that.

Uboot has typical commands like 1: Load system code to SDRAM via TFTP. 2: Load system code then write to Flash via TFTP. etc.

So i should find the correct initramfs image for my "clone". But how?

If you have serial access.... / telnet....

You want to inspect the OEM image with binwalk etc.

Get a full backup of the flash then mount it as a loop device on linux etc.....

From there you'll be able to work out the exact format etc.

One directory up from the kernel source directory in the build root..... You will find a few other .bin files etc.....


You could just execute all of them via tftpload etc. and see which one works...... you need to find the syntax for your device.... it's definitely a few days work..... worthwhile tho' when it comes to future modding and recovery.....

Assuming you've got the ability in U-Boot to

  • Load image via TFTP to RAM directly
  • Start an image in RAM

then you should be able to test out initramfs-based images without risking loss of flash information.

My first priorities would be to

  • Get the OEM partition map from console before doing anything else
  • If possible with OEM firmware, back up all the flash partitions
  • Get the information about drivers being loaded and their parameters from the OEM console/dmesg

Then start matching against existing MT7621 devices, either starting through the ToH on the wiki, or going directly to the ~50 boards that are already defined for that chip

find target/linux/ramips/dts -name '*.dts' -exec fgrep -l 7621 {} \;

and start looking at the hardware defined and seeing if there is any close match

It seems that its not easy to find out appropriate firmware for clone. But there is no other way.

Very thanks for help!