Sysupgrade results in Brick

I am trying to perform sysupgrade on Tp-link eap225 router. Installation seems to be fine, however whenever i try to perform sysupgrade it results in bricking of the router.

root@OpenWrt:/tmp# sysupgrade -i openwrt-ar71xx-generic-ap152-16M-squashfs-sysup
Keep config files over reflash (Y/n): Y
Edit config file list (y/N): N
Saving config files...
killall: watchdog: no process killed
Sending TERM to remaining processes ... logd rpcd netifd uhttpd smbd nmbd dnsmasq ntpd zebra watchquagga Oct 21 11:23:50 watchquagga[2248]: Tel
Sending KILL to remaining processes ... 
Switching to ramdisk...
Performing system upgrade...
Unlocking firmware ...

Writing from <stdin> to firmware ...     
Appending jffs2 data from /tmp/sysupgrade.tgz to firmware...

Writing from <stdin> to firmware ...  [w]TRX header not found
Error fixing up TRX header
Upgrade completed
Reboot (Y/n): Y
Rebooting system...
[  336.582862] Removing MTD device #5 (rootfs_data) with use count 1
[  336.622747] reboot: Restarting system

U-Boot 1.1.4--LSDK-10.2-00082-4 (Jun 29 2016 - 17:02:23)

board956x - Dragonfly 1.0DRAM:  
ath_ddr_initial_config(287): (ddr2 init)
ath_sys_frequency: ref_clk 25000000
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0x10, 0x10, 0x10, 0x10)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 164k for U-Boot at: 87fd4000
Reserving 192k for malloc() at: 87fa4000
Reserving 44 Bytes for Board Info at: 87fa3fd4
Reserving 36 Bytes for Global Data at: 87fa3fb0
Reserving 128k for boot params() at: 87f83fb0
Stack Pointer at: 87f83f98
Now running in RAM - U-Boot at: 87fd4000
Flash Manuf Id 0xc8, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Setting 0x181162c0 to 0x40802100
Hit Ctrl+B to stop autoboot:  0 
## No elf image at address 0x9f040000
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200 
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
AR8033 PHY reg init 
Max resets limit reached exiting...
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up

If I read your notes correctly, you’re flashing an image for one device (ap152) onto another (eap225). In general, only the image got the specific board should be used. Others, even if the same SoC, can permanently destroy data required for the device's operation and potentially damage the board permanently.

1 Like

Thanks for the reply, Jeff. As i mentioned, AP152 build worked perfectly fine on EAP225. This problems arises only when i perform sysupgrade operation. Otherwise, the build is working just fine.

Then you need to create an image for the EAP225 that properly implements sysupgrade for the device.

After following that guide, i was able to create configuration file of my board. That's why i was able to generate the kernel image and squashfs rootfs image. But the problem regarding sysupgrade remains the same.