I have been using OpenWRT for many years, but I use it in a specific way. I always build custom image and put all relevant config files into the image, so when I flash the image, I do not have to do anything else and it runs right from the bat exactly in the state I want it.
So far I have been using this approach on TL-WR1043ND (v1 and v2) and I always used
factory image for the upgrade, because I believed that
sysupgrade might leave some leftovers from the previous version behind.
Recently however I have tried to upgrade Archer C7 (v5) several times with
factory upgrade and bricked the device (boot failed with "Bad magic number") and I had to rescue the device with TFTP boot. For some reason, booting the same image via TFTP worked.
I was surprised and tried to find out what is the correct way to upgrade the system, and most importantly, what is really the difference between
factory images. To my surprise I only found some recommendations and sometimes even contradicting, like never use
factory on the system which already runs OpenWRT (I did it for past 10 years), or use sysupgrade when you want to preserve the config (which I did not).
I wonder, is there a wiki or a technical reference, which clarifies the topic? And why it behaves differently on two different devices?