mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-05 02:20:30 +00:00
arm/trusted-services: fix nanopb build error
The nanopb build step randomly fails in the yocto CI due to a race condition. This change adds a patch file to disable parallel build for nanopb. This is a temporary workaround and a proper fix will be up-streamed int he future. Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
+41
@@ -0,0 +1,41 @@
|
||||
From aca9f9ae26235e9da2bc9adef49f9f5578f3e1e7 Mon Sep 17 00:00:00 2001
|
||||
From: Gyorgy Szing <Gyorgy.Szing@arm.com>
|
||||
Date: Tue, 25 Apr 2023 15:03:46 +0000
|
||||
Subject: [PATCH 1/1] Limit nanopb build to single process
|
||||
|
||||
Sometimes in yocto the nanopb build step fails. The reason seems
|
||||
to be a race condition. This fix disables parallel build as
|
||||
a workaround.
|
||||
|
||||
Upstream-Status: Inappropriate [yocto specific]
|
||||
|
||||
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
|
||||
---
|
||||
external/nanopb/nanopb.cmake | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/external/nanopb/nanopb.cmake b/external/nanopb/nanopb.cmake
|
||||
index 36465f61..94f8048c 100644
|
||||
--- a/external/nanopb/nanopb.cmake
|
||||
+++ b/external/nanopb/nanopb.cmake
|
||||
@@ -65,6 +65,8 @@ if(TARGET stdlib::c)
|
||||
unset_saved_properties(LIBC)
|
||||
endif()
|
||||
|
||||
+set(_PROCESSOR_COUNT ${PROCESSOR_COUNT})
|
||||
+set(PROCESSOR_COUNT 1)
|
||||
include(${TS_ROOT}/tools/cmake/common/LazyFetch.cmake REQUIRED)
|
||||
LazyFetch_MakeAvailable(DEP_NAME nanopb
|
||||
FETCH_OPTIONS ${GIT_OPTIONS}
|
||||
@@ -73,6 +75,8 @@ LazyFetch_MakeAvailable(DEP_NAME nanopb
|
||||
CACHE_FILE "${TS_ROOT}/external/nanopb/nanopb-init-cache.cmake.in"
|
||||
SOURCE_DIR "${NANOPB_SOURCE_DIR}"
|
||||
)
|
||||
+set(PROCESSOR_COUNT ${_PROCESSOR_COUNT})
|
||||
+
|
||||
unset(_cmake_fragment)
|
||||
|
||||
if(TARGET stdlib::c)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -5,6 +5,12 @@ LICENSE = "Apache-2.0 & BSD-3-Clause & BSD-2-Clause & Zlib"
|
||||
SRC_URI = "git://git.trustedfirmware.org/TS/trusted-services.git;protocol=https;branch=integration;name=trusted-services;destsuffix=git/trusted-services \
|
||||
"
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI:append = "\
|
||||
file://0001-Limit-nanopb-build-to-single-process.patch \
|
||||
"
|
||||
|
||||
#Latest on 2023 April 25
|
||||
SRCREV="0d292e7c879076ea36cc39e30e0ac930b71e8cd8"
|
||||
LIC_FILES_CHKSUM = "file://${S}/license.rst;md5=ea160bac7f690a069c608516b17997f4"
|
||||
|
||||
Reference in New Issue
Block a user