
Add igb-uio 21.02 driver of debian packaging. The source code package is from the snapshot for: git://dpdk.org/dpdk-kmods commit 2a9f0f72a2d926382634cf8f1de10e1acf57542b The dpdk-devbind.py is carried over from the 5.10 kernel with stx CentOS by 20211108 (the original file's path: kernel-modules/intel-igb_uio/files). The script has been acquired from the following link, which points to the official DPDK v21.02 branch: https://git.dpdk.org/dpdk/plain/usertools/dpdk-devbind.py?h=v21.02&id=7a016af4aa6bd2f8425b4fb2d59e5dd19f12bceb Verification: As we are only getting the Debian work bootstrapped there is quite a few restrictions as far as what can be tested. - source code/patch/config are aligned with stx centos 20211108; - output packages' contents are aligned with stx centos 20211108; - build image ok with the module; - qemu boot up ok with the module. Story: 2009221 Task: 43410 Signed-off-by: Li Zhou <li.zhou@windriver.com> Change-Id: Ie62c117c6011584bebc7f71acc8776c2acfd22ba
62 lines
2.0 KiB
Makefile
Executable File
62 lines
2.0 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
#
|
|
# Copyright (c) 2021 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
|
|
|
|
%:
|
|
dh $@
|
|
|
|
WITH_MOD_SIGN ?= 0
|
|
|
|
kheaders_name=$(shell ls /usr/src | grep linux-headers | grep amd64)
|
|
export KSRC=/usr/src/$(kheaders_name)
|
|
export PWD = `pwd`
|
|
kversion=$(shell echo $(kheaders_name) | sed 's/linux-headers-//g')
|
|
kmod_name=igb_uio
|
|
version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
|
|
|
|
_datadir=/usr/share/
|
|
_defaultdocdir=/usr/share/doc/
|
|
|
|
ifeq ($(WITH_MOD_SIGN),1)
|
|
_keydir ?= /usr/src/kernels/$(kversion)/
|
|
privkey ?= $(_keydir)/signing_key.priv
|
|
pubkey ?= $(_keydir)/signing_key.x509
|
|
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
|
|
|
|
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
|
|
endif
|
|
|
|
override_dh_auto_build:
|
|
dh_auto_build -D ./linux/igb_uio
|