Debian: kernel-modules: Add support for kernel-rt
Add ""@KERNEL_TYPE@" in kernel modules' build codes. When building modules for kernel-std, it is replaced by null, and when building modules for kernel-rt, it is replaced by '-rt'. The build results for rt kernel related will be put at: /localdisk/loadbuild/<USER>/stx/rt The build results for std kernel related will be put at: /localdisk/loadbuild/<USER>/stx/std Test Plan: - PASS: build kernel-rt. - PASS: build the 7 oot kernel modules for kernel-rt. - PASS: build the test image for kernel-rt and oot modules of it; boot up on qemu and probe ko for every oot kernel-module. - PASS: do above 3 tests (build modules/build iso/boot up on qemu) for kernel-std and verify that this change doesn't affect std kernel and modules. Depends-On: https://review.opendev.org/c/starlingx/root/+/835627 Depends-On: https://review.opendev.org/c/starlingx/root/+/834809 Story: 2009221 Task: 44808 Signed-off-by: Li Zhou <li.zhou@windriver.com> Change-Id: Ia92191eebb9af8d5affe625a9bd631fe916a277e
This commit is contained in:
parent
84d7517d11
commit
3db46876c0
8
debian_pkg_dirs_rt
Normal file
8
debian_pkg_dirs_rt
Normal file
@ -0,0 +1,8 @@
|
||||
kernel-rt
|
||||
kernel-modules/intel-i40e
|
||||
kernel-modules/intel-iavf
|
||||
kernel-modules/intel-ice
|
||||
kernel-modules/intel-igb_uio
|
||||
kernel-modules/intel-opae-fpga
|
||||
kernel-modules/mlnx-ofa_kernel
|
||||
kernel-modules/qat17
|
@ -2,11 +2,11 @@ Source: i40e
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), linux-headers-5.10.0-6-amd64, linux-kbuild-5.10
|
||||
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: i40e
|
||||
Package: i40e@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: This package provides the i40e kernel module(s).
|
||||
|
@ -26,12 +26,16 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
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-headers-//g')
|
||||
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')
|
||||
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
pkg_name=i40e@KERNEL_TYPE@
|
||||
endif
|
||||
|
||||
_sysconfdir=/etc
|
||||
_defaultdocdir=/usr/share/doc
|
||||
_mandir=/usr/share/man
|
||||
@ -54,8 +58,8 @@ override_dh_strip:
|
||||
find debian -name '*.ko' | xargs strip -g
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@echo "Sign the modules!"
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(kmod_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
endif
|
||||
|
||||
override_dh_auto_build:
|
||||
|
@ -2,11 +2,11 @@ Source: iavf
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), linux-headers-5.10.0-6-amd64, linux-kbuild-5.10
|
||||
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: iavf
|
||||
Package: iavf@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: This package provides the iavf kernel module(s).
|
||||
|
@ -26,12 +26,16 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
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-headers-//g')
|
||||
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')
|
||||
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
pkg_name=iavf@KERNEL_TYPE@
|
||||
endif
|
||||
|
||||
_sysconfdir=/etc
|
||||
_defaultdocdir=/usr/share/doc
|
||||
_mandir=/usr/share/man
|
||||
@ -54,8 +58,8 @@ override_dh_strip:
|
||||
find debian -name '*.ko' | xargs strip -g
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@echo "Sign the modules!"
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(kmod_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
endif
|
||||
|
||||
override_dh_auto_build:
|
||||
|
@ -2,11 +2,11 @@ Source: ice
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), linux-headers-5.10.0-6-amd64, linux-kbuild-5.10, unzip
|
||||
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10, unzip
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: ice
|
||||
Package: ice@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: This package provides the ice kernel module(s).
|
||||
|
@ -26,11 +26,12 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
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-headers-//g')
|
||||
kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
|
||||
kmod_name=ice
|
||||
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
|
||||
pkg_name=ice@KERNEL_TYPE@
|
||||
|
||||
_sysconfdir=/etc
|
||||
_defaultdocdir=/usr/share/doc
|
||||
@ -51,16 +52,16 @@ override_dh_auto_install:
|
||||
dh_install debian/extra/ice.conf $(_sysconfdir)/modules-load.d/
|
||||
dh_install ice_comms/*.txt /lib/firmware/updates/intel/ice/ddp/
|
||||
dh_install ice_comms/ice_comms*.pkg /lib/firmware/updates/intel/ice/ddp/
|
||||
mkdir -p debian/$(kmod_name)/lib/firmware/intel/ice/ddp/
|
||||
ln -frs debian/$(kmod_name)/lib/firmware/updates/intel/ice/ddp/ice_comms*.pkg debian/$(kmod_name)/lib/firmware/intel/ice/ddp/ice.pkg
|
||||
mkdir -p debian/$(pkg_name)/lib/firmware/intel/ice/ddp/
|
||||
ln -frs debian/$(pkg_name)/lib/firmware/updates/intel/ice/ddp/ice_comms*.pkg debian/$(pkg_name)/lib/firmware/intel/ice/ddp/ice.pkg
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip
|
||||
find debian -name '*.ko' | xargs strip -g
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@echo "Sign the modules!"
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(kmod_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
endif
|
||||
|
||||
override_dh_auto_build:
|
||||
|
@ -2,11 +2,11 @@ Source: igb-uio
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), linux-headers-5.10.0-6-amd64, linux-kbuild-5.10
|
||||
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: igb-uio
|
||||
Package: igb-uio@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python3
|
||||
Description: This package provides the igb-uio kernel module(s).
|
||||
|
@ -26,12 +26,13 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
|
||||
export KSRC=/usr/src/$(kheaders_name)
|
||||
export PWD = `pwd`
|
||||
kversion=$(shell echo $(kheaders_name) | sed 's/linux-headers-//g')
|
||||
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@
|
||||
|
||||
_datadir=/usr/share/
|
||||
_defaultdocdir=/usr/share/doc/
|
||||
@ -45,16 +46,16 @@ 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 -pigb-uio $(_datadir)/starlingx/scripts
|
||||
install -m 755 debian/extra/dpdk-devbind.py ./debian/igb-uio/$(_datadir)/starlingx/scripts
|
||||
dh_installdirs -p$(pkg_name) $(_datadir)/starlingx/scripts
|
||||
install -m 755 debian/extra/dpdk-devbind.py ./debian/$(pkg_name)/$(_datadir)/starlingx/scripts
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip
|
||||
find debian -name '*.ko' | xargs strip -g
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@echo "Sign the modules!"
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/igb-uio/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \
|
||||
./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)/*.ko
|
||||
endif
|
||||
|
||||
override_dh_auto_build:
|
||||
|
@ -2,11 +2,11 @@ Source: kmod-opae-fpga-driver
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), linux-headers-5.10.0-6-amd64, linux-kbuild-5.10, perl, openssl
|
||||
Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10, perl, openssl
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: kmod-opae-fpga-driver
|
||||
Package: kmod-opae-fpga-driver@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: This package provides the opae-fpga kernel module(s).
|
||||
|
@ -26,11 +26,15 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
|
||||
export KERNELDIR=/usr/src/$(kheaders_name)
|
||||
kversion=$(shell echo $(kheaders_name) | sed 's/linux-headers-//g')
|
||||
kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
|
||||
kmod_name=opae-intel-fpga-driver
|
||||
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
pkg_name=kmod-opae-fpga-driver@KERNEL_TYPE@
|
||||
endif
|
||||
|
||||
_defaultdocdir=/usr/share/doc
|
||||
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@ -48,5 +52,5 @@ override_dh_strip:
|
||||
find debian -name '*.ko' | xargs strip -g
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
@echo "Sign the modules!"
|
||||
./debian/sign_modules ./debian/kmod-opae-fpga-driver/lib/modules/$(kversion)/extra/$(kmod_name)/ $(privkey) $(pubkey)
|
||||
./debian/sign_modules ./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)/ $(privkey) $(pubkey)
|
||||
endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
privkey=$2
|
||||
pubkey=$3
|
||||
|
||||
if [ ! -f /usr/lib/linux-kbuild-*/scripts/sign-file ]; then
|
||||
if [ ! -f /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file ]; then
|
||||
echo "Tool sign-file doesn't exist!"
|
||||
exit 1
|
||||
fi
|
||||
@ -15,7 +15,7 @@ found=0
|
||||
for module in $(find $1 -type f -name \*.ko); do
|
||||
found=1
|
||||
echo ${module}
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 \
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 \
|
||||
${privkey} ${pubkey} ${module}
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Fail to sign!"
|
||||
|
@ -0,0 +1,65 @@
|
||||
From 936b50bcc4d970a118712cdf8059f06256dd9309 Mon Sep 17 00:00:00 2001
|
||||
From: Li Zhou <li.zhou@windriver.com>
|
||||
Date: Fri, 10 Dec 2021 16:56:54 +0800
|
||||
Subject: [PATCH] mlnx-ofa_kernel: add support for kernel-rt
|
||||
|
||||
Signed-off-by: Li Zhou <li.zhou@windriver.com>
|
||||
---
|
||||
debian/control | 6 +++---
|
||||
debian/rules | 8 ++++----
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/debian/control b/debian/control
|
||||
index 176d36f..9849247 100644
|
||||
--- a/debian/control
|
||||
+++ b/debian/control
|
||||
@@ -2,16 +2,16 @@ Source: mlnx-ofed-kernel
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Vladimir Sokolovsky <vlad@mellanox.com>
|
||||
-Build-Depends: debhelper (>= 8.0.0), autotools-dev, bzip2, dkms, python3-distutils | python, linux-headers-5.10.0-6-amd64, linux-kbuild-5.10
|
||||
+Build-Depends: debhelper (>= 8.0.0), autotools-dev, bzip2, dkms, python3-distutils | python, linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10
|
||||
Standards-Version: 3.9.2
|
||||
Homepage: http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers
|
||||
|
||||
-Package: mlnx-ofed-kernel-utils
|
||||
+Package: mlnx-ofed-kernel-utils@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, coreutils, pciutils, grep, procps, module-init-tools | kmod, lsof
|
||||
Description: Userspace tools to restart and tune mlnx-ofed kernel modules
|
||||
|
||||
-Package: mlnx-ofed-kernel-modules
|
||||
+Package: mlnx-ofed-kernel-modules@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: ofed kernel modules
|
||||
diff --git a/debian/rules b/debian/rules
|
||||
index 82fddfb..2af2132 100755
|
||||
--- a/debian/rules
|
||||
+++ b/debian/rules
|
||||
@@ -20,8 +20,8 @@ WITH_MOD_SIGN ?= 0
|
||||
|
||||
#Here kernelver should be the one this package depends on,
|
||||
#while "uname -r" got the building machine's os release number.
|
||||
-kheaders_name = $(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
-kernelver = $(shell echo $(kheaders_name) | sed 's/linux-headers-//g')
|
||||
+kheaders_name = $(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
|
||||
+kernelver = $(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
|
||||
|
||||
ifeq ($(WITH_MOD_SIGN),1)
|
||||
_keydir ?= /usr/src/kernels/$(kernelver)/
|
||||
@@ -39,9 +39,9 @@ psource:=$(pname)-source
|
||||
ifeq ($(WITH_DKMS),1)
|
||||
pdkms:=$(pname)-dkms
|
||||
else
|
||||
-pdkms:=$(pname)-modules
|
||||
+pdkms:=$(pname)-modules@KERNEL_TYPE@
|
||||
endif
|
||||
-putils:=$(pname)-utils
|
||||
+putils:=$(pname)-utils@KERNEL_TYPE@
|
||||
|
||||
pversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
|
||||
prel := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-\(.\+\)/\2/p')
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1 +1,2 @@
|
||||
0001-mlnx-ofa_kernel-adapt-the-debian-folder-for-starling.patch
|
||||
0001-mlnx-ofa_kernel-add-support-for-kernel-rt.patch
|
||||
|
@ -2,11 +2,11 @@ Source: qat1.7.l
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13), autotools-dev, pkg-config, libudev-dev, yasm, libssl-dev, libz-dev, pciutils, libboost-dev, perl, openssl, linux-headers-5.10.0-6-amd64, linux-kbuild-5.10
|
||||
Build-Depends: debhelper-compat (= 13), autotools-dev, pkg-config, libudev-dev, yasm, libssl-dev, libz-dev, pciutils, libboost-dev, perl, openssl, linux@KERNEL_TYPE@-headers-5.10.0-6-amd64, linux@KERNEL_TYPE@-kbuild-5.10
|
||||
Standards-Version: 4.5.1
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: qat1.7.l
|
||||
Package: qat1.7.l@KERNEL_TYPE@
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Intel(r) QuickAssist Technology API
|
||||
|
@ -26,10 +26,10 @@
|
||||
|
||||
WITH_MOD_SIGN ?= 0
|
||||
|
||||
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
||||
kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
|
||||
export KERNEL_SOURCE_ROOT=/usr/src/$(kheaders_name)
|
||||
kernel_version=$(shell echo $(kheaders_name) | sed 's/linux-headers-//g')
|
||||
pkg_name=qat1.7.l
|
||||
kernel_version=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
|
||||
pkg_name=qat1.7.l@KERNEL_TYPE@
|
||||
|
||||
qat_src_dir=./
|
||||
_sysconfdir=/etc/
|
||||
|
@ -6,7 +6,7 @@
|
||||
privkey=$2
|
||||
pubkey=$3
|
||||
|
||||
if [ ! -f /usr/lib/linux-kbuild-*/scripts/sign-file ]; then
|
||||
if [ ! -f /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file ]; then
|
||||
echo "Tool sign-file doesn't exist!"
|
||||
exit 1
|
||||
fi
|
||||
@ -15,7 +15,7 @@ found=0
|
||||
for module in $(find $1 -type f -name \*.ko); do
|
||||
found=1
|
||||
echo ${module}
|
||||
/usr/lib/linux-kbuild-*/scripts/sign-file sha256 \
|
||||
/usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 \
|
||||
${privkey} ${pubkey} ${module}
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Fail to sign!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user