There are probably some hints in the old dev thread. You should read that and see if you can continue the work where it stopped. Supporting new MT7621 devices is pretty easy in general, but there are always some device specific stuff to figure out. Like GPIOs for buttons/LEDs. Or vendor specfici boot loader extensions like dual partition etc.
First try to get access to the serial console. This is required to continue.
Make sure you can access the boot loader, stopping boot and interacting with it. Try to load and boot an initramfs from RAM. Either one you've prepared for that router, or just try some other MT7621 image to start exploring the hardware. Be careful not to do any unintentional flash writes.
Save console logs showing both a complete OEM firmware boot and an OpenWrt boot.
Do not write anything to flash until you are ready for that. Boot your experimental images from RAM until you are 110% sure they work and have the proper partition layout etc.
And then inspect a few of the interesting commits closer by doing e.g.
git show 13308161788c98ae6cd48c22b13339fdb8c77130
git show a0b7fef0ffe4cd9cca39a652a37e4f3ce8f0a681
etc. Not everything there will be relevant for your device of course, but it should give you some idea. Make sure to look at more than those two commits. There are plenty of examples.
Creating the DTS is the most important part, since it describes all the hardware including the flash layout. Find a similar device to use as a template. The closer it matches, the less work you'll have to do.
In vendor dts-file only 2 gpio were defined: reset button and wlan led.
So you have to define it yourself.
LAN/WAN ports number must be checked too.
But all these enough to build test image.
help
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootm - boot application image from memory
bootmenu- ANSI terminal bootmenu
bootp - boot image via network using BOOTP/TFTP protocol
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
fdt - flattened device tree utility commands
go - start application at address 'addr'
gpio - query and control gpio pins
help - print command description/usage
httpd - Start failsafe HTTP server
iminfo - print header information for application image
itest - return true/false on integer compare
ledtest - MediaTek gpio led test
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mtkautoboot- Display MediaTek bootmenu
mtkboardboot- Boot MTK firmware
mtkload - MTK image loading utility
mtkupgrade- MTK firmware/bootloader upgrading utility
mw - memory write (fill)
nm - memory modify (constant address)
printenv- print environment variables
reset - Perform RESET of the CPU
run 0- run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
setmac - save new MAC address in FLASH
xx:xx:xx:xx:xx:xx [serial-no] [pin-code]
- change MAC address stored in FLASH (xx - value in hex format)
sf - SPI flash sub-system
sleep - delay execution for some time
source - run script from memory
tftpboot- boot image via network using TFTP protocol
version - print monitor, compiler and linker version