sonic-buildimage/rules/ethtool.mk

14 lines
373 B
Makefile
Raw Normal View History

# ethtool
ETHTOOL_VERSION_BASE = 5.9
export ETHTOOL_VERSION_BASE
[ethtool]: disable unit test when building ethtool on armhf/arm64 (#7226) Compiling ethtool from source is causing ethtool unit tests to fail on ARM Platforms. These tests are failing: (By default netlink-interface is enabled while compiling ethtool) Link: ([Test File Link](https://salsa.debian.org/kernel-team/ethtool/-/blob/debian/1%255.9-1/test-cmdline.c#L28)) ``` FAIL: test-cmdline ================== E: ethtool 16_char_devname! returns 1 E: ethtool 127_char_devname0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde returns 1 E: ethtool --change devname xcvr external returns 0 E: ethtool --change devname speed 100 duplex half port tp autoneg on advertise 0x1 phyad 1 xcvr external wol p sopass 01:23:45:67:89:ab msglvl 1 returns 0 FAIL test-cmdline (exit status: 1) ``` Tested this on Local ARM Emulated Container: ``` (Docker Container Emulating ARM) vkarri@3a03c70eed35:/tmp/ethtool$ ./ethtool 16_char_devname! netlink interface initialization failed, device name longer than 15 not supported vkarri@3a03c70eed35:/tmp/ethtool$ echo $? 1 (Expected 0) vkarri@3a03c70eed35:~/ethtool$ ./ethtool 16_char_devnameee netlink interface initialization failed, device name longer than 15 not supported Checked for dependencies: (all are present) vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libmnl0 libmnl0: Installed: 1.0.4-2 Candidate: 1.0.4-2 Version table: *** 1.0.4-2 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libc6 libc6: Installed: 2.28-10 Candidate: 2.28-10 Version table: *** 2.28-10 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status ``` #### How I did it Disabled netlink-interface for ethtool. Even though Netlink is not available, it doesn't seem to impact what ethtool was supposed to do. In fact the older version which was in use before this PR [#5725](https://github.com/Azure/sonic-buildimage/pull/5725) did not have netlink support and everything seemed to work well Article on Netlink-Support for ethtool: https://lwn.net/Articles/783633/ Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2021-04-08 11:08:22 -05:00
ETHTOOL = ethtool_$(ETHTOOL_VERSION_BASE)-1_$(CONFIGURED_ARCH).deb
$(ETHTOOL)_SRC_PATH = $(SRC_PATH)/ethtool
SONIC_MAKE_DEBS += $(ETHTOOL)
[ethtool]: disable unit test when building ethtool on armhf/arm64 (#7226) Compiling ethtool from source is causing ethtool unit tests to fail on ARM Platforms. These tests are failing: (By default netlink-interface is enabled while compiling ethtool) Link: ([Test File Link](https://salsa.debian.org/kernel-team/ethtool/-/blob/debian/1%255.9-1/test-cmdline.c#L28)) ``` FAIL: test-cmdline ================== E: ethtool 16_char_devname! returns 1 E: ethtool 127_char_devname0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde returns 1 E: ethtool --change devname xcvr external returns 0 E: ethtool --change devname speed 100 duplex half port tp autoneg on advertise 0x1 phyad 1 xcvr external wol p sopass 01:23:45:67:89:ab msglvl 1 returns 0 FAIL test-cmdline (exit status: 1) ``` Tested this on Local ARM Emulated Container: ``` (Docker Container Emulating ARM) vkarri@3a03c70eed35:/tmp/ethtool$ ./ethtool 16_char_devname! netlink interface initialization failed, device name longer than 15 not supported vkarri@3a03c70eed35:/tmp/ethtool$ echo $? 1 (Expected 0) vkarri@3a03c70eed35:~/ethtool$ ./ethtool 16_char_devnameee netlink interface initialization failed, device name longer than 15 not supported Checked for dependencies: (all are present) vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libmnl0 libmnl0: Installed: 1.0.4-2 Candidate: 1.0.4-2 Version table: *** 1.0.4-2 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status vkarri@3a03c70eed35:~/ethtool$ apt-cache policy libc6 libc6: Installed: 2.28-10 Candidate: 2.28-10 Version table: *** 2.28-10 500 500 http://deb.debian.org/debian buster/main armhf Packages 500 http://packages.trafficmanager.net/debian/debian buster/main armhf Packages 100 /var/lib/dpkg/status ``` #### How I did it Disabled netlink-interface for ethtool. Even though Netlink is not available, it doesn't seem to impact what ethtool was supposed to do. In fact the older version which was in use before this PR [#5725](https://github.com/Azure/sonic-buildimage/pull/5725) did not have netlink support and everything seemed to work well Article on Netlink-Support for ethtool: https://lwn.net/Articles/783633/ Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
2021-04-08 11:08:22 -05:00
ETHTOOL_DBG = ethtool-dbgsym_$(ETHTOOL_VERSION_BASE)-1_$(CONFIGURED_ARCH).deb
$(eval $(call add_extra_package,$(ETHTOOL),$(ETHTOOL_DBG)))
export ETHTOOL ETHTOOL_DBG