HLK-RM08A-KIT-V2.5 upgrade options

https://openwrt.org/docs/guide-developer/start would probably be a good place to start.

openwrt source is available on github - https://github.com/openwrt/

I m sorry but what is this?

https://firmware-selector.openwrt.org/?version=21.02.0-rc3&target=ramips%2Fmt76x8&id=mediatek_mt7628an-eval-board

Is that something that i can use?

You'll still need serial .... :wink:

Could be, @slh might have a different opinion though :slight_smile:

Sorry, i forgot to confirm.
Serial is up and running.
I connect to it using a USB-to-serial adapter and via a linux distro inside a VM.
I used application screen to connect to the board.
The boot process is visible up to the point where i get system prompt.
Before reaching system prompt though i get U-boot options to select from.

info id : ef info->jedec_id :40160000 buf[1]:40 buf[2]:19
info id : ef info->jedec_id :40170000 buf[1]:40 buf[2]:19
info id : ef info->jedec_id :40180000 buf[1]:40 buf[2]:19
info id : ef info->jedec_id :40190000 buf[1]:40 buf[2]:19
find flash: W25Q256FV
*** Warning - bad CRC, using default environment

============================================ 
Ralink UBoot Version: 1.0
-------------------------------------------- 
ASIC 7628_MP (Port5<->None)
DRAM component: 1024 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 128 MBytes
Flash component: SPI Flash
Date:May 23 2020  Time:14:42:28
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 
RESET MT7628 PHY!!!!!!

-------------------------------------------------------------------------
             https://github.com/gnubee-git
-------------7628N build May 23 2020 14:42:28--------------------
-------------------------------------------------------------------------

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.
   5: Load system code then write to Flash via Httpd.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP.                                                                                                                                                                                   8 
You chose 4
                                                                                                                                                                                                                                            0 

   
4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (May 23 2020 - 14:42:28)
MT7628 #

I have no idea what to do next. Been searching all morning....
Although i have a decent understanding of linux (been using it for 10 years) openwrt is different in a few ways. File system for starters, it is not partitioned the way a normal pc linux installation is and so on.

Could that image be something i can try?

if it's a regular u-boot, you can always enter help :wink:

depending on the u-boot capabilities, you should make a partition(s) backup or flash dump, before you try to boot something else.

if you have a flash large enough, you could in theory have two parallell openwrt setups running.

I have seen U-boot in my ex-job but that was it. I never really did anything with it on a programmatical level.

entering 'help' gives me:

?       - alias for 'help'
bootm   - boot application image from memory
cp      - memory copy
crc32   - checksum calculation
erase   - erase SPI FLASH memory
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
flash_always_3byte always switch to 3byte
flash_always_4byte always switch to 4byte
flash_exit_4byte exit to 4byte
flash_to_4byte switch to 4byte
go      - start application at address 'addr'
help    - print online help
loadb   - load binary file over serial line (kermit mode)
md      - memory display
mdio   - Ralink PHY register R/W command !!
mm      - memory modify (auto-incrementing)
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset   - Perform RESET of the CPU
rf      - read/write rf register
saveenv - save environment variables to persistent storage
setenv  - set environment variables
spi     - spi command
spi_read_sr read Status Register
switch  - rt3052 embedded switch command
tftpboot- boot image via network using TFTP protocol
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version

Regarding the link:
https://firmware-selector.openwrt.org/?version=21.02-SNAPSHOT&target=ramips%2Fmt76x8&id=mediatek_mt7628an-eval-board

When i go over the sysupgrade button i see this:

"Use a Sysupgrade image to update a router that already runs OpenWrt. The image can be used with the LuCI web interface or the terminal."

Shall i assume that using the current openwrt back/flash firmware page will let me upload the sysupgrade file to the devkit and do the upgrade?

it'll probably let you upgrade, but you shouldn't assume it'll come back up ... :wink:

I see it seems to support usbboot, it might also be a way forward...

I am confused, what will this image file overwrite? The squash fs?
Will the U-boot stay intact?

yes, the openwrt environment should be replaced/upgraded, uboot should be left intact.

ok now this is weird.

I was searching at:

https://firmware-selector.openwrt.org/

and when i typed 7628 i got 3 options and one of them was the exact dev kit i have.

Is that firmware targeting my dev kit?

Shall i use the current openwrt webgui to flash the board with the sysupgrade file?

unknown, you'd have to find the introductionary commit on github, it usually mentions the device(s) covered.
https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=HLK-7628N

CPU:       MT7628 580 MHz. MIPS 24K
RAM:       128 MB
Flash:     32 MB
WIFI:      802.11n/g/b 20/40 MHz
Ethernet:  5 Port ethernet switch
UART:      2x

does it sound like your device ?

you could try the sysupgrade image, but be prepared for the worst :wink:

https://www.alibaba.com/trade/search?fsb=y&IndexArea=product_en&CatId=&SearchText=hlk-7628n

Both the model and company are correct.

What could go wrong if not "everything" ? :slight_smile:

well, as long as u-boot is intact, it can be recovered, but that assumes you actually have something to use for recovery .... :wink:

So sure, it'll not be dead per se, but still unusable :slight_smile:

Unfortunately devkit seems dead but it is weird because after flashing commenced, i waited for maybe 5 minutes and then page reloaded and voila the luci 21.02 showed up. I navigated through some pages and all of them seemed to load.
Later on, i unplugged the devkit from the power and when i re-plugged everything seems dead and that includes serial :frowning:

What do you think?

As i said page reloaded by it self. I did not touch it. Checksum was also ok - i checked.

https://firmware-selector.openwrt.org/?version=21.02-SNAPSHOT&target=ramips%2Fmt76x8&id=hilink_hlk-7628n

The name of the file i uploaded is:
openwrt-21.02-snapshot-r16199-ab5010d170-ramips-mt76x8-hilink_hlk-7628n-squashfs-sysupgrade.bin

Any ideas what went wrong?

nope, serial would/could have shed some light, if you had it on during flashing.

But if it's dead, JTAG would be the only way forward.

How can it be? I saw it, it worked - at least it showed me that the upgrade went through.
Something got screwed in U-boot? Would that explain a dead serial?

no it wouldn't explain a completely dead serial, but it might have overwritten the uboot env/data partition, containing the settings, if there was one, that is ....
warm reboot isn't always the same as a cold reboot, some data isn't read during warm, which could explain why it survived the 1st one.

Would it make any sense to try the previous version on the second board?

https://firmware-selector.openwrt.org/?version=19.07.7&target=ramips%2Fmt76x8&id=hilink_hlk-7628n

What do you think? Maybe that will work.

I wouldn't ... :wink:

there are other, more sane, options to try to get it to run, than blind sysupgrades.
but they're also more time consuming, and that's something you might not have ...