Debian: add igb-uio-common pkg for common files

There are common files in the igb-uio packages for std and rt kernel.
They are files with the same paths and names in different packages
for std/rt, which include all the files except *.ko
(ko files have different paths 5.10.0-6 vs. 5.10.0-6-rt).
They are mainly conf/doc/script files and aren't related with std/rt.

Because the multi kernel feature wants to install the oot kernel
drivers' packages for std and rt kernel into one rootfs, error will
be reported such as:
dpkg: error processing archive .../[KENREL MOUDLE FOR RT].deb
trying to overwrite '.../[COMMON FILE NAME]',
which is also in package [KERNEL MODULE FOR STD].

So move the common files into a new package named as igb-uio-common.
The dependency will install the common package together with the driver
package.

Test plan:
 - PASS: Check that there aren't common files in the driver packages
         for kernel-std and kernel-rt.

 [Test together with all the patches about supporting multi-kernel
  feature (kernel part).]
 - PASS: Build std kernel and its kernel modules OK.
         Build std image OK.
         Boot on qemu OK.
         Boot on target ProLiant ML350 Gen10 OK.
 - PASS: Do above tests for kernel-rt too.

Depends-On: https://review.opendev.org/c/starlingx/tools/+/842030
Story: 2009221
Task: 45380

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: Ib4ffc13ba6d12ff422544c9e7250697e05ce046b
This commit is contained in:
Li Zhou 2022-04-28 09:35:41 +00:00
parent 8275029774
commit 2092621127
2 changed files with 12 additions and 4 deletions

View File

@ -8,7 +8,14 @@ Rules-Requires-Root: no
Package: igb-uio@KERNEL_TYPE@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python3
Depends: ${shlibs:Depends}, ${misc:Depends}, python3, igb-uio-common
Description: This package provides the igb-uio kernel module(s).
This package provides the igb_uio kernel module(s) built
for the Linux kernel using the amd64 processors.
Package: igb-uio-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, python3
Description: This package provides the common files of igb-uio kernel module(s).
This package provides the common files of igb_uio kernel module(s) built
for the Linux kernel-std and kernel-rt using the amd64 processors.

View File

@ -33,6 +33,7 @@ kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
kmod_name=igb_uio
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
pkg_name=igb-uio@KERNEL_TYPE@
pkg_common_name=igb-uio-common
_datadir=/usr/share/
_defaultdocdir=/usr/share/doc/
@ -45,9 +46,9 @@ endif
override_dh_auto_install:
dh_install ./linux/igb_uio/*.ko /lib/modules/$(kversion)/extra/$(kmod_name)/
dh_install ./README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_installdirs -p$(pkg_name) $(_datadir)/starlingx/scripts
install -m 755 debian/extra/dpdk-devbind.py ./debian/$(pkg_name)/$(_datadir)/starlingx/scripts
dh_install -p$(pkg_common_name) ./README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/
dh_installdirs -p$(pkg_common_name) $(_datadir)/starlingx/scripts
install -m 755 debian/extra/dpdk-devbind.py ./debian/$(pkg_common_name)/$(_datadir)/starlingx/scripts
override_dh_strip:
dh_strip