If You may have bricked your router because you were doing some DIY projects or flashed a wrong firmware. You may not be able to access your router but you can re-install the firmware by using Uboot failsafe image.
here is an example of MT3000, you find what I mean highlighted inside the red dotted rectangular:
my question is:
How to build this Uboot failsafe system image from the source code? and where can I find the source code for this failsafe system image?
There is no official Gl-iNet guide but there is a great forumposr: [Tutorial] Build, customize and use MediaTek open-source U-Boot and ATF - For Developers - OpenWrt Forum
But why would you want to compile U-boot? For most device lifecycles U-boot will be left untouched.
@solidus1983 might be ‘the man’ to ping; he builds vanilla OpenWrt for select GL devices. I’m sure he’s got some insights you might like.
Right it seems to be general confusion going on here.
When GL-iNet normally says “This file is for Uboot” your not re-flashing uboot. Its the same concept as OpenWRT.
Admin Panel Download is a sysupgrade image and the Uboot Download is a factory image.
So Providing you do not mess with flashing a custom Uboot from someone and leave GL-iNet’s version on there you can simply use the De-Bricking guide for your device and reflash the Uboot Download.
If you have messed with uboot you will have to use Serial UART and a TFTP server to get out of that mess which is not fun if its QCA, I love the MediaTek version though.