HomeDefectsLIN1022-3664
Fixed

LIN1022-3664 : Unable to generate debug package for i40e-2.22.8 driver on LTS22

Created: Mar 17, 2023    Updated: May 3, 2023
Resolved Date: Apr 19, 2023
Found In Version: 10.22.33.5
Fix Version: 10.22.33.8
Severity: Standard
Applicable for: Wind River Linux LTS 22
Component/s: Userspace

Description

We are trying to generate a debug-package for the i40e-2.22.8 driver on LTS22. The debug package gets generated with the LTS19 SDK without any errors for i40e-2.22.8, but in the case of LTS22, we are getting the following error:

/xxx/sdk_22/build/vmhost_sdk/sysroots/x86_64-wrlinuxsdk-linux/var/tmp/rpm-tmp.mAAaGC: line 50: /usr/bin/find-debuginfo: No such file or directory
error: Bad exit status from /xxx/sdk_22/build/vmhost_sdk/sysroots/x86_64-wrlinuxsdk-linux/var/tmp/rpm-tmp.mAAaGC (%install)

RPM build errors:
Bad exit status from /xxx/sdk_22/build/vmhost_sdk/sysroots/x86_64-wrlinuxsdk-linux/var/tmp/rpm-tmp.mAAaGC (%install)
RPMBUILD failed , fix the same
(wrlinuxsdk-x86_64-x86_64) /xxx/sdk_22/build/vmhost_sdk/i40_rpm/temp/i40e-2.22.8$

Steps to Reproduce

Build LTS22 wrlinux-image-ovp-kvm image for intel-x86-64,
LTS22 RCPL0005
STEP-1:
Setup Project:

$ git clone --branch WRLINUX_10_22_LTS_RCPL0005 /opt/WRLXLTS_22/wrlinux-x/
$ ./wrlinux-x/setup.sh --dl-layers --distros wrlinux-ovp --machines intel-x86-64 --templates feature/package-management,feature/kernel-dev

Bitbake source build environment::

$ . ./environment-setup-x86_64-wrlinuxsdk-linux
$ . ./oe-init-build-env

Set up as follows:

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
ENABLE_KERNEL_DEV = '1'
TOOLCHAIN_TARGET_TASK:append = " python3-dev kernel-dev kernel-devsrc"
TOOLCHAIN_HOST_TASK_append = " nativesdk-openssl-dev"
IMAGE_INSTALL:append = " rpm"

Build the WRLinux OVP and LTS22 SDK  image:

$ bitbake wrlinux-image-ovp-kvm
$ bitbake -c populate_sdk wrlinux-image-ovp-kvm

Extract and install the SDK:

$  ./tmp-glibc/deploy/sdk/wrlinux-ovp-10.22.33.4-glibc-x86_64-intel_x86_64-wrlinux-image-ovp-kvm-sdk.sh


Navigate to the sdkDir and run the following command and set Env variable:

$ . ./environment-setup-corei7-64-wrs-linux
$ sed -i -e 's#-lcrypto#-lcrypto -lpthread#' {OECORE_NATIVE_SYSROOT}/usr/lib/pkgconfig/libcrypto.pc

$ PKG_CONFIG_PATH=${OECORE_NATIVE_SYSROOT}/usr/lib/pkgconfig:${OECORE_NATIVE_SYSROOT}/usr/share/pkgconfig PKG_CONFIG_SYSROOT_DIR=''
$ make scripts prepare
$ make modules_prepare
$ sed -i -e 's#-lcrypto -lpthread#-lcrypto#' ${OECORE_NATIVE_SYSROOT}/usr/lib/pkgconfig/libcrypto.pc


Download i40e driver from intel download center 

https://www.intel.com/content/www/us/en/download/18026/intel-network-adapter-driver-for-pcie-40-gigabit-ethernet-network-connections-under-linux.html


Extract the i40e-2.22.18.tar.gz file:

$ tar -xvzf i40e-2.22.18.tar.gz
$ cd i40e-2.22.8/src
$ make
$ cd ../
$ *rpmbuild  -ba* --define "%__basedir ${BASEDIR}" --define "%_topdir %{__basedir}/rpmbuild/" --define "%__publish ${PUBLISH}" --define "%__src_tarball ${TARBALL}" *i40e-2.22.8.spec*


Results:
It's working and generating the *i40e-2.22.8-0.src.rpm* , *i40e-2.22.8-0.x86_64.rpm* and *i40e-debuginfo-2.22.8-0.x86_64.rpm* files on the LTS 19 SDK, but I'm getting the following error /usr/bin/*find-debuginfo*: No such file or directory on LTS22 sdk

we have added #%define debug_package 1 to i40e-2.22.8.spec file  on LTS22 

Expected Results:
we can generate a debug package  *i40e-2.22.8-0.src.rpm* , *i40e-2.22.8-0.x86_64.rpm* and *i40e-debuginfo-2.22.8-0.x86_64.rpm* files for the LTS 22 SDK