Ar300m custom openwrt image

What are the best steps to get this going for my version of ar300M

Version=gl-ar300M-V1.5.2 – I believe this is the NOR flash model, but any confirmation would be appreciated.

I tried to update through LuCi/openwrt but semi bricked my device. I haven’t had time to get the pins soldered to the uart ports yet so any shortcuts to fixing that are appreciated as well.

I made the initial image with the toolchain provided here…

working on a new image using this repo.

Thanks in advance.

Try using the guide here

1 Like

I got through the image builder but was missing the section for LuCI in menuconfig, is there something I did incorrectly?

EDIT: I ended up checking out branch v21.02.3 I will let you know how it goes.

I think I bricked the device, is there uart pinout available for the device?

Yes there are UART for AR300M

Updates so far

  • I attempted recovery by holding down the reset button and getting the recovery screen. (u-boot recovery I believe)
open file: /flashing.html
stop eth interface!!
HTTP upload is done! Upgrading...
Executing: erase 0x9F050000 +0x54015C; cp.b 0x80800000 0x9F050000 0x5e

Erasing flash... 
First 0x5 last 0x59 sector size 0x10000
Erased 85 sectors
Copy to Flash... write addr: 50000

no devices available
## Error: HTTP ugrade failed!

Was able to get uart working.

Any help is appreciated recovering the devices though.

What is the output if you just power on and do a normal boot?

Maybe flash is crupt

NAND flash will boot to a version of OpenWRT that I have flashed to the device. Unfortunately, the device is unable to get internet during that time so UART is the only way to communicate with the device (it may be able to get internet but I haven’t figured this out yet). When I engage the NOR flash over the NAND flash for booting, NOR flash does fail.

So can you post the UART output during normal boot? I mean the failed messages from the UART.

From what I recall, the NOR flash makes attempts for network booting to begin with and then “fails” there. (I can check when I get back to the device).

In addition, once I create an image where is the best place to install the image? From the GL interface or from LuCI. I have tried twice from LuCI and have not had luck.

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

ar300m - Honey Bee 2.0DRAM:  
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, 0x24)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Power up PLL with outdiv = 0 then switch to 3
*** Warning *** : PCIe WLAN Module not found !!!
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.
ath_spi_nand_ecc: Couldn't enable internal ECC
Setting 0x181162c0 to 0x60c1a100
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
Erased 1 sectors
Writing to Flash... write addr: 40000
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
Using eth0 device
Tx Timed out
ping failed; host is not alive
ping failed
## Booting image at 9f050000 ...
Bad Magic Number

Everything works at this point, I ended up using the initramfs bin file supplied, despite it saying that it failed, it actually ended up working. Still figuring out how to get LuCi in the base image with some of the other packages I am looking for.

1 Like

Previously you use the .bin file?

This was the contents of the bin/targets folder after I compiled the image. I’ll try again today to see if I can flash using the other files, but haven’t had much luck.


As your hardware is AR300M16 (it means only have 16M Nor flash), you should use the nor firmware.

Unfortunately you compiled the Nand firmware.

Nor firmware should only have a .bin file.

Thanks for your help, I thought I got the 32M. oops