Struggling to build from 7.22.1 SDK - Ubuntu 22.04.5 LTS

In my quest for a working bind-nsupdate binary that I can run on my RUTX11 7.22.x, I decided to try compiling my own with the RutOS SDK. Never done it before. “How hard could it be?” I thought naively.

Off I went to follow the directions. 4 hours later, I gave up.

I spun up a fresh Ubuntu 22 VM as per the recommendation… 8GB RAM, 4 CPUs, 100GB SSD space. installed the prereq’s, downloaded the SDK…

First hurdle, when I installed nodejs with apt install -y nodejs npm it gave me v12. I ended up having to do:

curl -fsSL https://deb.nodesource.com/setup_20.x | bash -

Looks ok now

# node -v
v25.9.0

So then I proceeded with

./scripts/feeds update -a
make -j$(nproc)

It churned away for a while, and then errored out with

WARNING: Makefile 'package/lang/lua/luasocket/Makefile' has a build dependency on 'luasrcdiet/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-ip/Makefile' has a build dependency on 'luci-base/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-ip/Makefile' has a build dependency on 'csstidy/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-ip/Makefile' has a build dependency on 'luasrcdiet/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-nixio/Makefile' has a build dependency on 'luci-base/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-nixio/Makefile' has a build dependency on 'csstidy/host', which does not exist
WARNING: Makefile 'package/libs/luci-lib-nixio/Makefile' has a build dependency on 'luasrcdiet/host', which does not exist
make[2]: Entering directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/scripts/config'
cc -O2    -c -o conf.o conf.c
cc   conf.o confdata.o expr.o lexer.lex.o menu.o parser.tab.o preprocess.o symbol.o util.o   -o conf
make[2]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/scripts/config'
time: target/linux/prereq#0.07#0.01#0.08
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
 make[1] world
 make[2] tools/compile
 make[2] package/cleanup
 make[3] -C tools/flock compile
 make[3] -C tools/xz compile
 make[3] -C tools/sed compile
 make[3] -C tools/patch compile
 make[3] -C tools/tar compile
    ERROR: tools/tar failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/include/toplevel.mk:249: world] Error 1

So as suggested I tried with V=sc and got (full output at gist)

configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
make[3]: *** [Makefile:36: /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/build_dir/host/tar-1.32/.configured] Error 1
make[3]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/tools/tar'
time: tools/tar/compile#6.28#2.08#11.23
    ERROR: tools/tar failed to build.
make[2]: *** [tools/Makefile:159: tools/tar/compile] Error 1
make[2]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk'
make[1]: *** [tools/Makefile:155: /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/host/stamp/.tools_compile_yyynyynnyynynyyyyynyynnyynyyyynyyyyyyyyyyyyynynyyyyyyyyy] Error 2
make[1]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk'
make: *** [/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/include/toplevel.mk:249: world] Error 2

So I tried adding export FORCE_UNSAFE_CONFIGURE=1 (which I’m not sure about since it wasn’t in the docs anywhere) and got tens of thousands of lines of output, and after about 30 minutes… error

/python3-sqlite3/. /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/'
touch /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp/.python3-sqlite3_installed
mkdir -p /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp
SHELL= flock /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/tmp/.root-copy.flock -c 'cp -fpR /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.11.7/.pkgdir/python3-urllib/. /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/'
touch /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp/.python3-urllib_installed
mkdir -p /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp
SHELL= flock /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/tmp/.root-copy.flock -c 'cp -fpR /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.11.7/.pkgdir/python3-uuid/. /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/'
touch /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp/.python3-uuid_installed
mkdir -p /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp
SHELL= flock /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/tmp/.root-copy.flock -c 'cp -fpR /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.11.7/.pkgdir/python3-xml/. /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/'
touch /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/stamp/.python3-xml_installed
make[3]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/package/lang/python/python3'
time: package/lang/python/python3/compile#311.25#20.35#260.30
make[2]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk'
make[1]: *** [package/Makefile:122: /root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/root/src/rutx-sdk/rutos-ipq40xx-rutx-sdk'

I’ve run make clean and make distclean a couple of times as well to reset the process but, still stuck.

Any tips for moving this along? Is the 7.22.1 SDK working?

Hello,

I have successfully compiled it in native mode using centos10 stream and a few tricks:

  • make -j 1 V=sc package/network/services/samba36/compile (cause probable makefile bug)
  • make -j 1 V=sc package/libs/p11-kit/compile (idem makefile synchro bug ?)
  • disable javac in make menuconfig → Languages
  • disable classpath in make menuconfig→libs

Then time make -k

After a few minutes:

-rw-r--r--. 1 x x 29020479 Apr 15 01:17 openwrt-ipq40xx-generic-teltonika_rutx-squashfs-sysupgrade.bin

Don’t execute make distclean the SDK isn’t an OpenWRT distribution you’ll erase a lot of mandatory files.

And of course don’t compile as root.

Regards,

But… docs say use Ubuntu 22? And nothing about these special tricks needed. Seems a fool’s errand. I will keep trying…

My goal is to compile a working version of bind-nsupdate so I hope I will be able to figure that part out…

Why don’t you use knot-nsupdate then ? No need to compile just install it.

opkg -e /etc/opkg/openwrt/distfeeds.conf update
opkg -e /etc/opkg/openwrt/distfeeds.conf list | grep nsupdate
bmx7-dnsupdate - 0.1-2 - bmx7-dnsupdate
ddns-scripts-digitalocean - 2.8.2-12 - Dynamic DNS Client scripts extension for "digitalocean.com API v2". The script directly updates a DNS record using the DO API. It requires: "option dns_server" to be set to the server to be used by nsupdate. "option domain" the dns domain to update the record for (eg. A-record: home.<example.com>) "option username" the dns record name to update (eg. A-record: <home>.example.com) "option param_opt" the id of the dns record to update (check using chrome inspector in the DO dns tab) "option password" the api token generated in the DO panel
ddns-scripts-nsupdate - 2.8.2-12 - Dynamic DNS Client scripts extension for direct updates using bind nsupdate The script directly updates a PowerDNS (or maybe bind server) via nsupdate from bind-client package. It requires: "option dns_server" to be set to the server to be used by nsupdate. "option username" should be set to the key name and "option password" to the base64 encoded shared secret.
ddns-scripts_nsupdate - 2025-02-06-1
knot-nsupdate - 3.2.4-2 - Knot DNS dynamic DNS update utility.
samba4-server - 4.14.12-2 - installs: smbd (nmbd) smbpasswd pdbedit testparm (nmblookup) (smbcacls sharesec) (samba samba-tool ntlm_auth samba-gpupdate samba_dnsupdate samba_kcc samba_spnupdate samba_upgradedns samba_downgrade_db)  This provides the basic fileserver service and is the minimum needed to serve file shares. HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
snsupdate - 1.0
thc-ipv6-fake-dnsupdate6 - 2.7-1 - This package contains the fake_dnsupdate6 utility of the THC-IPv6 toolkit.

Doesn’t show up for me:

# opkg -e /etc/opkg/openwrt/distfeeds.conf list | grep nsupdate
ddns-scripts_nsupdate - 2026-03-16-1
snsupdate - 1.3
thc-ipv6-fake-dnsupdate6 - 2.7-1 - This package contains the fake_dnsupdate6 utility of the THC-IPv6 toolkit.

Strange. It is present in the SDK.

Anyone at Teltonika got any ideas here? I’m going bananas.

Hi, what is inside your /etc/opkg/openwrt/distfeeds.conf file? I can see that knot-nsupdate is available in Index of /releases/24.10.5/packages/arm_cortex-a7_neon-vfpv4/packages/ you could try changing packages line to

src/gz openwrt_packages https://downloads.openwrt.org/releases/24.10.5/packages/arm_cortex-a7_neon-vfpv4/packages

maybe it will help or manually download the IPK and install using opkg install, although you will also need to install the depends by hand

Thanks @Jakubcze9513 I reset my /etc/opkg/* feeds and was able to install knot-nsupdate. The TSIG key format differs from the standard files produced by BIND’s tsig-keygen so that was another hurdle. But, I got it working at last.

I don’t want to close this because the original question still remains: What are the exact steps to build from 7.22.1 SDK from first boot of the VM to successful generation of a firmware.bin file? The steps from the documentation simply do not work.

I have successully compiled a knot-nsupdate using this SDK (I wanted a patched knot-dig). Nasty.

I don’t know the answer for an Ubuntu VM I use a native centos 10 one the process shouldn’t be very different:

  • extract the tar archive: tar xovfz Downloads/RUTX_R_GPL_00.07.22.1.tar.gz
  • cd rutos-ipq40xx-rutx-sdk
  • ./scripts/feeds update -a
  • make menuconfig, disable javac and classpath as described above
  • time make -k ==> this will fail because makefiles are a mess
  • make -j 1 V=sc package/network/services/samba36/compile
  • make -j 1 V=sc package/libs/p11-kit/compile
  • time make -k ==> this time it will complete check bin/targets/ipq40xx/generic/tltFws it should contain a firmware file.

Now the nasty part. The package/feeds/packages folder is empty you need to create the following links:

lrwxrwxrwx. 1 x x 35 Apr 15 21:12 gnutls → ../../../feeds/packages/libs/gnutls
lrwxrwxrwx. 1 x x 32 Apr 15 21:01 knot → ../../../feeds/packages/net/knot
lrwxrwxrwx. 1 x x 36 Apr 15 21:39 libedit → ../../../feeds/packages/libs/libedit
lrwxrwxrwx. 1 x x 36 Apr 15 21:33 liburcu → ../../../feeds/packages/libs/liburcu
lrwxrwxrwx. 1 x x 33 Apr 15 21:36 lmdb → ../../../feeds/packages/libs/lmdb

nettle is missing in package/libs, copy it from another openwrt (the most recent git tree will do):

[x@y rutos-ipq40xx-rutx-sdk]$ l package/libs/nettle/
total 12
drwxr-xr-x. 3 x x 54 Apr 15 21:26 .
drwxr-xr-x. 84 x x 4096 Apr 15 21:26 ..
-rw-r–r–. 1 x x 305 Apr 15 21:26 Config.in
-rw-r–r–. 1 x x 2323 Apr 15 21:26 Makefile
drwxr-xr-x. 2 x x 35 Apr 15 21:26 patches

From make menuconfig, enable knot-nsupdate and check that all the required libraries are also enabled. You can use M to build the packages only or * to have them included in the image.

Now re-execute time make -k, your packages should appear in bin/packages/arm_cortex-a7_neon-vfpv4/packages:

[x@y rutos-ipq40xx-rutx-sdk]$ l bin/packages/arm_cortex-a7_neon-vfpv4/packages/
total 1236
drwxr-xr-x. 2 x x 4096 Apr 15 21:41 .
drwxr-xr-x. 8 x x 90 Apr 15 01:17 ..
-rw-r–r–. 1 x x 1 Apr 15 01:17 Packages
-rw-r–r–. 1 x x 21 Apr 15 01:17 Packages.gz
-rw-r–r–. 1 x x 1 Apr 15 01:17 Packages.manifest
-rw-r–r–. 1 x x 100229 Apr 15 21:41 knot-libs_3.1.0-1_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 52409 Apr 15 21:41 knot-libzscanner_3.1.0-1_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 28834 Apr 15 21:41 knot-nsupdate_3.1.0-1_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 64788 Apr 15 21:40 libedit_20210419-3.1-1_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 894911 Apr 15 21:29 libgnutls_3.7.1-1_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 58356 Apr 15 21:35 liburcu_0.12.2-3_arm_cortex-a7_neon-vfpv4.ipk
-rw-r–r–. 1 x x 36175 Apr 15 21:38 lmdb_0.9.28-1_arm_cortex-a7_neon-vfpv4.ipk

As mentioned before, don’t use root to build the SDK.

Have fun.

Thanks @vogon I will take another stab at it. @Vilius I notice a similar thread here. I’d appreciate if you would comment on whether the above is expected for SDK builds, or if there will be an official update to the docs?

Greetings, @luckman212 ,

I am currently consulting with our R&D team regarding this issue, I will post an update in this topic once I have more information on the matter.

All the best,
V.

Hello,

For troubleshooting purposes, we will require more sensitive information from your end, such as the troubleshoot file, which may contain passwords, public IP addresses, serial numbers, and such. To avoid leaking this information, we have sent you a form to fill out, which you will receive in your e-mail inbox that you have registered your account with in the forums. In the Ticket ID field of the form, please enter the ID of this thread, which is 18872.

Please let me know once you filled out the form.

Thank you,
V.

Thank you, I have submitted the contact form

Just updating the public facing side since I’ve made progress…

I was able to compile the 3 necessary IPK files (libuv, bind-libs, and bind-client) to restore a working nsupdate binary to my RUTX running 7.22.1

These were roughly my steps.

Very important to not perform these steps as root.

./scripts/feeds update -a
./scripts/feeds install bind-client
make menuconfig

• Target Profile → RUTX11
• Libraries → bind-libs → M
• Network → IP Addresses and Names → bind-client → M
• Save and exit

make tools/install -j$(nproc)
make toolchain/install -j$(nproc)

make package/feeds/packages/bind/compile V=s

Finally, transfer ipks to the RUT

scp bin/packages/arm_cortex-a7_neon-vfpv4/packages/*.ipk root@rutx:/tmp

and install, in this order:

opkg install /tmp/libuv*.ipk
opkg install /tmp/bind-libs*.ipk
opkg install /tmp/bind-client*.ipk

Not sure if this is the “correct” procedure, but it did seem to work.

Thank you for sharing this,

I have forwarded this information to our R&D team to aid them with the investigation. I will inform you once I have an update on the matter.

Kind regards,
V.

Just wanted to post that I successfully compiled the bind-client .ipk for RutOS 7.23 using the new SDK. So far so good.