Intel Quartzville iqvlinux driver v1.2.0.19

The Intel Quartzville (QV) tools is a bundle of network utilities that
support validation, debug, and IEEE Conformance testing of Intel
network adapters; identification and diagnostics of Intel PCI adapters,
collection of properties and assigned resources, for automation; and
an EEPROM programming utility.

The Quartzville tools are proprietary, but the Intel QV Linux (iqvlinux)
driver is licensed as open source (GPL2), and can be freely distributed
as a kernel module.

This commit adds support of Intel Quartzville (QV) tools in StarlingX
kernel, as a facility to users that own a valid Intel QV license, so
they may install QV tools in StarlingX, without changes in the kernel.

The new kernel module is signed, as usual in StarlingX. For this, a
change is necessary in the original source code, to not disable module
signing. This change is done by patch.

Due to iqvlinux 1.2.0.19 is not yet available in sourceforge.net, the
source code tarball shall be hosted in StarlingX CENGN mirror.

Note that the new kernel modules are installed to a directory where
usually only in-tree kernel modules exist. This is done to satisfy the
user-space utilities' assumptions regarding the location of the kernel
module. We have also learned that the user-space utilities' assumption
regarding the kernel module's location may change in the future.

Test Plan:
  - Container image is built successfully on Debian (PASS)
  - iqvlinux driver package is successfully installed (PASS)
  - Run time testing of the QV tools (PASS)

Story: 2010138
Task: 46733

Signed-off-by: Rogerio Ferraz <RogerioOliveira.Ferraz@windriver.com>
Change-Id: Id12354a68508eaaafcf43db4b62cd4a623638650
This commit is contained in:
Rogerio Ferraz 2022-11-24 09:01:14 +00:00
parent 3151d35921
commit 6bc25e5239
13 changed files with 191 additions and 0 deletions

View File

@ -29,6 +29,10 @@ igb-uio-rt
#initramfs-trigger
initramfs-trigger
# Intel Quartzville Linux Driver
iqvlinux
iqvlinux-rt
#intel-opae-fpgaa
kmod-opae-fpga-driver
kmod-opae-fpga-driver-rt

View File

@ -8,6 +8,7 @@ kernel-modules/intel-ice
kernel-modules/intel-ice-cvl-2.54
kernel-modules/intel-igb_uio
kernel-modules/intel-opae-fpga
kernel-modules/intel-qv
kernel-modules/mlnx-ofa_kernel
kernel-modules/qat17
livepatch/kpatch-prebuilt

View File

@ -8,6 +8,7 @@ kernel-modules/intel-ice
kernel-modules/intel-ice-cvl-2.54
kernel-modules/intel-igb_uio
kernel-modules/intel-opae-fpga
kernel-modules/intel-qv
kernel-modules/mlnx-ofa_kernel
kernel-modules/qat17
livepatch/kpatch-prebuilt

View File

@ -0,0 +1,5 @@
iqvlinux (1.2.0.19-1) unstable; urgency=medium
* Initial release
-- Rogerio Ferraz <RogerioOliveira.Ferraz@windriver.com> Wed, 9 Nov 2022 12:25:00 +0000

View File

@ -0,0 +1,14 @@
Source: iqvlinux
Section: kernel
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERNEL_TYPE@-amd64, linux@KERNEL_TYPE@-kbuild-5.10, linux@KERNEL_TYPE@-keys-5.10
Standards-Version: 4.5.1
Rules-Requires-Root: no
Package: iqvlinux@KERNEL_TYPE@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This package provides the iqvlinux kernel module(s).
This package provides the iqvlinux kernel module(s) built
for the Linux kernel using the amd64 processors.

View File

@ -0,0 +1,14 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: iqvlinux
Upstream-Contact: Intel Corporation
Source: iqvlinux.tar.gz in https://sourceforge.net/projects/e1000/files/iqvlinux/
Files: *
Copyright: (c) 2022 Intel Corporation.
License: GPL-2
The full GNU General Public License is included in this distribution in the
file called "COPYING".
On Debian-based systems the full text of the GNU General Public License
version 2 license can be found in `/usr/share/common-licenses/GPL-2'.

View File

@ -0,0 +1,26 @@
From 581ad581c4b6b7e980503cd8bfc50486577003b1 Mon Sep 17 00:00:00 2001
From: Rogerio Ferraz <RogerioOliveira.Ferraz@windriver.com>
Date: Sun, 4 Dec 2022 22:04:20 -0300
Subject: [PATCH] Do not disable module signing
Signed-off-by: Rogerio Ferraz <RogerioOliveira.Ferraz@windriver.com>
---
src/linux/driver/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux/driver/Makefile b/src/linux/driver/Makefile
index ad35e12..59a030e 100644
--- a/src/linux/driver/Makefile
+++ b/src/linux/driver/Makefile
@@ -41,7 +41,7 @@ else # ifneq($(KERNELRELEASE),)
DRIVER := iqvlinux
-DISABLE_MODULE_SIGNING := Yes
+DISABLE_MODULE_SIGNING := No
INSTALL_MOD_DIR ?= kernel/drivers/net
COMMON_MK ?= $(wildcard common.mk)
--
2.17.1

View File

@ -0,0 +1 @@
0001-Do-not-disable-module-signing.patch

View File

@ -0,0 +1,62 @@
#!/usr/bin/make -f
#
# Copyright (c) 2022 Wind River Systems, Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export LINUX_DRIVER_BUILD_DIR="$(PWD)/src/linux/driver"
export NALDIR="$(PWD)"
WITH_MOD_SIGN ?= 1
kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
export KSRC=/usr/src/$(kheaders_name)
kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
kmod_name=iqvlinux
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
ifeq ($(WITH_MOD_SIGN),1)
pkg_name=iqvlinux@KERNEL_TYPE@
endif
pkg_common_name=iqvlinux-common
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
_mandir=/usr/share/man
ifeq ($(WITH_MOD_SIGN),1)
_keydir ?= /usr/src/kernels/$(kversion)/
privkey ?= $(_keydir)/signing_key.pem
pubkey ?= $(_keydir)/signing_key.x509
endif
%:
dh $@ --sourcedirectory=src/linux/driver/
override_dh_auto_install:
dh_install ./src/linux/driver/iqvlinux.ko lib/modules/$(kversion)/kernel/drivers/net/
override_dh_strip:
dh_strip
find debian -name '*.ko' | xargs strip -g
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
./debian/sign_modules ./debian/$(pkg_name)/lib/modules/$(kversion)/kernel/drivers/net/ $(privkey) $(pubkey)
endif

View File

@ -0,0 +1,31 @@
#!/bin/bash
# parameters:
# (1) modules' path; (2) privkey for signing; (3) pubkey for signing
privkey=$2
pubkey=$3
if [ ! -f /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file ]; then
echo "Tool sign-file doesn't exist!"
exit 1
fi
found=0
for module in $(find $1 -type f -name \*.ko); do
found=1
echo ${module}
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 \
${privkey} ${pubkey} ${module}
if [ $? -eq 1 ]; then
echo "Fail to sign!"
exit 1
fi
done
if [ ${found} -eq 1 ]; then
echo "Signed successfully!"
else
echo "No ko found!"
exit 1
fi

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -x
# $1: Name of directory where the source code is extracted to.
# It corresponds to the build name taken from changelog.QV_ZIP
PKG_BUILD_NAME=$1
PKG_BUILD_DIR=$(realpath `pwd`/"${PKG_BUILD_NAME}")
QV_SOURCE=iqvlinux.tar.gz
mkdir -p "${PKG_BUILD_DIR}/iqvlinux"
# Unpack source code
tar xzf "${QV_SOURCE}" -C "${PKG_BUILD_DIR}"
# Clean-up
rm -rf *.tar.gz

View File

@ -0,0 +1,13 @@
---
debver: 1.2.0.19-1
debname: iqvlinux
dl_path:
name: iqvlinux.tar.gz
url: "http://mirror.starlingx.cengn.ca/mirror/debian/sourceforge.net/\
projects/e1000/files/iqvlinux/1.2.0.19/iqvlinux.tar.gz/download"
md5sum: a1277f6c75c62005d75a8c9676032236
sha256sum: c86c1a394c27474f793641db82803a9784d02ce92de802b99b46a7736757019d
dl_hook: dl_hook
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true