FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
630 views 5 comments
by anonymous
I have a TRB245 device with the latest TRB2_R_00.02.06.1 firware which is based on OpenWRT 19.07.4, and its core repository is http://downloads.openwrt.org/releases/19.07.4/targets/ath79/generic/packages

I need the package kmod-vxlan which contains a kernel module, but I sadly can't install it, because the Teltonika firmware seems to shipped with a customly compiled kernel:

root@Teltonika-TRB245:~# opkg install kmod-vxlan
Installing kmod-vxlan (4.14.195-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.4/targets/ath79/generic/packages/kmod-vxlan_4.14.195-1_mips_24kc.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-vxlan:
 *      kernel (= 4.14.195-1-b84a5a29b1d5ae1dc33ccf9ba292ca1d)
 * opkg_install_cmd: Cannot install package kmod-vxlan.

root@Teltonika-TRB245:~# opkg list-installed | grep kernel
kernel - 4.14.195-1-8ced2290e6b1a33500ee5f7bcda5e762

If I manually copy the kernel module onto the system, and load it by using modprobe, it immediately crashes the kernel and renders the system completely broken, so I have to replace the firmware.

Does Teltonika publish a compatible kmod-vxlan package somewhere, or can I build it somehow for myself?

Thank you in advance,

Tamás Németh
IT sysadmin
Waterworks of Sopron, Hungary

1 Answer

0 votes
by anonymous

Hello,

You can compile a kernel module yourself using the SDK but you will need to install the full generated firmware image if you change the kernel hash.

Regards,

Best answer
by anonymous
Thank you. My Linux system is not supported by the SDK, but I'll install a supported system and give a try of your advice. I'll let you know if I succeed and I'll explain the way I did it.
by anonymous
Which Linux version do you have ? It may work if it isn't too old.
by anonymous
Nah, my system is TOO NEW, to compile anyithing from this (or even the newer, as you will see) SDK. It's an up-to-date OpenSUSE Tumbleweed, so I had to install a virtual Ubuntu 20.04 recommended for the new SDK (https://wiki.teltonika-networks.com/gpl/TRB2_R_GPL_00.07.00.tar.gz). But finally I seemingly succeeded, at least the vxlan kernel module can be loaded without crashing or even any error message in dmesg, and I can even create vxlan type interfaces. i hope it will work. My steps in succeeding were the following:

- I downloaded an unpacked the SDK, then entered its directory (rutos-ath79-trb2-gpl).
- `./scripts/feeds update -a`
- `make menuconfig`  to enable "kmod-vxlan" as a module in "Kernel modules" / "Network Support"
- `make -j $(nproc)` (I had to build the entire firware, because building only the kernel ended prematurey because of some error.)
- Now i have the loadable firmware in `bin/targets/ath79/generic/tltFws` and the kmod-vxlan package in `bin/targets/ath79/generic/packages`

- I upgrade the router with the matching firmware from Teltonika (https://wiki.teltonika-networks.com/wikibase/images/4/48/TRB2_R_00.07.00_WEBUI.bin)
- I upload the freshly build kmod-vxlan package to the router somehow (e.g: `ssh root@192.168.1.1 'cat > /root/kmod-vxlan_4.14.221-1_mips_24kc.ipk' < kmod-vxlan_4.14.221-1_mips_24kc.ipk`)
- Now I log into the router and install the package, but - according to my experiences - I had to be careful not to let the router download the kmod-vxlan package from online repositories, so I don't run `opkg update`, and don't let the router to connect to the internet. The command is the following: `opkg install /root/kmod-vxlan_4.14.221-1_mips_24kc.ipk`
- Now i connect to the internet, and install the remaining necessary packages: `opkg update ; opkg install vxlan ip-bridge`
by anonymous
To avoid the 'opkg update' issue you can remove all the files in /tmp/opkg-lists then execute your opkg install /root/kmod-...
by anonymous
Thx, bro. I'm not quite acquainted with OpenWRT.