Hi, I'm a newbie to OpenWRT so hope this is a simple issue.
After install ethtool package "ethtool" getting "ethtool: not found" message. Want to check HW for PTP suitability. ethtool is in /usr/sbin but calling it from /usr with './ethtool' reports same message. Tried reboot ...
Thank you for your assistance, though not yet resolved I believe the issue is covered in an existing support ticket.
According to this ticket I need a latter x-compiler for my build server, Ubuntu 20.04, or a later version of openwrt. I'm doing a git pull from https://github.com/linux4sam/linux-at91, but this appears to build as 19.07.2, where would I find 21.02 please?
Or failing that just a link to update build x-compile chain for the 19.07.2 baseline I believe will resolve the issue.
Illustration of the original issue below,
root@OpenWrt:/usr/sbin# opkg install ethtool
Package ethtool (5.2-1) installed in root is up to date.
root@OpenWrt:/usr/sbin# ethtool
/bin/ash: ethtool: not found
root@OpenWrt:/usr/sbin# ./ethtool
/bin/ash: ./ethtool: not found
root@OpenWrt:/usr/sbin# ls -l | grep eth
-rwxr-xr-x 1 root root 73727 Mar 10 2021 ethtool
root@OpenWrt:/usr/sbin#
ethtool does exist for that platform and release version (it is found in the packages/arm_arm926ej-s/base directory).
That is made clear by the download path for the opkg install, and the fact that it succeeded in installing (at least according to the opkg package manager system).
If it didn't exist, opkg would have thrown an error.
Upgrading to 21.02 is not required for ethtool. (although it is recommended for other reasons).
I will agree that there is something unusual about the filename that is downloaded
doesn't seem to match this (the actual file in the downloads directory): https://downloads.openwrt.org/releases/19.07.2/packages/arm_arm926ej-s/base/ethtool_5.2-1_arm_arm926ej-s.ipk
I cannot explain that discrepancy, but the OP has demonstrated that the file is clearly downloaded and installed (again, no opkg errors) and that the binary exists in the expected directory location (/usr/sbin/ethtool).
The build you're running is glibc based, OpenWrt's binary package repositories expect a musl libc environment. The not found error you see is the kernel failing to locate the required dynamic linker /lib/ld-musl-*.so requested by the ethtool executable.
TL;DR: you cannot use official OpenWrt packages with your current build