The process is pretty simple.
First of all you have to figure out the architecture of your device. Take a look at /etc/opkg/distfeeds.conf. Mine looks like:
root@rutx12:/etc/opkg# cat distfeeds.conf
src/gz openwrt_core http://downloads.openwrt.org/releases/18.06.8/targets/ipq40xx/generic/packages
src/gz openwrt_base http://downloads.openwrt.org/releases/18.06.8/packages/arm_cortex-a7_neon-vfpv4/base
src/gz openwrt_luci http://downloads.openwrt.org/releases/18.06.8/packages/arm_cortex-a7_neon-vfpv4/luci
src/gz openwrt_packages http://downloads.openwrt.org/releases/18.06.8/packages/arm_cortex-a7_neon-vfpv4/packages
src/gz openwrt_routing http://downloads.openwrt.org/releases/18.06.8/packages/arm_cortex-a7_neon-vfpv4/routing
src/gz openwrt_telephony http://downloads.openwrt.org/releases/18.06.8/packages/arm_cortex-a7_neon-vfpv4/telephony
From this listening I could see that the base version of OpenWRT used by my RUTX12 is 18.06.8 and the architecture is arm_cortex-a7_neon-vfpv4.
Now, look for the latest version of zerotier package. I found one in the OpenWRT 19.07.5 version. The download link is https://downloads.openwrt.org/releases/19.07.5/packages/arm_cortex-a7_neon-vfpv4/packages/zerotier_1.6.2-2_arm_cortex-a7_neon-vfpv4.ipk. You can clearly see the OpenWRT version and the architecture.
When you have the package ready, do the following:
- Rename the package to something with .tar.gz extension and unpack it.
- Locate data.tar.gz file created by the previous unpacking and extract it as well.
- Finally, locate the zerotier-one executable (it is in usr/bin/ directory) in the product of extraction of the previous step.
- Copy the new zerotier-one file to your device (scp) to /root/.
- SSH into your device.
- Back-up original version in case of disaster happens: mv /usr/bin/zerotier-one /usr/bin/zerotier-one-original
- Copy the new version: cp /root/zerotier-one /usr/bin/
- Inspect dynamic libraries: ldd /usr/bin/zerotier-one
- Most probably you will see selibminiupnpc.so.17 as missing. The default firmware comes with older version of this library. Simply create new symlink to the existing one. Yes, hack, but works! cd /usr/bin && ls -s libminiupnpc.so libminiupnpc.so.17
- Try zerotier-one -version
- If it gives you the version number (the latest at the time of this writing is 1.6.2), reload the service: service zerotier restart
- You are good to go!
The best way to do the upgrade would be to use the SDK and build the package from scratch. It should be cool to "patch" the Teltonika's package but I don't know if the sources are part of the SDK. Anyway, I do plan to set-up the up-and-running SDK for my router as it seems I need it for other features as well. I'm still dancing around it because I don't have any experience with OpenWRT at all! LOL
Good luck and backup first!
With best regards,
Here are the exact library dependences of the zerotier-one 1.6.2:
root@rutx12:~# ldd /usr/bin/zerotier-one
libminiupnpc.so.17 => /usr/lib/libminiupnpc.so.17 (0xb6ebb000)
libnatpmp.so.1 => /usr/lib/libnatpmp.so.1 (0xb6ea8000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6da8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6d8c000)
libc.so => /lib/ld-musl-armhf.so.1 (0xb6ed6000)
And here are the dependencies for the original version:
root@rutx12:~# ldd /usr/bin/zerotier-one-1.4.6
libminiupnpc.so.16 => /usr/lib/libminiupnpc.so.16 (0xb6f36000)
libnatpmp.so.1 => /usr/lib/libnatpmp.so.1 (0xb6f23000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6e23000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6e07000)
libc.so => /lib/ld-musl-armhf.so.1 (0xb6f51000)
The differences are in bold.