diff options
| author | Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> | 2016-08-03 15:59:52 +0800 |
|---|---|---|
| committer | Tom Zanussi <tom.zanussi@linux.intel.com> | 2016-08-04 11:31:20 -0500 |
| commit | 9098afe1485b24a151cbd6e16b897b7c4204aeba (patch) | |
| tree | f3960f2e003e70145b044f0cff2b3c2b3c6edba3 /meta-isg/common | |
| parent | b9f9710ba4df77e2ef0f06ccb1d2870f626d229e (diff) | |
| download | meta-intel-9098afe1485b24a151cbd6e16b897b7c4204aeba.tar.gz | |
meta-isg: zlib-qat: fix for unpack and patch error
zlib-qat is different from other packages in the way
that it has a patch present in a zip file that is
unpacked and applied on top of zlib. This results in
errors when doing an incremental build using bitbake.
To resolve, splitted do_patch into two - one to unpack
the qat patch and apply it on zlib-1.2.8. And, other to
apply the patches added in SRC_URI.
Added flags "-q -o" flags to unzip command to quietly overwrite if
files/folders already exist to avoid build from breaking.
Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Diffstat (limited to 'meta-isg/common')
| -rw-r--r-- | meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb index 9c95adbb..825fbfa7 100644 --- a/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb +++ b/meta-isg/common/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb | |||
| @@ -33,6 +33,7 @@ COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64" | |||
| 33 | 33 | ||
| 34 | ZLIB_VERSION = "1.2.8" | 34 | ZLIB_VERSION = "1.2.8" |
| 35 | ZLIB_QAT_VERSION = "0.4.7-002" | 35 | ZLIB_QAT_VERSION = "0.4.7-002" |
| 36 | QAT_PATCH_VERSION = "l.0.4.7_002" | ||
| 36 | 37 | ||
| 37 | S = "${WORKDIR}/zlib-${ZLIB_VERSION}" | 38 | S = "${WORKDIR}/zlib-${ZLIB_VERSION}" |
| 38 | 39 | ||
| @@ -51,22 +52,33 @@ TARGET_CC_ARCH += "${LDFLAGS}" | |||
| 51 | inherit module | 52 | inherit module |
| 52 | MEM_PATH = "${S}/contrib/qat" | 53 | MEM_PATH = "${S}/contrib/qat" |
| 53 | 54 | ||
| 54 | do_unpack2(){ | 55 | zlibqat_do_patch() { |
| 55 | cd ${WORKDIR}/ | 56 | cd ${WORKDIR} |
| 56 | unzip zlib_quickassist_patch_l.0.4.7_002_stable.zip | 57 | unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip |
| 57 | cd zlib_quickassist_patch_l.0.4.7_002_devbranch | 58 | cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch |
| 58 | tar -xvzf zlib-1.2.8-qat.L.0.4.7-002.tar.gz | 59 | tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz |
| 59 | cp zlib-1.2.8-qat.patch ${WORKDIR} | 60 | cp -f zlib-${ZLIB_VERSION}-qat.patch ${WORKDIR} |
| 61 | cd ${S} | ||
| 62 | if [ ! -d ${S}/debian/patches ]; then | ||
| 63 | mkdir -p ${S}/debian/patches | ||
| 64 | cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches | ||
| 65 | echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series | ||
| 66 | fi | ||
| 67 | quilt pop -a || true | ||
| 68 | if [ -d ${S}/.pc-zlibqat ]; then | ||
| 69 | rm -rf ${S}/.pc | ||
| 70 | mv ${S}/.pc-zlibqat ${S}/.pc | ||
| 71 | QUILT_PATCHES=${S}/debian/patches quilt pop -a | ||
| 72 | rm -rf ${S}/.pc | ||
| 73 | fi | ||
| 74 | QUILT_PATCHES=${S}/debian/patches quilt push -a | ||
| 75 | mv ${S}/.pc ${S}/.pc-zlibqat | ||
| 60 | } | 76 | } |
| 61 | 77 | ||
| 62 | addtask unpack2 after do_unpack before do_patch | 78 | # We invoke base do_patch at end, to incorporate any local patch |
| 63 | 79 | python do_patch() { | |
| 64 | do_patch() { | 80 | bb.build.exec_func('zlibqat_do_patch', d) |
| 65 | cd ${S} | 81 | bb.build.exec_func('patch_do_patch', d) |
| 66 | patch -p1 < ${WORKDIR}/zlib-1.2.8-qat.patch | ||
| 67 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch | ||
| 68 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch | ||
| 69 | patch -p1 < ${WORKDIR}/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch | ||
| 70 | } | 82 | } |
| 71 | 83 | ||
| 72 | do_configure() { | 84 | do_configure() { |
