What happens to installed packages on a sysupgrade in OpenWRT?
You can backup your list of installed packages:
opkg list-installed | cut -f 1 -d ' ' > /etc/config/packages.list
(Put it into /etc/config folder so it will get retained between firmware updates)
and then after the update:
cat /etc/config/packages.list | opkg install
The OpenWRT Wiki says you can't keep existing binaries, but need to reinstall them.
In particular, any manually installed software packages you may have installed after the initial OpenWrt installation have to be reinstalled after an OpenWrt upgrade. That way everything will match, e.g. the updated Linux kernel and any installed kernel modules.
Any configuration files or data files placed in locations not specifically listed as being preserved below will also be lost in an OpenWrt upgrade. Be sure to check any files you have added or customized from a default OpenWrt install to back up these items before an upgrade.
However, Tolaris gives the following command to take a list of your installed packages:
opkg list-installed | cut -f 1 -d ' '