[cip-dev] [isar-cip-core][PATCH] linux: Fix warning if USE_CIP_KERNEL_CONFIG is not defined
From: florian.bezdeka@siemens.com <hidden>
Date: 2021-01-25 17:28:09
Subsystem:
the rest · Maintainer:
Linus Torvalds
USE_CIP_KERNEL_CONFIG may not be defined in all layers using the
isar-cip-core layer, so we end up with the following warnings:
WARNING: /work/cip-core/recipes-kernel/linux/linux-cip_4.19.140-cip33.bb: Unable to get checksum for linux-cip SRC_URI entry ${MACHINE}_defconfig: file could not be found
WARNING: /work/cip-core/recipes-kernel/linux/linux-cip-rt_4.4.231-cip47-rt30.bb: Unable to get checksum for linux-cip-rt SRC_URI entry ${MACHINE}_defconfig: file could not be found
WARNING: /work/cip-core/recipes-kernel/linux/linux-cip_4.4.230-cip47.bb: Unable to get checksum for linux-cip SRC_URI entry ${MACHINE}_defconfig: file could not be found
WARNING: /work/cip-core/recipes-kernel/linux/linux-cip-rt_4.19.135-cip31-rt13.bb: Unable to get checksum for linux-cip-rt SRC_URI entry ${MACHINE}_defconfig: file could not be found
${MACHINE}_defconfig needs to be added to SRC_URI only if
USE_CIP_KERNEL_CONFIG is set to "1".
There is one in-tree machine definition (the bbb) that does not set
USE_CIP_KERNEL_CONFIG to "1" but still needs the defconfig added.
A machine specific SRC_URI was set to take care of that.
Closes #7.
Signed-off-by: Florian Bezdeka <redacted>
---
Some additional notes:
- That's my first contribution, so review carefully ;-)
- Both branches (master, next) are affected
- The gitlab MR: [1]
- The gitlab issue: [2]
[1] https://gitlab.com/cip-project/cip-core/isar-cip-core/-/merge_requests/10
[2] https://gitlab.com/cip-project/cip-core/isar-cip-core/-/issues/7
recipes-kernel/linux/linux-cip-common.inc | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/recipes-kernel/linux/linux-cip-common.inc b/recipes-kernel/linux/linux-cip-common.inc
index 6db1d1d..9aca9af 100644
--- a/recipes-kernel/linux/linux-cip-common.inc
+++ b/recipes-kernel/linux/linux-cip-common.inc@@ -11,21 +11,18 @@ KERNEL_DEFCONFIG ?= "${MACHINE}_defconfig" -def conditional(variable, checkvalue, truevalue, falsevalue, d): - if d.getVar(variable) == checkvalue: - return truevalue - else: - return falsevalue - require recipes-kernel/linux/linux-custom.inc SRC_URI += " \ https://gitlab.com/cip-project/cip-kernel/linux-cip/-/archive/v${PV}/linux-cip-v${PV}.tar.gz \ " -SRC_URI_append = " ${@conditional("USE_CIP_KERNEL_CONFIG", "1", \ - "git://gitlab.com/cip-project/cip-kernel/cip-kernel-config.git;protocol=https;destsuffix=cip-kernel-config;name=cip-kernel-config", \ - "file://${KERNEL_DEFCONFIG}",d)}" +SRC_URI_append = " ${@ "git://gitlab.com/cip-project/cip-kernel/cip-kernel-config.git;protocol=https;destsuffix=cip-kernel-config;name=cip-kernel-config" \ + if d.getVar('USE_CIP_KERNEL_CONFIG') == '1' else '' \ + }" + +SRC_URI_append_bbb = "file://${KERNEL_DEFCONFIG}" + SRCREV_cip-kernel-config ?= "7f2930b9667372f94f2edb42ca9cf6fc6c0aed50" S = "${WORKDIR}/linux-cip-v${PV}"
--
2.29.2