Has anyone ever flashed uBoot on GL iNet X3000?

Today I flashed the uBoot of my GL iNet X3000.
It could be that I took the wrong file :slight_smile: which leads to question #2.

But 1st: Has anyone else ever done that?
The build provides an output:

According to the openwrt one (mtk_uartboot) docs, I thought the uBoot is

openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip

There eis also info that this process can be done via ssh:

      echo 0 >/sys/block/mmcblk0boot0/force_ro
    
    then write 
            openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip to /dev/mmcblk0p4
            openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin to /dev/mmcblk0boot0.

But when I look at the file size of the uboot file available here the comparable file here for x750 is 238kb.

So, what exactly is the correct file to choose when I want to update the uBoot?
: Here it says that it is

openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip to /dev/mmcblk0p4

But, is this the same uBoot as it comes with the new device?

Cheers!

#2 is related to my current condition: There is no uBoot UI anymore, but the router starts up successfully.
Once I follow the instructions to enter the uBoot menu (reset button + power), I do a reset to factory defaults . It resets, starts and all settings are gone. I enter a clean openwrt instance of what I flashed before (but without all the settings I include in the image).

Could it be, that my uBoot isn't "gone", instead, it is just with different functionality?
(old (maybe fip.bin?): reset button + power = uBoot flash UI)
(new: reset button + power = reset to factory defaults)

Building the uboot stuff from the gl-inet git repo
gitrepo
gives that output:


Built /home/frood/Documents/git/mt798x-boot/atf-20220606-637ba581b/build/mt7981/release/bl2.bin successfully

Built /home/frood/Documents/git/mt798x-boot/atf-20220606-637ba581b/build/mt7981/release/bl31.bin successfully

Built fiptool successfully

Built /home/frood/Documents/git/mt798x-boot/atf-20220606-637ba581b/build/mt7981/release/fip.bin successfully

bl2.bin. 226kb
fip.bin 580kb
bl31.bin 28kb

The GL iNet docs here point to uBoot files to be flashed with a size about 237kb

I am not sure which is which and which is supposed to be dd'ed to /dev/mmcblk0p4

Correct, you have overwritten it with the generic OpenWrt uboot that only supports tftp.

There is no particular need to have done this. The original gl supplied uboot web-ui accepts the squashfs-sysupgrade.bin without doing anything else.

If you want to go back to the gl uboot web-ui you have to plead insanity and "it's at my own risk" with GL and hope they send you the uboot web-ui flash file. They normally do not have this as a download because the probability of a hard brick is very high unless you know what you are doing....

1 Like

That’s interesting, I didn’t know that the OpenWrt version Supports TFTP only.
For some devices, they provide the boot loader as a download, but for the X 3000 there are the sources only.
Currently, I have two options
Dd the Boot loader from a second device.
Dd The version that I have compiled (see above)

Three actually, the third being stick with the results of your mistake, it does work after all.

No wait, make that four. If it is new you could .... Oh, I can't say that, it's dishonest.

First Law of Holes: If you find yourself in a hole, stop digging.

Second Law of Holes: "When you stop digging, you are still in a hole."

1 Like

ok, but on the new device: dd-ing the content from /dev/mmcblk0p4 back to a file and put this on the "broken" device, should be an easy task. Isn't it?
(see https://github.com/openwrt/openwrt/commit/7eda44f53647cb54cb9b2eb13b27417cd0128a37)

There is still #5: mtk_uartboot and try to unbrick it if it fails.

for documentation purposes; I will also add this to the Wiki page :slight_smile:

dd if=/tmp/ubootGLnet.bin of=/dev/mmcblk0p4

strings /dev/mmcblk0p4 | grep U-Boot
U-Boot 2022.07-rc3 (Mar 09 2023 - 16:20:34 +0800)

Option 1) was executed successfully.
I am back on the original U-Boot.

There you can also see one of the reasons why you should replace that version with an updated one: 2022.07-rc3

Update: Bruce has provided the U Boot here and he confirmed that this is the way to build the GL iNet U Boot for devices based on based on mt798x (MT2500/MT3000/X3000/XE3000/MT6000).

I will test both U Boots and add all the info to the Wiki Device Page.