Make driver package release a command line param

Instead of hard-coding driver versions in the initramfs init script,
this commit makes the driver package release (e.g., "cvl-2.54") a kernel
command line parameter. As an example, if a driver package release is
specified with the command line argument multi-drivers-switch=<release>,
then the initramfs init script will look for the drivers in
"/lib/modules/$(uname -r)/{ice,iavf,i40e}-<release>/". This way, the
initramfs will not need further modifications for new/different driver
package releases that are integrated into StarlingX in the future.

It also changes the legacy driver deb package names from
	ice-1.5.8.1-legacy
	iavf-4.0.1-legacy
	i40e-2.14.13-legacy
to
	ice-cvl-2.54
	iavf-cvl-2.54
	i40e-cvl-2.54

Legacy drivers location folder:
ls /lib/modules/$(uname -r)/extra/
i40e-cvl-2.54  iavf-cvl-2.54  ice-cvl-2.54

Latest driverslocation folder:
/lib/modules/$(uname -r)/updates/
i40e-cvl-4.0.1  iavf-cvl-4.0.1  ice-cvl-4.0.1

Testing:
- An ISO image can be built successfully.
- PXE boot-based installation onto an All-in-One Duplex lab was
  successful with rt and std kernels.
- Latest driver versions are loaded by default and the DDP
  firmware version is correct. It is 1.3.30.0.
- It is possible to switch to the legacy drivers manually with
  command line parameter multi-drivers-switch=cvl-2.54, and the DDP
  firmware version is 1.3.26.0.
- It is also possible to switch back to the latest drivers manually
  with command line parameter multi-drivers-switch=cvl-4.0.1.

Story: 2010326
Task: 46705

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: Ic20922dacee0807b908354189ec185ace2737810
This commit is contained in:
Jiping Ma 2022-11-02 00:05:19 -07:00
parent 4dd2b4a960
commit db0c0bcfec
37 changed files with 78 additions and 54 deletions

View File

@ -1,11 +1,11 @@
kernel-std
kernel-modules/bnxt_en
kernel-modules/intel-i40e
kernel-modules/intel-i40e-2.14.13-legacy
kernel-modules/intel-i40e-cvl-2.54
kernel-modules/intel-iavf
kernel-modules/intel-iavf-4.0.1-legacy
kernel-modules/intel-iavf-cvl-2.54
kernel-modules/intel-ice
kernel-modules/intel-ice-1.5.8.1-legacy
kernel-modules/intel-ice-cvl-2.54
kernel-modules/intel-igb_uio
kernel-modules/intel-opae-fpga
kernel-modules/mlnx-ofa_kernel

View File

@ -1,11 +1,11 @@
kernel-rt
kernel-modules/bnxt_en
kernel-modules/intel-i40e
kernel-modules/intel-i40e-2.14.13-legacy
kernel-modules/intel-i40e-cvl-2.54
kernel-modules/intel-iavf
kernel-modules/intel-iavf-4.0.1-legacy
kernel-modules/intel-iavf-cvl-2.54
kernel-modules/intel-ice
kernel-modules/intel-ice-1.5.8.1-legacy
kernel-modules/intel-ice-cvl-2.54
kernel-modules/intel-igb_uio
kernel-modules/intel-opae-fpga
kernel-modules/mlnx-ofa_kernel

View File

@ -1,5 +0,0 @@
i40e-2.14.13-legacy (2.14.13-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 13:09:50 +0800

View File

@ -0,0 +1,11 @@
i40e-cvl-2.54 (2.14.13-1) unstable; urgency=medium
* Change deb package name with bundle version
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 02 Nov 2022 15:09:35 +0800
i40e-2.14.13-legacy (2.14.13-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 13:09:50 +0800

View File

@ -1,4 +1,4 @@
Source: i40e-2.14.13-legacy
Source: i40e-cvl-2.54
Section: net
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
@ -6,14 +6,14 @@ Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERN
Standards-Version: 4.5.1
Rules-Requires-Root: no
Package: i40e-2.14.13-legacy@KERNEL_TYPE@
Package: i40e-cvl-2.54@KERNEL_TYPE@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, i40e-2.14.13-legacy-common
Depends: ${shlibs:Depends}, ${misc:Depends}, i40e-cvl-2.54-common
Description: This package provides the i40e kernel module(s).
This package provides the i40e kernel module(s) built
for the Linux kernel using the amd64 processors.
Package: i40e-2.14.13-legacy-common
Package: i40e-cvl-2.54-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This package provides the common files of i40e kernel module(s).

View File

@ -32,10 +32,11 @@ kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
kmod_name=i40e
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
bundle_version=cvl-2.54
ifeq ($(WITH_MOD_SIGN),1)
pkg_name=i40e-2.14.13-legacy@KERNEL_TYPE@
pkg_name=i40e-$(bundle_version)@KERNEL_TYPE@
endif
pkg_common_name=i40e-2.14.13-legacy-common
pkg_common_name=i40e-$(bundle_version)-common
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -48,7 +49,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/
@ -59,7 +60,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build:

View File

@ -1,6 +1,6 @@
---
debver: 2.14.13
debname: i40e-2.14.13-legacy
debname: i40e-cvl-2.54
dl_path:
name: i40e-2.14.13.tar.gz
url: "https://sourceforge.net/projects/e1000/files/i40e%20stable/\

View File

@ -36,6 +36,7 @@ ifeq ($(WITH_MOD_SIGN),1)
pkg_name=i40e@KERNEL_TYPE@
endif
pkg_common_name=i40e-common
bundle_version=cvl-4.0.1
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -48,7 +49,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/
@ -60,7 +61,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build:

View File

@ -1,5 +0,0 @@
iavf-4.0.1-legacy (4.0.1-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 14:30:42 +0800

View File

@ -0,0 +1,11 @@
iavf-cvl-2.54 (4.0.1-1) unstable; urgency=medium
* Change deb package name with the bundle version
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 02 Nov 2022 15:30:48 +0800
iavf-4.0.1-legacy (4.0.1-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 14:30:42 +0800

View File

@ -1,4 +1,4 @@
Source: iavf-4.0.1-legacy
Source: iavf-cvl-2.54
Section: net
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
@ -6,14 +6,14 @@ Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERN
Standards-Version: 4.5.1
Rules-Requires-Root: no
Package: iavf-4.0.1-legacy@KERNEL_TYPE@
Package: iavf-cvl-2.54@KERNEL_TYPE@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, iavf-4.0.1-legacy-common
Depends: ${shlibs:Depends}, ${misc:Depends}, iavf-cvl-2.54-common
Description: This package provides the iavf kernel module(s).
This package provides the iavf kernel module(s) built
for the Linux kernel using the amd64 processors.
Package: iavf-4.0.1-legacy-common
Package: iavf-cvl-2.54-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This package provides the common files of iavf kernel module(s).

View File

@ -33,11 +33,12 @@ export KSRC_COMMON=/usr/src/$(kheaders_common)
kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
kmod_name=iavf
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
bundle_version=cvl-2.54
ifeq ($(WITH_MOD_SIGN),1)
pkg_name=iavf-4.0.1-legacy@KERNEL_TYPE@
pkg_name=iavf-$(bundle_version)@KERNEL_TYPE@
endif
pkg_common_name=iavf-4.0.1-legacy-common
pkg_common_name=iavf-$(bundle_version)-common
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -50,7 +51,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/
@ -61,7 +62,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build:

View File

@ -1,6 +1,6 @@
---
debver: 4.0.1
debname: iavf-4.0.1-legacy
debname: iavf-cvl-2.54
dl_path:
name: iavf-4.0.1.tar.gz
url: "https://sourceforge.net/projects/e1000/files/iavf%20stable/\

View File

@ -38,6 +38,7 @@ ifeq ($(WITH_MOD_SIGN),1)
pkg_name=iavf@KERNEL_TYPE@
endif
pkg_common_name=iavf-common
bundle_version=cvl-4.0.1
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -50,7 +51,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/
@ -62,7 +63,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build:

View File

@ -1,5 +0,0 @@
ice-1.5.8.1-legacy (1.5.8.1-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 13:09:50 +0800

View File

@ -0,0 +1,11 @@
ice-cvl-2.54 (1.5.8.1-1) unstable; urgency=medium
* Change deb package name with the bundle version
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 02 Nov 2022 15:09:20 +0800
ice-1.5.8.1-legacy (1.5.8.1-1) unstable; urgency=medium
* Initial release
-- Jiping Ma <jiping.ma2@windriver.com> Wed, 12 Oct 2022 13:09:50 +0800

View File

@ -1,4 +1,4 @@
Source: ice-1.5.8.1-legacy
Source: ice-cvl-2.54
Section: net
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
@ -6,15 +6,15 @@ Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERN
Standards-Version: 4.5.1
Rules-Requires-Root: no
Package: ice-1.5.8.1-legacy@KERNEL_TYPE@
Package: ice-cvl-2.54@KERNEL_TYPE@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, ice-1.5.8.1-legacy-common
Depends: ${shlibs:Depends}, ${misc:Depends}, ice-cvl-2.54-common
Description: This package provides the ice kernel module(s).
This package provides the ice kernel module(s) built
for the Linux kernel using the amd64 processors.
This package contains the Intel(R) Ethernet Connection E800 Series Linux Driver.
Package: ice-1.5.8.1-legacy-common
Package: ice-cvl-2.54-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This package provides the common files of ice kernel module(s).

View File

@ -32,9 +32,10 @@ export KSRC=/usr/src/$(kheaders_name)
export KSRC_COMMON=/usr/src/$(kheaders_common)
kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
kmod_name=ice
bundle_version=cvl-2.54
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
pkg_name=ice-1.5.8.1-legacy@KERNEL_TYPE@
pkg_common_name=ice-1.5.8.1-legacy-common
pkg_name=ice-$(bundle_version)@KERNEL_TYPE@
pkg_common_name=ice-$(bundle_version)-common
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -47,7 +48,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/
@ -66,7 +67,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(version)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build:

View File

@ -1,6 +1,6 @@
---
debver: 1.5.8.1
debname: ice-1.5.8.1-legacy
debname: ice-cvl-2.54
dl_path:
name: ice-1.5.8.1.tar.gz
url: "https://sourceforge.net/projects/e1000/files/unsupported/\

View File

@ -35,6 +35,7 @@ kmod_name=ice
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
pkg_name=ice@KERNEL_TYPE@
pkg_common_name=ice-common
bundle_version=cvl-4.0.1
_sysconfdir=/etc
_defaultdocdir=/usr/share/doc
@ -47,7 +48,7 @@ pubkey ?= $(_keydir)/signing_key.x509
endif
override_dh_auto_install:
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)/
dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/
dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/
@ -69,7 +70,7 @@ override_dh_strip:
ifeq ($(WITH_MOD_SIGN),1)
@echo "Sign the modules!"
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)/$(kmod_name).ko
./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko
endif
override_dh_auto_build: