wkz / mdio-tools

Low-level debug tools for MDIO devices.
GNU General Public License v2.0
66 stars 31 forks source link

Question install procedure mdio-tools #12

Closed akaeba closed 2 years ago

akaeba commented 2 years ago

Hello WKZ,

i try to install the mdio-tools under Ubuntu 20.04 LTS. Following log:

ubuntu@ubuntu-VirtualBox:~/Desktop/mdio-tools-1.0.1$ cd kernel/
ubuntu@ubuntu-VirtualBox:~/Desktop/mdio-tools-1.0.1/kernel$ make
make -C /lib/modules/5.8.0-53-generic/build M=/home/ubuntu/Desktop/mdio-tools-1.0.1/kernel modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-53-generic'
  CC [M]  /home/ubuntu/Desktop/mdio-tools-1.0.1/kernel/mdio-netlink.o
  MODPOST /home/ubuntu/Desktop/mdio-tools-1.0.1/kernel/Module.symvers
  CC [M]  /home/ubuntu/Desktop/mdio-tools-1.0.1/kernel/mdio-netlink.mod.o
  LD [M]  /home/ubuntu/Desktop/mdio-tools-1.0.1/kernel/mdio-netlink.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-53-generic'
ubuntu@ubuntu-VirtualBox:~/Desktop/mdio-tools-1.0.1/kernel$ cd ..
ubuntu@ubuntu-VirtualBox:~/Desktop/mdio-tools-1.0.1$ ./configure --prefix=/usr && make all && sudo make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for mnl... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating man/Makefile
config.status: creating src/Makefile
config.status: creating src/mdio/Makefile
config.status: creating src/mvls/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make  all-recursive
make[1]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
Making all in man
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
Making all in src
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
Making all in mdio
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
Making all in mvls
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
Making all in include
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
make[1]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
[sudo] password for ubuntu: 
Making install in man
make[1]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/share/man/man8'
 /usr/bin/install -c -m 644 mdio.8 mvls.8 '/usr/share/man/man8'
 /usr/bin/mkdir -p '/usr/share/man/man9'
 /usr/bin/install -c -m 644 mdio-netlink.9 '/usr/share/man/man9'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
make[1]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/man'
Making install in src
make[1]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
Making install in mdio
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
 /usr/bin/mkdir -p '/usr/sbin'
  /usr/bin/install -c mdio '/usr/sbin'
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mdio'
Making install in mvls
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
 /usr/bin/mkdir -p '/usr/sbin'
  /usr/bin/install -c mvls '/usr/sbin'
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src/mvls'
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[3]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
make[1]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/src'
Making install in include
make[1]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[1]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1/include'
make[1]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
make[2]: Entering directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/share/doc/mdio-tools'
 /usr/bin/install -c -m 644 README.md ChangeLog.md COPYING '/usr/share/doc/mdio-tools'
make[2]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
make[1]: Leaving directory '/home/ubuntu/Desktop/mdio-tools-1.0.1'
ubuntu@ubuntu-VirtualBox:~/Desktop/mdio-tools-1.0.1$ sudo mdio
modprobe: FATAL: Module mdio-netlink not found in directory /lib/modules/5.8.0-53-generic
ERROR: mdio-netlink module not detected, and could not be loaded.

If i run the tool after installation, I recieve the error that the kernel module not loaded. As workaround i use

sudo insmod mdio-netlink.ko

Then works the tool proper. Do you have an suggestion?

Thanks for your help. BR, Andreas

wkz commented 2 years ago

mdio will try to load the module (via modprobe) if initialization fails. In order for this to work, the module has to be properly installed - this is done by running make install from the kernel/ directory. This is now documented in the README.