@mkroes, can you please check the console output of uboot when using the switch? Maybe you can erase all the uboot env variables and recheck.
have you tried without the case?
The switch has 3 positions, left<–center–>right but the case has only 2, left<–center, you must drill the case on the last position…
@vigans, It works with only de left and centre position.
@alzhao, erasing all the uboot env variables did the trick. Now its working. Thanks!
Hi all, I am a recent owner of this great little router. I would like to update the uboot (in order to be able to use the switch as a NAND-NOR selector).
I tried to install the latest image in this thread through the 192.168.1.1/uboot.html u-boot web page however it complains about wrong filesize.
Is soldering the serial pins and using a UART adapter the only way to update the uboot? Can a web-upgrade compatible image be made available?
I have the newer uboot on my AR300M but the switch is not forcing a boot to a specific flash after setting the boot_dev variable. How can I erase the uboot env variables to see if that will fix it for me also? Is there a specific one I could clear that might do it?
I don’t have a UART connector capability so would need to do this from either the NAND or NOR booted systems.
I have this router purchased Nov 2017, flashed the latest 2.263 NAND firmware via the GUI, I then flashed the LEDE 14.01.4 NOR firmware via UBOOT web update. Now I want to be able to boot the NOR image by using the switch.
What is the current procedure? What is the latest tested working uboot image? I have no UART adapter at the moment, is it possible to flash new uboot via a web gui?
using uboot web interface I flashed LEDE to the NOR firmware, and then also using uboot web interface flashed the above linked new uboot: https://www.gl-inet.com/wordpress/wp-content/uploads/2017/03/uboot_for_gl-ar300m-1.zip
Now my system boots only to NOR, which is actually very good for me because I wanted the LEDE firmware, however it apparently doesn’t boot to the NAND firmware anymore, regardless of which way I set the switch. Yes I have set boot_dev on
How can I now use the switch for selecting NOR vs NAND?
You have to use USB UART adapter and connect to the serial pins.
You can try flash the nand firmware again using the uboot console.
Just a little tip:
When you flash custom firmware and the routers doesn’t boot AND you don’t want to solder (I want to keep the case around the board). Just execute this little trick to trigger bootcount:
- Insert power, wait until the first flash of the led (after 2 seconds), and disconnect the power cord (bootcount =1)
- Repeat (bootcount=2)
- Repeat (bootcount=3)
- Now you can insert the power cord and keep it inserted, it now boots the NOR flash
Easier than logging in and setting bootcount=4.
Hi, I think i bricked my AR300M. I flashed the new Uboot via web console but the switch still did not work. So as alzhao described I cleaned all env parameters (all means all, i cleaned ipaddr, dlf, blf, everything).
Now even the Unbrick method via 192.168.1.1 doesn’t work anymore. The device still seems to be alive, though, the LEDs still blink at startup. But even via UART I only get unreadable letters, no matter what baud rate I choose.
Hi to all.
I also flashed the latest U-Boot from https://github.com/gl-inet/gl-uboot-source-for–ar300m to my AR300M (using prebuilt in bin / MD5
U-Boot 1.1.4-g36de7573 (May 26 2017 - 14:42:18)
Then erased all environment vars using
erase 0x9f040000 +0x10000
boot correctly into NAND and NOR firmware respectively.
But during normal startup / reset I always get the following error:
Device 0 bad blocks:
Found ART,Checking calibration status...
Device have calibrated,Checking device test status...
Device haven't tested. Please test device in calibration firmware...
Booting image at: 0x9Fed0000
## Booting image at 9fed0000 ...
Bad Magic Number
Any help is appreciated!
Can you make sure the nand firmware is a valid firmware with .img in the file name?
I tried different NAND firmwares with .img filename. Currently I am using http://download.gl-inet.com.s3.amazonaws.com/firmware/ar300m/nand/tor/openwrt-ar300m-nand-tor-2.264.img (MD5:
run bootcmd from the U-Boot console correctly boots into the NAND firmware!
Thank you and best regards
I resolved marking the device as tested executing the following commands in the u-boot console:
# prepare in memroy cp.b 0x9fff0000 0x81000000 0xffff mw 0x81000050 0x646f6e65 # done mw 0x81000060 0x7365636f # seco # write to flash protect off bank 1 cp.b 0x81000050 0x9fff0050 4 # done cp.b 0x81000060 0x9fff0060 4 # seco protect on bank 1
Now I am happy with my cool AR300M booting to NAND and/or NOR using the switch
I updated the uboot from here: https://github.com/gl-inet/uboot-ar300m/tree/master/bin
It shows its version as U-Boot 1.1.4-g36de7573 (May 26 2017 - 14:42:18)
I had the same problem as @m.vgunten and needed to mark the unit as tested for it to boot up by default. The commands listed worked. Thanks
I also have the problem that boot_dev does not work with the switch with the case on. As noted by @vigans the switch has three positions and without the case on I can put the switch into the right position to boot NOR.
Am I reading correctly that @mkroes erased all the uboot variables and that fixed the switch to work with boot_dev and the case on?
I am reluctant to try this without confirmation. Wouldn’t I have to re-input all the uboot environment settings for uboot to boot the firmware again?
Updated u-boot for AR300M not booting OSes
Regarding the three switch position: my simple hack was using a file to have all three switch positions working
And when erasing all the uboot variables the defaults will be set on next boot (you can have a look at the source code https://github.com/gl-inet/uboot-ar300m - src/include/configs/board953x.h).
Very good, thanks for the clarification.
Great to know. Did this help you in some way? Did you just run:
For each variable and then saveenv to commit?
For each variable and then saveenv to commit?
No, no setenv/saveenv after erasing, just reboot to u-boot … envvars will then be set to defaults!
Well, I want to add that the new Uboot is way better than the NAND only version shipped with my AR300M. No MTU issues - uploading the firmware is now flawless on Windows. This is the way it should have been on release. If any current AR300M user has this old Uboot, I would highly suggest not testing unknown images on your device without upgrading Uboot to this version.
I did not even solder the board. I paid $1 at the local electronics shop for the UART and 3 female to male breadboard cables and just placed the pins in the provided holes on the board. Worked fine.