GL-AR300M Unable to flash NAND

I tried flashing the GL-AR300M NAND with the Tor firmware (openwrt-ar300m-nand-tor-1.41.img) using the U-Boot method. The AR300M failed to boot into the Tor firmware, starting to stock firmware in NOR instead. I have since tried all the other NAND firmwares (openwrt-ar300m-ubi-2.261.img and openwrt-ar300m-nand-clean-2.261.ubi) with the same result.

I have also tried using the firmware upload function of the NOR flash image, which breaks both the NOR and the NAND flash images, so recovery using U-Boot is required.

I have tried both methods for switching the flash to boot from described in https://www.gl-inet.com/docs/mini/ar300m/#using-the-firmware, the AR300M always boots the NOR.

Is there an issue with the provided NAND flash images or am I doing something wrong?

when did you buy the AR300M?

Which firmware version does it come from?

http://www.gl-inet.com/firmware/ar300m/nand/v1/openwrt-ar300m-ubi-2.261.img is the default factory firmware and at least this one should work.

If this one doesn’t boot then there is a problem with your device.

@greencaribou, checked again and the Tor firmware should have a problem. Fixed it and you can redownload. The other two firmware should just works ok.

Thanks, the new firmware flashes and boots. :slight_smile:

When I issue opkg update, I get signature verification errors:

# opkg update Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/base/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/base/Packages.sig. Signature check failed. Remove wrong Signature file. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/luci/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/luci/Packages.sig. Signature check failed. Remove wrong Signature file. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/management/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/management/Packages.sig. Signature check failed. Remove wrong Signature file. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/packages/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/packages/Packages.sig. Signature check failed. Remove wrong Signature file. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/routing/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/routing/Packages.sig. Signature check failed. Remove wrong Signature file. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/telephony/Packages.gz. Downloading http://www.gl-inet.com/openwrt/ar71xx_nand/tor/1.3/packages/telephony/Packages.sig. Signature check failed. Remove wrong Signature file.
Could you check what is going on?

Because the package list did not existence when opkg update , you can enter the address in your web brower, It really doesn’t exist. I think you need to replace /etc/opkg/customfeeds.conf

The customfeeds.conf are as found in the image. What is/are the correct URL(s) to use?

@greencaribou, sorry I didn't recompile all the software packages.

Can you change the path to https://www.gl-inet.com/openwrt/ar71xx_nand/2.261/packages/

If you don't want to install kernel modules then it will be OK.

use http, not https

http://www.gl-inet.com/openwrt/ar71xx_nand/2.261/packages/

Hi guys, I’m having the same problem, I can not flash the NAND and it’s booting only in NOR, I setted the switch for the selective boot. I tried with different firmware, but I need a simple nand/v1 2.264.
I suspect that my uboot support only NOR, how can I have a confirm? It shows me just “Upload Firmware” and it doesn’t specify which firmware you can upload.
Someone can help me please?

Same here - AR300M (not lite or M16) uboot version says 19.05.17. No option to install NAND firmware. Only y thing that seemw to work is flashing with M16 firmware. Bought from amazon yesterday.

Mine 19.04.25. Bought from Amazon too. Reading around I understood that the only solution is UART-USB adaptors with settled connector so we will be able with the console interface Tftp to flash the new uboot with the NAND support…I also read that they want dismiss the NAND due to the cost. Waiting the official answer from a forum’s expert.

The numbers for the uboot version look like dates to me - either when uboot was updated or when it was flashed. Not great if that’s the case as it means the routers are recently manufactured, but installed with a uboot that effectively makes them the M16 (cheaper) model. Hopefully someone will respond with a fix but I suspect it’s a case of open the box solder and flash the new uboot(in which case you can’t return it if it doesn’t then work) or just return it, add your comments to the Amazon reviews and buy something else. Hopefully someone will be able to point to the official uboot binaries as well. They don’t seem to be easy to find.

There is an option to update u-boot without tftp and soldering by the looks of it. http://192.168.1.1/uboot.html - just need the file now.

1 Like

Uboot files is at https://github.com/gl-inet/uboot-ar300m/tree/master/bin

I’ve installed this by
… Connect only one network cable (Lan)
…Hold down the reset button - keep held while router boots - 5x red light flashes then green.
…connect to http://192.168.1.1/uboot.html and flash new uboot software

I then booted back into the new uboot http://192.168.1.1 and flashed NAND version 3.024
I then booted back into the new uboot http://192.168.1.1 and flashed NOR version 3.019

Rebooted - Configured router - go to update and now shows 3.024 so NAND firmware is running.

All good.

1 Like

You are great Gareth! It works! Thank you so much…
Do you know also where I can find the firmware nand/v1 2.264?
I searched it in the folder where it’s supposed to be but there is not.

https://dl.gl-inet.com/firmware/ar300m/nand/testing/
https://dl.gl-inet.com/firmware/ar300m/testing/

You can find both of the latest there :slight_smile:

The old v2 firmware is no longer available for download directly, you would have to contact support for it.

gareth
you are the best!!! Thank you for the manual. I was about to return the router to Amazon…
IN your manual I was confused about flashing to NAND then flashing to NOR. When I saw the new uboot intertface - things cleared!

I have a similar poblem with the one described in this thread so I hope someone who had it can help me as I have tried lots of variants with no success by now.

What happend :
Yesterday 07.10.2020 I have updated my GL-AR300M16-ext to the latest software version available thru the admin GUI . I forgot the exact version number as I was in a rush … It was a 3.1XX and my router was on a 3.0XX .
After the update the router remained with the two green led’s ON but after 30min it still did not come back to life ( expose WI-FI AP)
What I have tried :

  1. Uboot ( connect the eth cable to LAN and a Laptop network card with static IP 192.168.1.2, press reset, connect power, wait for the 5 red flashes , then both green led’s are on)
  2. a. I have tried this under Win 10, PopOS, Ubuntu 20.4
  3. I have flashed using Uboot all the firmwares from here https://dl.gl-inet.com/firmware/ar300m/nand/v1/ that had a .img extension but with no success.
  4. today I have found this topic so I have tried to flash the Uboot
  5. After flashing the Uboot sometimes the router is looking for a TFTP server and I have created one on linux with the correct filename and a .bin file but even with the firewall down on my laptop the router is not grabbing the file.
    I am a bit confused as I initially just wanted to use the router and performed the update provided thru the normal update channel and not a custom firmware.
  6. I have some logs from the UART port and I will paste them here :
    [18542.13h.02m.31s.157] Tap values = (0x16, 0x16, 0x16, 0x16)
    [18542.13h.02m.31s.163] 128 MB
    [18542.13h.02m.31s.302] Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
    [18542.13h.02m.31s.302] flash size 16MB, sector count = 256
    [18542.13h.02m.31s.307] *** Warning - bad CRC, using default environment
    [18542.13h.02m.31s.307]
    [18542.13h.02m.31s.315] Power up PLL with outdiv = 0 then switch to 3
    [18542.13h.02m.31s.558] *** Warning *** : PCIe WLAN Module not found !!!
    [18542.13h.02m.31s.564] ath_gmac_enet_initialize…
    [18542.13h.02m.31s.775] No valid address in Flash. Using fixed address
    [18542.13h.02m.31s.775] Fetching MAC Address from 0x9fff0006
    [18542.13h.02m.31s.775] ath_gmac_enet_initialize: reset mask:c02200
    [18542.13h.02m.31s.988] Honey Bee ---->S27 PHY*
    [18542.13h.02m.31s.993] S27 reg init
    [18542.13h.02m.31s.993] : cfg1 0x800c0000 cfg2 0x7114
    [18542.13h.02m.32s.095] eth0: 00:03:7f:09:0b:ad
    [18542.13h.02m.35s.099] eth0 up
    [18542.13h.02m.35s.099] Honey Bee ----> MAC 1 S27 PHY *
    [18542.13h.02m.35s.103] S27 reg init
    [18542.13h.02m.35s.103] ATHRS27: resetting s27
    [18542.13h.02m.35s.205] ATHRS27: s27 reset done
    [18542.13h.02m.35s.208] : cfg1 0x800c0000 cfg2 0x7214
    [18542.13h.02m.35s.310] eth1: 00:03:7f:11:23:c6
    [18542.13h.02m.36s.330] eth1 up
    [18542.13h.02m.36s.330] eth0, eth1
    [18542.13h.02m.36s.330] Qualcomm Atheros SPI NAND Driver, Version 0.1 © 2014 Qualcomm Atheros Inc.
    [18542.13h.02m.36s.330] ath_spi_nand_ecc: Couldn’t enable internal ECC
    [18542.13h.02m.36s.330] Setting 0x181162c0 to 0x7cf9a100
    [18542.13h.02m.36s.330] Hit ‘gl’ to stop autoboot: -1
    [18542.13h.02m.39s.352] Protect off 9F040000 … 9F04FFFF
    [18542.13h.02m.39s.352] Un-Protecting sectors 4…4 in bank 1
    [18542.13h.02m.39s.352] Un-Protected 1 sectors
    [18542.13h.02m.39s.352] Erasing Flash…Erasing flash…
    [18542.13h.02m.39s.352] First 0x4 last 0x4 sector size 0x10000
    [18542.13h.02m.39s.3 4
    [18542.13h.02m.39s.352] Erased 1 sectors
    [18542.13h.02m.39s.352] Writing to Flash… write addr: 40000
    [18542.13h.02m.39s.409] done
    [18542.13h.02m.39s.409] Protecting sectors 4…4 in bank 1
    [18542.13h.02m.39s.409] Protected 1 sectors
    [18542.13h.02m.39s.409] Un-Protect Flash Bank # 1
    [18542.13h.02m.39s.432]
    [18542.13h.02m.39s.432] no devices available
    [18542.13h.02m.39s.432] Found ART,Checking calibration status…
    [18542.13h.02m.39s.432] Device have calibrated,Checking device test status…
    [18542.13h.02m.39s.432] Device have tested,Checking MAC address…
    [18542.13h.02m.39s.432] Device have MAC address,Checking device flash status…
    [18542.13h.02m.39s.432] Device only have nor flash,Booting standard firmware from nor flash…
    [18542.13h.02m.39s.438] Booting image at: 0x9F050000
    [18542.13h.02m.39s.441] Trying eth0
    [18542.13h.02m.39s.441] eth0 link down
    [18542.13h.02m.39s.441] FAIL
    [18542.13h.02m.39s.445] Trying eth1
    [18542.13h.02m.39s.445] enet1 port0 up
    [18542.13h.02m.39s.448] dup 1 speed 1000
    [18542.13h.02m.40s.449] Using eth1 device
    [18542.13h.02m.40s.478] host 192.168.1.2 is alive
    [18542.13h.02m.40s.482] Trying eth0
    [18542.13h.02m.40s.482] eth0 link down
    [18542.13h.02m.40s.482] FAIL
    [18542.13h.02m.40s.485] Trying eth1
    [18542.13h.02m.41s.499] Using eth1 device
    [18542.13h.02m.41s.499] TFTP from server 192.168.1.2; our IP address is 192.168.1.1
    [18542.13h.02m.41s.499] Filename ‘openwrt-gl-ar300m.bin’.
    [18542.13h.02m.41s.499] Load address: 0x80060000
    [18542.13h.02m.41s.499] Loading: *
    [18542.13h.02m.43s.508] no devices available
    [18542.13h.02m.43s.508] ## Booting image at 9f050000 …
    [18542.13h.02m.43s.508] Bad Magic Number
    [18542.13h.02m.43s.508]
    [18542.13h.02m.43s.508] ** Device 0 not available
    [18542.13h.02m.43s.508] ath>

While flashing Uboot and after
�@������Request for----: /uboot.html
we are here 2
open file: /uboot.html–finished reading file—
Request for----: /style.css
we are here 2
open file: /style.css–finished reading file—
Data will be downloaded at 0x80800000 in RAM
Upgrade type: U-Boot
Upload file size: 214112 bytes
Loading: #######################################
#######################################
#######################################
#######################################
#######################################
#######################################
################

open file: /flashing.html
stop eth interface!!
HTTP upload is done! Upgrading…


  • U-BOOT UPGRADING     *
    
  • DO NOT POWER OFF DEVICE! *

Executing: erase 0x9F000000 +0x50000; cp.b 0x80800000 0x9F000000 0x40000

Erasing flash…
First 0x0 last 0x4 sector size 0x10000
4
Erased 5 sectors
Copy to Flash… write addr: 0
done
HTTP ugrade is done! Rebooting…

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)

ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x23)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
flash size 16MB, sector count = 256
*** Warning - bad CRC, using default environment

Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
ath_gmac_enet_initialize…
No valid address in Flash. Using fixed address
Fetching MAC Address from 0x9fff0006
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:11:23:c6
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 © 2014 Qualcomm Atheros Inc.
ath_spi_nand_ecc: Couldn’t enable internal ECC
Setting 0x181162c0 to 0x7cf9a100
Hit ‘gl’ to stop autoboot: -1
Protect off 9F040000 … 9F04FFFF
Un-Protecting sectors 4…4 in bank 1
Un-Protected 1 sectors
Erasing Flash…Erasing flash…
First 0x4 last 0x4 sector size 0x10000
4
Erased 1 sectors
Writing to Flash… write addr: 40000
done
Protecting sectors 4…4 in bank 1
Protected 1 sectors
Un-Protect Flash Bank # 1

no devices available
Found ART,Checking calibration status…
Device have calibrated,Checking device test status…
Device have tested,Checking MAC address…
Device have MAC address,Checking device flash status…
Device only have nor flash,Booting standard firmware from nor flash…
Booting image at: 0x9F050000
Trying eth0
eth0 link down
FAIL
Trying eth1
enet1 port0 up
dup 1 speed 1000
Using eth1 device
host 192.168.1.2 is alive
Trying eth0
eth0 link down
FAIL
Trying eth1
Using eth1 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename ‘openwrt-gl-ar300m.bin’.
Load address: 0x80060000
Loading: *
no devices available

Booting image at 9f050000 …

Bad Magic Number

** Device 0 not available
ath> �

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)

ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(219): (16bit) ddr1 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000002
Tap (low, high) = (0x8, 0x23)
Tap values = (0x15, 0x15, 0x15, 0x15)
4 MB

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)
��

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)

ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(219): (16bit) ddr1 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000002
Tap (low, high) = (0x8, 0x23)
Tap values = (0x15, 0x15, 0x15, 0x15)
4 MB

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)

ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000003
Tap (low, high) = (0x9, 0x23)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
flash size 16MB, sector count = 256
*** Warning - bad CRC, using default environment

Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
ath_gmac_enet_initialize…
No valid address in Flash. Using fixed address
Fetching MAC Address from 0x9fff0006
ath_gmac_enet_initialize: reset mask:c02200
Honey Bee ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad

U-Boot 1.1.4-g26acf3e7-dirty (Fri May 17 09:44:06 2019)

ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(219): (16bit) ddr1 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000002
Tap (low, high) = (0x8, 0x23)
Tap values = (0x15, 0x15, 0x15, 0x15)
4 MB

Now all what it says on UART if I just plug it to power is
ar300m - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(219): (16bit) ddr1 init
ath_sys_frequency: cpu 650 ddr 597 ahb 216
tap = 0x00000002
Tap (low, high) = (0x8, 0x23)
Tap values = (0x15, 0x15, 0x15, 0x15)
4 MB

Are there any suggestions of what I can try to fix it ?

BR,
Misujr

You are using the wrong firmware. You need to use 3.104.bin from https://dl.gl-inet.com/firmware/ar300m/v1/
Your router is not Nand version so you cannot flash img.
Now you should open uboot web panel and upload .bin

Thank you fo rthe response @alzhao .
Now sadly all what I get from the router is the power led. The Red led does not flash anymore when I try to power in uboot mode and the power draw of the router is ~184-~190mA .
Any chance to fix it or should I bin it and order a new one ? A bit sad though as this one has less than a year :slight_smile: .

BR,
Misujr