[meta-intel] [master][PATCH 1/3] meta-isg: qat16: fix v2.5.0 build with kernel v4.4

Rahul Kumar Gupta rahul.kumarxx.gupta at intel.com
Wed Mar 30 11:55:10 PDT 2016


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 at intel.com>
---
 meta-isg/common/recipes-extended/qat/qat16.inc     |  8 +++--
 ...qat16_2.5.0-80-qat-Added-include-dir-path.patch | 30 ++++++++++++++++
 ...nge-in-return-type-of-func-in-kernel-v4.4.patch | 40 ++++++++++++++++++++++
 3 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch
 create mode 100644 meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch

diff --git a/meta-isg/common/recipes-extended/qat/qat16.inc b/meta-isg/common/recipes-extended/qat/qat16.inc
index 90765ea..c789fda 100644
--- a/meta-isg/common/recipes-extended/qat/qat16.inc
+++ b/meta-isg/common/recipes-extended/qat/qat16.inc
@@ -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
diff --git a/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch
new file mode 100644
index 0000000..a538930
--- /dev/null
+++ b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch
@@ -0,0 +1,30 @@
+From 142bf81912701d94985ad656c2250650113d00de Mon Sep 17 00:00:00 2001
+From: Rahul Kumar Gupta <rahul.kumarxx.gupta at 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 at 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
+
diff --git a/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch
new file mode 100644
index 0000000..b427799
--- /dev/null
+++ b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch
@@ -0,0 +1,40 @@
+From f056dbedd106e03860de66d5c84cd018da087dda Mon Sep 17 00:00:00 2001
+From: Rahul Kumar Gupta <rahul.kumarxx.gupta at 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 at 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
+
-- 
1.9.1



More information about the meta-intel mailing list