From 3f32ece68a4bda31e654eb72f5a1c18d941d12ca Mon Sep 17 00:00:00 2001 From: Yongxin Liu Date: Thu, 16 Jan 2020 22:13:13 +0800 Subject: qat: Fix do_patch error in parallel building 1) When doing patch for qat, the variable KERNEL_VERSION may not be set yet, so qat17_4.7.0-00006-Switch-to-skcipher-API.patch cannot be applied. Add task dependency to fix it. 2) Changing SRC_URI may lead to "basehash value changed" error message. Doing patch in a separate function to avoid it. Signed-off-by: Yongxin Liu Signed-off-by: Anuj Mittal --- recipes-extended/qat/qat17_4.7.0-00006.bb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes-extended/qat/qat17_4.7.0-00006.bb b/recipes-extended/qat/qat17_4.7.0-00006.bb index 693a2f8..a77f4c0 100644 --- a/recipes-extended/qat/qat17_4.7.0-00006.bb +++ b/recipes-extended/qat/qat17_4.7.0-00006.bb @@ -21,11 +21,19 @@ SRC_URI = "https://01.org/sites/default/files/downloads/qat1.7.l.4.7.0-00006.tar file://qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch \ file://qat17_4.7.0-00006-Link-driver-with-object-files.patch \ file://qat17_4.7.0-00006-Drop-pr_warning-definition.patch \ + file://qat17_4.7.0-00006-Switch-to-skcipher-API.patch;apply=0 \ " -python __anonymous () { +do_patch[depends] += "virtual/kernel:do_shared_workdir" + +do_patch_append () { if d.getVar("KERNEL_VERSION") >= "5.5%": - d.appendVar('SRC_URI', "file://qat17_4.7.0-00006-Switch-to-skcipher-API.patch") + bb.build.exec_func('do_switch_to_skcipher_api', d) +} + +do_switch_to_skcipher_api () { + cd "${S}" + patch -p1 < "${WORKDIR}/qat17_4.7.0-00006-Switch-to-skcipher-API.patch" } SRC_URI[md5sum] = "ac939b51cc8836c182e31e309c065002" -- cgit v1.2.3-54-g00ecf