meta-isg: qat16: fix v2.5.0 build with kernel v4.4

The qat recipe currently relies on EXTRA_OEMAKE having been set to
"-e MAKEFLAGS=" in bitbake.conf to operate. It is necessary to make this
 explicit so that the default in bitbake.conf can be changed.

The prototype of a func used in QAT16 is changed in kernel v4.4

Also, make sure that we point to the correct include path to the local
headers.

Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Rahul Kumar Gupta 2016-03-31 02:55:10 +08:00 committed by Saul Wold
parent abb8758eb8
commit dcfd63ce73
3 changed files with 75 additions and 3 deletions

View File

@ -15,6 +15,8 @@ SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \
file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \
file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \
"
COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64"
@ -47,8 +49,8 @@ PARALLEL_MAKE = ""
#To get around the double slashes in paths in QAT makefiles
PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
EXTRA_OEMAKE_append = " CFLAGS+=-fgnu89-inline"
EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'"
EXTRA_OEMAKE = "-e MAKEFLAGS="
do_unpack2() {
cd ${S}/
tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
@ -60,7 +62,7 @@ do_compile () {
export LD="${LD} --hash-style=gnu"
export MACHINE="${TARGET_ARCH}"
cd ${S}/quickassist
oe_runmake EXTRA_OEMAKE="'CFLAGS=${CFLAGS} -fPIC'"
oe_runmake
cd ${SAMPLE_CODE_DIR}
touch ${SAMPLE_CODE_DIR}/performance/compression/calgary

View File

@ -0,0 +1,30 @@
From 142bf81912701d94985ad656c2250650113d00de Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Tue, 22 Mar 2016 01:44:09 +0800
Subject: [PATCH 2/2] qat: Added include dir path
Upstream-Status: Inappropriate [Configuration]
Make sure that we point to the correct include path to the local
headers.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
index b504f7f..a75f152 100755
--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
@@ -84,6 +84,7 @@ INCLUDES+=-I$(API_DIR) \
EXTRA_CFLAGS += $(cmd_line_cflags)
EXTRA_CFLAGS += -fno-strict-aliasing
+EXTRA_CFLAGS += $(INCLUDES)
EXTRA_LDFLAGS +=-whole-archive
ifeq ($(ARCH), i386)
--
1.9.1

View File

@ -0,0 +1,40 @@
From f056dbedd106e03860de66d5c84cd018da087dda Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Date: Tue, 22 Mar 2016 00:59:36 +0800
Subject: [PATCH 1/2] qat: change in return type of func in kernel v4.4
Upstream-Status: Submitted
The function 'seq_puts' return type is changed from 'int' to 'void'.
Now use of 'ret' variable is not valid. So used another condition to check
for overflow.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
---
quickassist/adf/drivers/common/linux/src/adf_proc_debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
index 7d81eaa..a1dd917 100755
--- a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
+++ b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
@@ -132,13 +132,13 @@ static int adf_debug_show(struct seq_file *sfile, void *v)
{
debug_file_info_t* file_info = sfile->private;
if (file_info && file_info->seq_read && file_info->page) {
- int ret = 0, old_offset = file_info->offset;
+ int old_offset = file_info->offset;
file_info->offset =
file_info->seq_read(file_info->private_data,
file_info->page, PAGE_SIZE - 1,
file_info->offset);
- ret = seq_puts(sfile, (char*)file_info->page);
- if (ret) {
+ seq_puts(sfile, (char*)file_info->page);
+ if (sfile->count == sfile->size) {
/* run out of space - need to reprint */
file_info->offset = old_offset;
}
--
1.9.1