summaryrefslogtreecommitdiffstats
path: root/common/recipes-extended/zlib-qat/zlib-qat
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-extended/zlib-qat/zlib-qat')
-rw-r--r--common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch51
-rw-r--r--common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch52
-rw-r--r--common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch46
3 files changed, 149 insertions, 0 deletions
diff --git a/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
new file mode 100644
index 00000000..9e774db2
--- /dev/null
+++ b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
@@ -0,0 +1,51 @@
+From aa65d69632142d24ec44ed4c2d66371e1a1be7b4 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anujx.mittal@intel.com>
+Date: Thu, 18 Jun 2015 11:56:08 +0800
+Subject: [PATCH] qat_mem: build qat_mem ko against yocto kernel src
+
+Upstream-Status: Inappropriate [Configuration]
+
+This tweaks the kernel source and build path in the makefile
+to make sure the module is built against the right source.
+
+Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
+---
+ contrib/qat/qat_mem/Makefile | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
+index ddf5b59..ad6d4a4 100644
+--- a/contrib/qat/qat_mem/Makefile
++++ b/contrib/qat/qat_mem/Makefile
+@@ -61,16 +61,10 @@
+ #########################################################################
+
+ MODULENAME := qat_mem
+-KDIR := /lib/modules/$(shell uname -r)/build
++KDIR := $(KERNEL_SOURCE_ROOT)
+ PWD := $(shell pwd)
+
+-ifeq ($(shell uname -r|grep -c grsec-WR), 1)
+-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h
+-else
+-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
+-endif
+-
+-CC := gcc -Wall -imacros $(AUTO_CONF)
++CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h
+
+ ifeq ($(KERNELRELEASE),)
+ all: $(MODULENAME)_test
+@@ -80,6 +74,9 @@ else
+ obj-m := $(MODULENAME).o
+ endif
+
++modules_install:
++ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
++
+ $(MODULENAME)_test: $(MODULENAME)_test.c
+ $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
+
+--
+1.7.9.5
+
diff --git a/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
new file mode 100644
index 00000000..c3605112
--- /dev/null
+++ b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
@@ -0,0 +1,52 @@
+From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anujx.mittal@intel.com>
+Date: Thu, 18 Jun 2015 11:46:17 +0800
+Subject: [PATCH] zlib: Remove rpaths from makefile
+
+Upstream-Status: Inappropriate [configuration]
+
+This removes references to RPATHS that are no longer
+necesary when building using bitbake.
+
+Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
+---
+ Makefile.in | 4 ++--
+ contrib/qat/qat_zlib_test/Makefile | 3 ---
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 94d8a80..cba5291 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -59,12 +59,12 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
+ ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
+ CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
+ SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
+-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
++#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
+ SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
+
+ ifdef ICP_BUILD_OUTPUT
+ TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
+- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
++# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
+ endif
+
+ ifdef ZLIB_DH895XCC
+diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
+index 8a29a92..ca31dd2 100644
+--- a/contrib/qat/qat_zlib_test/Makefile
++++ b/contrib/qat/qat_zlib_test/Makefile
+@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o)
+ COVERAGE_OBJS =
+ EXE=
+ LIBQAT=
+-ifdef ICP_BUILD_OUTPUT
+- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
+-endif
+
+ DRIVER=icp_qa_al
+ ifdef WITH_CPA_MUX
+--
+1.7.9.5
+
diff --git a/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
new file mode 100644
index 00000000..c7aec55a
--- /dev/null
+++ b/common/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
@@ -0,0 +1,46 @@
+From d78121d790c4a248bc47d1c662791fe57ac4af38 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anujx.mittal@intel.com>
+Date: Thu, 18 Jun 2015 11:53:23 +0800
+Subject: [PATCH] zlib-qat: add a install target to makefile
+
+Upstream-Status: Inappropriate [Configuration]
+
+This adds an install target to qat_zlib_test and qat_mem makefiles
+to facilitate the installation of test binaries to {D}.
+
+Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
+---
+ contrib/qat/qat_mem/Makefile | 3 +++
+ contrib/qat/qat_zlib_test/Makefile | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
+index ad6d4a4..e4d77b6 100644
+--- a/contrib/qat/qat_mem/Makefile
++++ b/contrib/qat/qat_mem/Makefile
+@@ -74,6 +74,9 @@ else
+ obj-m := $(MODULENAME).o
+ endif
+
++install: modules_install
++ cp qat_mem_test $(INSTALL_MOD_PATH)$(bindir)
++
+ modules_install:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
+
+diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
+index ca31dd2..7da5ddd 100644
+--- a/contrib/qat/qat_zlib_test/Makefile
++++ b/contrib/qat/qat_zlib_test/Makefile
+@@ -112,5 +112,8 @@ comptestappsh$(EXE): $(OBJS) Makefile
+ $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
+ $(SHAREDLIBQAT)
+
++install:
++ cp comptestapp $(DESTDIR)$(bindir)
++
+ clean:
+ rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
+--
+1.7.9.5
+