Re: [cip-dev] [isar-cip-core][PATCH] linux: Fix warning if USE_CIP_KERNEL_CONFIG is not defined
From: Quirin Gylstorff <hidden>
Date: 2021-01-25 18:23:49
On 1/25/21 6:28 PM, Bezdeka, Florian (T RDA IOT SES-DE) wrote:
quoted hunk ↗ jump to hunk
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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fcip-project%2Fcip-core%2Fisar-cip-core%2F-%2Fmerge_requests%2F10&data=04%7C01%7C6549bcd2-981c-4c06-8e1b-b5c6cc3441b4%40ad011.siemens.com%7C1a78e530b9ba4e41925b08d8c156918d%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637471924851339538%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FHMuzH9wdzo2s%2FHfd5B2y3sMfOSN7Y1ZF23E8xa4TEg%3D&reserved=0 [2] https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fcip-project%2Fcip-core%2Fisar-cip-core%2F-%2Fissues%2F7&data=04%7C01%7C6549bcd2-981c-4c06-8e1b-b5c6cc3441b4%40ad011.siemens.com%7C1a78e530b9ba4e41925b08d8c156918d%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637471924851349487%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NCLmMQK68OT0eM9lr2FN85i8EIdkvz73gc1ewGmGCjc%3D&reserved=0 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fcip-project%2Fcip-kernel%2Flinux-cip%2F-%2Farchive%2Fv%24&data=04%7C01%7C6549bcd2-981c-4c06-8e1b-b5c6cc3441b4%40ad011.siemens.com%7C1a78e530b9ba4e41925b08d8c156918d%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637471924851349487%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lPFSoIApETXAdkPI0fyWSfK%2FuIThRGuBQx9kOf3MQ5s%3D&reserved=0{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)}"
The easier way would have been to delete file://${KERNEL_DEFCONFIG}
instead of create the logic anew. The conditional function should allow
an empty string.
+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.2Quirin