Boot issue on unifi AP AC LR

Hi,

I tried to get the Openwrt image onto my unifi AP AC LR. I tried 3 different images but nerver end up in a successfull boot. I followed the instrucions for this particular AP but ever end up in booting the u-boot loader and than stop. his happens the first time using ssh and sysupgrade and also interrupting the boot process and tftpboot into images (works fine) installing the image from there all fine but do not boot.

any idea? Thank you for feedback

U-Boot unifi-v2.0.6.306-ge8871a78 (Nov 12 2019 - 10:30:55)

DRAM:
sri
ath_ddr_initial_config(278): (ddr2 init)
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0x10, 0x10, 0x10, 0x10)
128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ff3800, log_magic:0xfdb3111c kseg: 0xa0000000
Top of RAM usable for U-Boot at: 87ff3000
Reserving 252k for U-Boot at: 87fb0000
Reserving 192k for malloc() at: 87f80000
Reserving 44 Bytes for Board Info at: 87f7ffd4
Reserving 36 Bytes for Global Data at: 87f7ffb0
Reserving 128k for boot params() at: 87f5ffb0
Stack Pointer at: 87f5ff98
Now running in RAM - U-Boot at: 87fb0000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x9fff0000
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
 ath_gmac_enet_initialize: is_s17()=0, is_ar8033()=1, phy id1=4d phy_id2=d074
WAN AR8033 PHY init
athrs_ar8033_reg_init: Done 111
Max resets limit reached exiting...
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 44:d9:e7:f2:6e:94
eth0 up
eth0
Setting 0x181162c0 to 0x24482100
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot:  0
## Starting application at 0x80200020 ...
#mtdparts
 #: name                        size            offset          mask_flags
 0: u-boot                      0x00060000      0x00000000      0
 1: u-boot-env                  0x00010000      0x00060000      0
 2: kernel0                     0x00790000      0x00070000      0
 3: kernel1                     0x00790000      0x00800000      0
 4: bs                          0x00020000      0x00f90000      0
 5: cfg                         0x00040000      0x00fb0000      0
 6: EEPROM                      0x00010000      0x00ff0000      0

I have the same problem, did you resolved this ?

This is your router page It specifically says you must have original firmeware from as recent as 02/2023. Your router looks like the firmware is from 2019. If it was later it would not think it is 2019.

Read the page, get to know your router.

Please connect to your device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board

Or find out another way what firmware it is running.

this is my boot screen, i have u boot from 2023

U-Boot unifi-v2.0.16.313-gca8cd509 (Oct 27 2023 - 11:24:48)

DRAM:
sri
ath_ddr_initial_config(278): (ddr2 init)
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0xf, 0xf, 0xf, 0xf)
128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ff3800, log_magic:0x52d10151 kse g: 0xa0000000
Top of RAM usable for U-Boot at: 87ff3000
Reserving 248k for U-Boot at: 87fb4000
Reserving 192k for malloc() at: 87f84000
Reserving 44 Bytes for Board Info at: 87f83fd4
Reserving 36 Bytes for Global Data at: 87f83fb0
Reserving 128k for boot params() at: 87f63fb0
Stack Pointer at: 87f63f98
Now running in RAM - U-Boot at: 87fb4000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
Fetching MAC Address from 0x9fff0000
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly ----> S17 PHY *
ath_gmac_enet_initialize: is_s17()=0, is_ar8033()=1, phy id1=4d phy_id2=d074
WAN AR8033 PHY init
athrs_ar8033_reg_init: Done 111
Max resets limit reached exiting...
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: b4:db:cf:96:df:44
eth0 up
eth0
Setting 0x181162c0 to 0x1c382100
Board: Copyright Ubiquiti Networks Inc. 2014

Okay, thanks.

I speed read so:
You have an exceptionally difficult and lengthy list of steps to follow precisely. I see 4 non-invasive ways to flash your router.

Which did you choose?

i have usb ttl key so i can use u-boot with serial

So you feel you have a good understanding of linux.
You stopped the boot mid boot and used an tftp-server?

yes, i stopped the mid boot and use tftp server

What happened when you tried to set the filesize?

tftpboot 0x80000000 openwrt-ar71xx-generic-ubnt-unifiac-squashfs-sysupgrade.bin
erase 0x9f070000 +$filesize
cp.b 0x80000000 0x9f070000 $filesize
bootm 0x9f070000

openwrt start when i set bootm 0x9f070000, after restart hangt at

Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot: 0

Starting application at 0x80200020 ...

TFTP from server 192.168.1.22; our IP address is 192.168.1.20
Filename 'openwrt-23.05.0-ath79-generic-ubnt_unifiac-lr-squashfs-sysupgrade.bin'.
Load address: 0x80000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###########################################################
done
Bytes transferred = 6291796 (600154 hex)
ath> erase 0x9f070000 +$filesize
Erase Flash from 0x9f070000 to 0x9f67ffff in Bank # 1
First 0x7 last 0x67 sector size 0x10000
................................................................................................. done
Erased 97 sectors
ath> cp.b 0x80000000 0x9f070000 $filesize
Copy to Flash... write addr: 9f070000
done
ath> bootm 0x9f070000

Booting image at 9f070000 ...

Image Name: MIPS OpenWrt Linux-5.15.134
Created: 2023-10-09 21:45:35 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2328616 Bytes = 2.2 MB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum at 0x9f070040 ...OK
Uncompressing Kernel Image ... OK

That looks premature.

Here are the notes:

If the 'filesize' variable is not set or seems to be wrong try to do it manually:

tftpboot 0x80000000 openwrt-ar71xx-generic-ubnt-unifiac-squashfs-sysupgrade.bin

Please note how many bytes (in hexadecimal) were copied over e.g. 0x3F0004. It is stated after the file transfer is complete.

Then the notes are:


erase 0x9f070000 +0x790000 cp.b 0x80000000 0x9f070000 0xXXXXXX bootm 0x9f070000

Replace 0xXXXXXX with the number of bytes copied over.

The OEM firmware, which is still on the secondary firmware partition can be later booted either automatically as failover, or manually in U-Boot:

bootm 0x9f800000

Now those numbers are supposed to be known by you or known when you tried. Did you follow that?

$filesize is supposed to be entered in the first set of notes by U-boot.

I cannot reply again until you do.

Are you overwhelmed?

ath> tftpboot 0x80000000 openwrt-19.07.7-ar71xx-generic-ubnt-unifiac-lr-squashfs-sysupgrade.bin
Trying eth0
Using eth0 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.20
Filename 'openwrt-19.07.7-ar71xx-generic-ubnt-unifiac-lr-squashfs-sysupgrade.bin'.
Load address: 0x80000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##########################
done
Bytes transferred = 4456452 (440004 hex)
ath> erase 0x9f070000 +0x790000
Erase Flash from 0x9f070000 to 0x9f7fffff in Bank # 1
First 0x7 last 0x7f sector size 0x10000
......................................................................................................................... done
Erased 121 sectors
ath> cp.b 0x80000000 0x9f070000 0x440004
Copy to Flash... write addr: 9f070000
done

root@OpenWrt:/# [ 69.325640] Removing MTD device #5 (rootfs_data) with use count 1
[ 69.344053] reboot: Restarting system

U-Boot unifi-v2.0.16.313-gca8cd509 (Oct 27 2023 - 11:24:48)

DRAM:
sri
ath_ddr_initial_config(278): (ddr2 init)
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0xf, 0xf, 0xf, 0xf)
128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ff3800, log_magic:0x00000000 kseg: 0xa0000000
Top of RAM usable for U-Boot at: 87ff3000
Reserving 248k for U-Boot at: 87fb4000
Reserving 192k for malloc() at: 87f84000
Reserving 44 Bytes for Board Info at: 87f83fd4
Reserving 36 Bytes for Global Data at: 87f83fb0
Reserving 128k for boot params() at: 87f63fb0
Stack Pointer at: 87f63f98
Now running in RAM - U-Boot at: 87fb4000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initialize...
Fetching MAC Address from 0x9fff0000
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly ----> S17 PHY *
ath_gmac_enet_initialize: is_s17()=0, is_ar8033()=1, phy id1=4d phy_id2=d074
WAN AR8033 PHY init
athrs_ar8033_reg_init: Done 111
Max resets limit reached exiting...
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: b4:db:cf:96:df:44
eth0 up
eth0
Setting 0x181162c0 to 0x1c382100
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot: 0

Starting application at 0x80200020 ...

Boot lights never go steady white?

no, its stay whtie light, i can login to openwrt set static ip log to gui, but after reset uboy hangt at Starting application at 0x80200020 ...

manulaly run bootm 0x9f070000 start openwrt again

Hmmm, I reaad it has no GUI. hold please

What OS did you use to talk to OpenWrt?

windows 10