AR-300m upgrade uboot to newer verions

Very good, thanks for the clarification.

Great to know. Did this help you in some way? Did you just run:

setenv variableName

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!

1 Like

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.

How can I do this without going to u-boot console?
What does it actually do?
What are this addresses?
Or can I at least enable netconsole in this u-boot?

EDIT: Not needed anymore, I’ve bought USB-TTL converter and did it from u-boot console.

Does anyone have a copy of the fixed uboot? The attachement on alzhao*s post seems to be gone and the bin from github still is wrong.

1 Like

Here? Where? There is no attachment and no link, and as others have mentioned - the file on github is old. It does not support NAND flashing from TFTP (no “nlf” command defined per documentation in https://docs.gl-inet.com/en/2/hardware/ar300m/ ) and the mode switch is not usable without physical case modifications.

The post is old so links was lost.

But I just verified this issue. There is a problem and pls allow some time to find out. So do not need to change uboot at this point.

Pls try this one.

I’ll give it a try this weekend, I won’t be able to test this tonight.

Thanks!

Also - webfailsafe enforces a 16MB limit for all uploads, even NAND despite that being a 128MB flash chip.

This one finally works :slight_smile: Dont forget to set set fw_setenv boot_dev on !

So this is another bug!

Sorry for necroposting, but that comment should be marked as the solution!

Thanks for sharing!
Here are the serial output how it looks like when executing the commands:

U-Boot 1.1.4-gf8f77125-dirty (Sat Aug 14 08:53:11 UTC 2021)

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) = (0x8, 0x26)
Tap values = (0x17, 0x17, 0x17, 0x17)
128 MB
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
flash size 16MB, sector count = 256
Power up PLL with outdiv = 0 then switch to 3
ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
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:09:0b:ad
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014  Qualcomm Atheros Inc.
MFR:200,DID:177
====== NAND Parameters ======
sc = 0x87ff62e0 page = 0x800 block = 0x20000
Setting 0x181162c0 to 0x78f1a100
Hit 'gl' to stop autoboot:  0 
ath> 
ath> cp.b 0x9fff0000 0x81000000 0xffff
ath> mw 0x81000050 0x646f6e65
ath> mw 0x81000060 0x7365636f
ath> protect off bank 1
Un-Protect Flash Bank # 1
ath> cp.b 0x81000050 0x9fff0050 4
Copy to Flash... write addr: ff0050
done
ath> cp.b 0x81000060 0x9fff0060 4
Copy to Flash... write addr: ff0060
done
ath> protect on bank 1
Protect Flash Bank # 1
ath>