GL-AR300M sysupgrade Problem

Hello, congratulations with the release.

I have a GL-AR300M with their official firmware version 2.25. I wanter to try LEDE as it officially supports my device, but I'm getting this error when trying to flash the firmware:

root@GL-AR300M:/tmp# sysupgrade -n -v /tmp/lede-17.01.0-r3205-59508e3-ar71xx-generic-gl-ar300m-squashfs-sysupgrade.bin
Invalid sysupgrade file.
Image check 'platform_check_image' failed.


root@GL-AR300M:/tmp# md5sum ./lede-17.01.0-r3205-59508e3-ar71xx-generic-gl-ar300m-squashfs-sysupgrade.bin
4e8823d4835cac970e31782541e874f4  ./lede-17.01.0-r3205-59508e3-ar71xx-generic-gl-ar300m-squashfs-sysupgrade.bin

root@GL-AR300M:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00fa0000 00010000 "reserved"
mtd3: 00010000 00010000 "art"
mtd4: 00200000 00020000 "kernel"
mtd5: 07e00000 00020000 "ubi"


Just some of my guesses..

My device has two flashes:

The router has two flash so we have two firmware. One firmware is installed on the Nor flash and one is installed on the nand flash. The two firmware is independent from each other. The router will always try to boot from the nand flash. If it fails for 3 times it will boot from the Nor flash.

By using two firmwares, businesses can have dual boot options to ensure the system can backup, upgrade and boot without problems.

By default it boots into the NAND flash. Is it possible that the LEDE firmware is designed for the smaller NOR flash?

1 Like

Yes, this is the case. Current version of LEDE doesn't support SPI NAND FLASH in ar71xx target.

Thanks, I have now successfully flashed the firmware after booting from the NOR, now I'll try to experiment.

I have a problem though booting into the NOR flash using the hardware switch. The documentation says that after turning on the boot_dev firmware environment variable using the "fw_setenv boot_dev on" command I will be able to choose the flash using the hardware switch. The problem is that no matter what position is the switch at the device boots into the NAND flash. The only way to boot into NOR is setting "fw_setenv bootcount 3" which is very inconvenient. Is there a way to safely update the uboot because I think it might be old and doesn't support the hardware switch option?

Are there any future plans for supporting NAND flash for this target?

I'm not sure if this problem is related with LEDE at all. You should probably ask directly on GL.iNet forum. AFAIK, they didn't release U-Boot sources for AR300M device.

Problem is in kernel and missing proper support in MTD layer for such chips (there is only this:, for more information take a look at this discussion: I would like to see support for SPI NAND in LEDE, we will see how things go.

Thanks for the reply.

It seems the manufacturer is working on it:

Can't we just merge their LEDE fork back?

It was already discussed:

OK, thanks again, so my understanding is that we are waiting for a driver in the upstream kernel because the one provided by Qualcomm isn't polished enough.

I think we can try use the staging driver, but someone would need to make it working. The GL.iNet guys approach is not correct as they just copied whole driver and changed names of functions/variables etc. This becomes totally unmaintainable.
I created patched fork (temporary solution)
That's the same driver, I just copied GL.iNet's patch and updated lede.
I can upload compiled version if you want when I'll finish compilaton

//EDIT: Never mind, it is not working :confused:

1 Like


this is due to the old version of uboot. There is a thread on GL.iNet forum ( where you can get the new uboot. After this the hardwareswitch should work.

1 Like

Hi all, sorry I'm a total newb at all this.

I have a GL-AR300M, and I would just love to be able to run the latest version of LEDE on it, without breaking anything.

Is this possible? If so, what do I do?

Thanks so much in advance for any help!

Sadly, its not that easy. I finally switched to GL-MT300A since LEDE is working out of the box on it because it only has 1 flash module (16 mb flash is enough for me). I wait with my GL-AR300M project until working firmware for the dual boot is released.

the user "alzhao" here
compiled a working version in nand flash for the gl-ar300m.
I hope we'll see it soon in the official trunk.

@orby and others, pinging this topic to see what the status is.

I looked at the official builds and found the GL-MT300A "supported" in the official downloads and went ahead and ordered one, trying out travel routers... but now I find that it's sort of far from "supported" sigh.

Anyone who's been working with this device and can give advice as to what the best current scenario is?

  1. How to get uboot updated so I can choose NAND/NOR with the switch?

  2. How to install the NOR flash from official downloads?

  3. What's the timing on official LEDE NAND versions?

1 - I believe this post has the best info on dealing with uboot. There are a few versions in the thread and I expect you want the last one. You also need a serial adapter to update the uboot and read the version.
2 - The NOR flash is pretty easy to install. set the boot counter to at least 3 and you should be able to boot to the NOR side. I did sysupgrade to 17.01.4 from the GL.inet GUI. Easy peasy. I had to reboot twice (not clear if it was me or the device) and again each time you need to set the boot counter to 3 to get to the NOR (unless you get then latest uboot version and can use the switch - read the last post in the above thread). AR300M Documents
3 - ???

Upgrade your firmware to V2.264 when you get it.

Related post

So there's no way to update the uboot without the serial adapter, crack the case, and soldering? and without that there's no way to get it to boot into NOR other than booting into NAND and ssh and executing the counter change etc.

what about the uboot web console? you can't update uboot from there?

As I understand it the only way to upgrade uboot is with an adapter.
The only way I have been able to get to the NOR is by booting to the NAND first and setting the boot counter.

You will need to wait until you get your device and test with the process in the AR300M Docs to see which uboot you have.

I suggest you followup after you get your device on the above thread.

It seems this problem is still valid for OpenWrt 18.06.1. I have two routers GL-AR300M running with OpenWrt Chaos Calmer 15.05. I tried to install the openwrt-18.06.1-ar71xx-generic-gl-ar300m-squashfs-sysupgrade.bin image but get the message

Invalid sysupgrade file

Is there any hope?

1 Like

My gl-ar300m still runs with the native firmware :nauseated_face:

Hi @eehmke,

I think you need start the router from NOR Flash and install this file later.