GL-X3000: Stock OpenWRT om microSD card as an Emergency boot device

Hi all,

I am trying to install a stock OpenWrt on an external micro SD card and then modify the fstab and boot from it. By doing this setup, if I want to switch back to GL’s firmware, I can simply remove the SD card and reboot. But, I faced few issues:

My Questions:

  • Can I install a stock OpenWrt firmware on external SD card with the same exact filesystem structure used by GL?
  • Can GL engineers provide us with ImageBuilder or provide a stock latest OpenWrt that works on external storage ?

I appreciate any help!

There is no stock OpenWrt firmware for GL-X3000? The closest I could find with the same mediatek chip is GL-MT3000. But when I installed it it gave me different filesystem structure.
–>It can’t use MT3000 firmware for X3000.X3000 is EMMC img,MT3000 is Nand img.

  • Can I install a stock OpenWrt firmware on external SD card with the same exact filesystem structure used by GL?
    → The hardware dictates that it can only use EMMC to boot.If you need expand root filesystem.You can refer:[OpenWrt Wiki] Extroot configuration

  • Can GL engineers provide us with ImageBuilder or provide a stock latest OpenWrt that works on external storage ?
    → Not yet. The latest Openwrt requires driver support.ImageBuilder:GitHub - gl-inet/glbuilder

Thank you for the provided information!

What do you mean by hardware? UBOOT? Can you please give more details why I can’t boot from usb or microsd card ?

Exroot method to expand the file system not to boot from an external storage ?

YES, The hardware has a boot configuration option:
e1b73578c723a928bacdab2d2956dc57

X3000 are now using EMMC, and the configuration option of hardware circuit configuration is selected by 10.

Does this mean I cannot boot from USB or Microsd card? Even If I change UBoot options?

Yes,It cannot boot from USB or Microsd card.

@lizh

I have a USB-UART cable, can I use it to boot another media? Or you mean the boot process cannot be manipulated by Uboot?

Can you please give as much details as possible?

If you use combinations of EMMC(uboot) and USB(firmware). It might work,but I haven’t tested it yet.

In addition,The uboot must support USB first. But it is not supported at the moment.

UBOOT must support usb??! That’s a confusing statement! What I said is that I will use Uart cable that is connected from the computer side using usb port. Then access the UBOOT and change the boot option to boot an external microsd card. The sr card have full working image of openwrt minus the UBOOT.

Will this work ?

SD cards are connected via USB-bus conversion. In the uboot phase, the SD card is not currently recognized at the moment.

  • So, it mean if I update my Uboot with a one that supports USB driver, will the sdcard boot?

  • How can I access GL Uboot without UART-USB cable?

  • Do you have a Uboot image builder?

  • So, it mean if I update my Uboot with a one that supports USB driver, will the sdcard boot?
    → It should work in theory, but it might take a lot of work.

  • How can I access GL Uboot without UART-USB cable?
    –>yes,but you need to open the casing of the device.

  • Do you have a Uboot image builder?
    → I’m sorrt that uboot is not available yet.

I asked without not with

Sorry, I got it wrong
It can only access uboot through UART-USB.

it’s ok ! Thank you for all your provided info!

I am trying to check the Uboot env before I disassemble the case … but I got the following error:

root@GL-X3000:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mtdblock0 31:0 0 2M 0 disk
mtdblock1 31:1 0 2M 0 disk
mmcblk0 179:0 0 7.3G 0 disk
├─mmcblk0p1 179:1 0 2M 0 part
├─mmcblk0p2 179:2 0 512K 0 part
├─mmcblk0p3 179:3 0 2M 0 part
├─mmcblk0p4 179:4 0 2M 0 part
├─mmcblk0p5 179:5 0 2M 0 part
├─mmcblk0p6 179:6 0 32M 0 part
├─mmcblk0p7 179:7 0 7.2G 0 part /rom
└─mmcblk0p8 259:0 0 7.2G 0 part /overlay
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk

root@GL-X3000:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00200000 00010000 “log”
mtd1: 00200000 00010000 “custom”

root@GL-X3000:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200

fdisk -l
The backup GPT table is not on the end of the device.
Disk /dev/mmcblk0: 7.28 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2BD17853-102B-4500-AA1A-8DDDD4DDDDD

Device Start End Sectors Size Type
/dev/mmcblk0p1 4096 8191 4096 2M Linux filesystem
/dev/mmcblk0p2 8192 9215 1024 512K Linux filesystem
/dev/mmcblk0p3 9216 13311 4096 2M Linux filesystem
/dev/mmcblk0p4 13312 17407 4096 2M Linux filesystem
/dev/mmcblk0p5 17408 21503 4096 2M Linux filesystem
/dev/mmcblk0p6 21504 87039 65536 32M Linux filesystem
/dev/mmcblk0p7 87040 15269887 15182848 7.2G Linux filesystem

Do you know why the CRC error?

I’m very very sorry. Your message was not received in time due to some reasons.

This is due to the incorrect address of the environment variable area.
You need modify /etc/fw_env.config:
/dev/mmcblk0p2 0 0x80000