
This commit introduces Broadcom's bnxt_en and bnxt_re out-of-tree drivers, version 220.0.13.0, to StarlingX, and disables the in-tree bnxt_en driver. (For clarity, the main driver package file name is "bcm_220.0.83.0.tar.gz".) There is a need to build Broadcom's driver against the version of the Infiniband/RDMA code base bundled with Mellanox OFED (OpenFabrics Enterprise Distribution), because the in-tree kernel Infiniband/RDMA modules are disabled, and Mellanox OFED's out-of-tree Infiniband/RDMA modules replace the in-tree versions. A custom spec file was used, despite the fact that the Broadcom device driver package includes a source RPM file. This was necessary due to two reasons: - The source RPM file has whitespace between its field labels (such as Name, Version, Release, and so on) and the values of these fields. (Example: "Name : bnxt_en") This unfortunately breaks "build-pkgs --edit", which cannot handle the whitespace during the extraction of the source RPM. - More importantly, the spec file included by Broadcom has the following lines in its %prep section, which does not use the %setup macro: %prep #%setup mkdir -p source tar -xzvf %{SOURCE0} -C source/ mv -f source/netxtreme-%name-%{version}-220.0.13.0/* source/ rm -rf source/netxtreme-%name-%{version}-220.0.13.0/ cp ./source/%{bnxt_re_driver}/README.TXT ./source/%{bnxt_re_driver}/%{bnxt_re_driver}_README.TXT cp ./source/%{bnxt_en_driver}/README.TXT ./source/%{bnxt_en_driver}/%{bnxt_en_driver}_README.TXT mkdir -p obj This is problematic, because the "build-pkgs --edit" procedure extracts the source RPM multiple times into the same directory to ensure that the extraction is stable. However, the %prep section quoted above does not remove the 'source' directory before attempting to populate it. (Unfortunately, this issue is not patchable using a meta-patch, because the extraction occurs even before the application of meta-patches.) This in turn triggers the following errors: + mv -f source/netxtreme-bnxt_en-1.10.2-220.0.13.0/Makefile \ source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_en \ source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_en-1.10.2-220.0.13.0 \ source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_re \ source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_re-220.0.12.0 \ source/ mv: cannot move 'source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_en-1.10.2-220.0.13.0' \ to 'source/bnxt_en-1.10.2-220.0.13.0': Directory not empty mv: cannot move 'source/netxtreme-bnxt_en-1.10.2-220.0.13.0/bnxt_re-220.0.12.0' \ to 'source/bnxt_re-220.0.12.0': Directory not empty error: Bad exit status from .../std/srpm_work/bnxt_en/var/tmp/rpm-tmp.cDTpOP (%prep) Bad exit status from .../std/srpm_work/bnxt_en/var/tmp/rpm-tmp.cDTpOP (%prep) The changes made to the spec file are as follows: - Reliance on Red Hat's kernel module packaging RPM spec macros (such as %kernel_module_package) is removed, because the aforementioned macros make use of the kmodtool helper program, which automatically generates an RPM post-installation and post-uninstallation sections making use of the weak-modules utility, which StarlingX does not use/support. It is not possible to disable this behaviour of the kmodtool script ("/usr/lib/rpm/redhat/kmodtool") with a command line option or an environment variable. - The spec file is reorganized to build the kernel module against only a single kernel "flavour", as StarlingX does not use the kernel flavour concept. - The %build process is modified so that instead of using the top-level makefile (which does not take certain variables as arguments), the bnxt_en- and bnxt_re-specific makefiles are called with make separately. This allows passing KDIR, KVER and OFED_VERSION make variables as command line arguments to make. - The use of the devtoolset-8 software collection was added to align to the kernel's build toolchain. - The spec file is modified to detect the OFED version and pass the version to the bnxt_re makefile as the OFED_VERSION environment variable. This is necessary to automatically adapt to the version of OFED installed in the build environment. - The %post and %postun scriptlets are modified to make them similar to the ones used by i40e, which passes the target kernel's version to depmod. The original %post only had 'depmod -a', which can be problematic when installing the package for a kernel that is not currently running. - Kernel module signing was added to %install. This shell snippet was adapted from i40e. - Finally, retpolines were enabled by default, given that StarlingX enables retpolines in its kernel packages as well. In terms of source code modifications, the following changes were made to bnxt_en and bnxt_re: - The bnxt_en and bnxt_re kernel modules are patched to make use of the irq_update_affinity_hint function instead of the irq_set_affinity_hint function, so that the irqaffinity= kernel command line option takes effect for the affinities of the IRQs managed by the two drivers. However, it should be noted the changes in bnxt_en are not truly necessary, because pre-existing conditional compilation directives leave out the modified code when targeting kernels >= v4.15 or kernels that have the "IRQ matrix allocator" feature. The changes are kept for completeness, nevertheless. For further details, please see the patch description. - A compilation failure caused by the definition of a placeholder macro aimed to stand in for the bpf_warn_invalid_xdp_action function in the kernel tree is resolved by removing the macro definition. Testing: - An ISO image was successfully built with a monolithic incremental build procedure. - Using a virtual machine in All-in-One simplex configuration, the bnxt_en and bnxt_re kernel modules were confirmed to be successfully loaded manually using, for example, "modprobe -v -a bnxt_en bnxt_re". Runtime tests for these drivers were unfortunately very limited, because the necessary hardware has not yet been acquired. We intend to resolve integration issues when hardware is acquired. Story: 2009915 Task: 44762 Depends-On: https://review.opendev.org/c/starlingx/kernel/+/833463 Depends-On: https://review.opendev.org/c/starlingx/tools/+/833462 Change-Id: Ieb4147335410160a781382b0b6b01e2015468a3b Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
18 lines
2.4 KiB
Plaintext
18 lines
2.4 KiB
Plaintext
dpdk-20.05.tar.gz#dpdk-20.05#https://fast.dpdk.org/rel/dpdk-20.05.tar.gz#http##
|
|
drbd-8.4.11-1.tar.gz#drbd-8.4.11-1#http://www.linbit.com/downloads/drbd/8.4/drbd-8.4.11-1.tar.gz#http##
|
|
e1000e-3.6.0.tar.gz#e1000e-3.6.0#https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.6.0/e1000e-3.6.0.tar.gz#http##
|
|
i40e-2.17.4.tar.gz#i40e-2.17.4#https://sourceforge.net/projects/e1000/files/i40e%20stable/2.17.4/i40e-2.17.4.tar.gz/download#https##
|
|
iavf-4.3.19.tar.gz#iavf-4.3.19#https://sourceforge.net/projects/e1000/files/iavf%20stable/4.3.19/iavf-4.3.19.tar.gz/download#https##
|
|
ice-1.7.16.tar.gz#ice-1.7.16#https://sourceforge.net/projects/e1000/files/ice%20stable/1.7.16/ice-1.7.16.tar.gz/download#https##
|
|
ixgbe-5.6.5.tar.gz#ixgbe-5.6.5#https://sourceforge.net/projects/e1000/files/ixgbe%20stable/5.6.5/ixgbe-5.6.5.tar.gz/download#http##
|
|
ixgbevf-4.6.3.tar.gz#ixgbevf-4.6.3#https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/4.6.3/ixgbevf-4.6.3.tar.gz/download#http##
|
|
!kernel-rt-4.18.0-147.3.1.rt24.96.el8_1.src.rpm#kernel-rt#https://git.centos.org/rpms/kernel-rt#http_script#327ec52423c67051249291f131ec7f6fff44a828#post-dl-script/kernel-rt.sh
|
|
!MLNX_OFED_SRC-5.5-1.0.3.2.tgz#MLNX_OFED_SRC-5.5-1.0.3.2#https://content.mellanox.com/ofed/MLNX_OFED-5.5-1.0.3.2/MLNX_OFED_SRC-5.5-1.0.3.2.tgz#http_script##unused
|
|
opae-intel-fpga-driver-2.0.1-8.tar.gz#opae-intel-fpga-driver-2.0.1-8#https://github.com/OPAE/opae-sdk/releases/download/1.3.7-4/opae-intel-fpga-driver-2.0.1-8.tar.gz#http##
|
|
!qat1.7.l.4.5.0-00034.tar.gz#quickassist#https://01.org/sites/default/files/downloads/qat1.7.l.4.5.0-00034.tar.gz#http_script##post-dl-script/qat1.7.sh
|
|
!QAT1.7.L.4.14.0-00031.tar.gz#quickassist#https://downloadmirror.intel.com/30178/eng/QAT1.7.L.4.14.0-00031.tar.gz#http_script##unused
|
|
!dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz#dpdk-kmods#git://dpdk.org/dpdk-kmods/#git#2a9f0f72a2d926382634cf8f1de10e1acf57542b##
|
|
!OPAE_1.3.7-5_el7.zip#OPAE#https://github.com/OPAE/opae-sdk/releases/download/1.3.7-5/OPAE_1.3.7-5_el7.zip#http_script##unused
|
|
!800-Series-DDP-Comms-Package-1.3.31.0.zip#unused-field#https://downloadmirror.intel.com/713853/800%20Series%20DDP%20Comms%20Package%201.3.31.0.zip#http_script##unused
|
|
!bcm_220.0.83.0.tar.gz#bcm_220.0.83.0#https://docs.broadcom.com/docs-and-downloads/ethernet-network-adapters/NXE/BRCM_220.0.83.0/bcm_220.0.83.0.tar.gz#http_script#85bdfc30b4bd3e184e3b57a48055c11085e3b97593f7b4a8347fa50a9d571336#unused
|