I know it's a strange question.
But here's something more strange:
Recently I bought a Nas device, which using Openwrt as firmware...
CPU N6005, version 22.03 built with private snapshot, no firmware image released public (even factory firmware).
Found that anything installed from opkg cannot run, with error "not found"
I figured out why, using ldd check library link, output are as follows:
root@UGREEN-CD13:~# ./list-user-installed-packages.sh
ca-bundle
iptables-nft
libustream-openssl20201210
lscpu
rsync
tailscale
tailscaled
root@UGREEN-CD13:~# cd /usr/sbin/
root@UGREEN-CD13:/usr/sbin# ldd iptables-nft
linux-vdso.so.1 (0x00007ffe6a3fd000)
libiptext.so => /usr/lib/libiptext.so (0x00007fcb07cd5000)
libiptext_ebt.so => /usr/lib/libiptext_ebt.so (0x00007fcb07cd0000)
libiptext4.so => /usr/lib/libiptext4.so (0x00007fcb07cc6000)
libiptext6.so => /usr/lib/libiptext6.so (0x00007fcb07cbc000)
libiptext_arpt.so => /usr/lib/libiptext_arpt.so (0x00007fcb07cb7000)
libmnl.so.0 => /usr/lib/libmnl.so.0 (0x00007fcb07cb0000)
libnftnl.so.11 => /usr/lib/libnftnl.so.11 (0x00007fcb07c80000)
libxtables.so.12 => /usr/lib/libxtables.so.12 (0x00007fcb07c70000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fcb07c5c000)
libc.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007fcb07a63000)
libc.so => not found
libc.so => not found
libc.so => not found
libm.so.6 => /lib/libm.so.6 (0x00007fcb07989000)
/lib/ld-musl-x86_64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007fcb07cec000)
root@UGREEN-CD13:/usr/sbin# cd ../bin
root@UGREEN-CD13:/usr/bin# ldd rsync
linux-vdso.so.1 (0x00007ffcc21cb000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007ff4e36d5000)
libpopt.so.0 => /usr/lib/libpopt.so.0 (0x00007ff4e36c8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007ff4e36b4000)
libc.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007ff4e34bb000)
/lib/ld-musl-x86_64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007ff4e36eb000)
root@UGREEN-CD13:/usr/bin# ldd lscpu
linux-vdso.so.1 (0x00007ffe9339d000)
libsmartcols.so.1 => /usr/lib/libsmartcols.so.1 (0x00007f6c58ca3000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f6c58c8f000)
libc.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007f6c58a96000)
/lib/ld-musl-x86_64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007f6c58cd6000)
root@UGREEN-CD13:/usr/bin# lscpu
-ash: lscpu: not found
I've contacted with the consumer service, got the response that they didn't build firmware with library libc.so at all. I think they meant to do it, to avoid user from installing custom packages.
So if I have no any source from device, can I just copy a libc.so from another system of similar architecture, like N5105 x86_64? Or anyway to recover it?