Skip to contentSkip to conversation

arm/apply_local_src_patches: allow use in multiple directories

PATCH Applied [email protected] 2 participants 11 messages Sep 29, 2023 – Oct 1, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 arm/apply_local_src_patches: allow use in multiple directories

From: Ross Burton <[email protected]>

Pull out the patch application logic so the postfunc by default scans for patches in LOCAL_SRC_PATCHES_INPUT_DIR and applies them to LOCAL_SRC_PATCHES_DEST_DIR as before.

This allows recipes to inherit the class and directly call apply_local_src_patches as needed to process patches in multiple directories.

---
 meta-arm/classes/apply_local_src_patches.bbclass | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
meta-arm/classes/apply_local_src_patches.bbclass +8 -3
index e1939353..0897b51b 100644
@@ -17,8 +17,8 @@ python() {
 
 apply_local_src_patches() {
 
-    input_dir="${LOCAL_SRC_PATCHES_INPUT_DIR}"
-    dest_dir="${LOCAL_SRC_PATCHES_DEST_DIR}"
+    input_dir="$1"
+    dest_dir="$2"
 
     if [ ! -d "$input_dir" ] ; then
         bbfatal "LOCAL_SRC_PATCHES_INPUT_DIR=$input_dir not found."
@@ -32,6 +32,7 @@ apply_local_src_patches() {
     export QUILT_PATCHES=./patches-extra
     mkdir -p patches-extra
 
+    bbdebug 1 "Looking for patches in $input_dir"
     for patch in $(find $input_dir -type f -name *.patch -or -name *.diff | sort)
     do
         patch_basename=`basename $patch`
@@ -45,4 +46,8 @@ apply_local_src_patches() {
         fi
     done
 }
-do_patch[postfuncs] += "apply_local_src_patches"
+
+do_apply_local_src_patches() {
+    apply_local_src_patches "${LOCAL_SRC_PATCHES_INPUT_DIR}" "${LOCAL_SRC_PATCHES_DEST_DIR}"
+}
+do_patch[postfuncs] += "do_apply_local_src_patches"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/10 arm/trusted-services: pass through CMake generator

From: Ross Burton <[email protected]>

Pass through the choice of CMake Generator when starting sub-cmakes for the external components, so that they use Ninja instead of Make.

---
 ...ch-allow-setting-the-cmake-generator.patch | 46 +++++++++++++++++++
 .../trusted-services/trusted-services-src.inc |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta-arm/recipes-security/trusted-services/files/0001-LazyFetch-allow-setting-the-cmake-generator.patch
meta-arm/recipes-security/trusted-services/files/0001-LazyFetch-allow-setting-the-cmake-generator.patch new file +46 -0
new file mode 100644
index 00000000..6664fd05
@@ -0,0 +1,46 @@
+From e62709f8e6f586ace7975b58b8a1c726d120759f Mon Sep 17 00:00:00 2001
+From: Gyorgy Szing <[email protected]>
+Date: Thu, 31 Aug 2023 18:24:50 +0200
+Subject: [PATCH] LazyFetch: allow setting the cmake generator
+
+Allow configuring the CMake generator used for external components. By
+default use the generator the main project is using.
+For details see the documentation in tools/cmake/common/LazyFetch.cmake.
+
+Change-Id: Ie01ea1ae533cf7a40c1f09808de2ad2e83a09db3
+Signed-off-by: Gyorgy Szing <[email protected]>
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <[email protected]>
+---
+ tools/cmake/common/LazyFetch.cmake | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/tools/cmake/common/LazyFetch.cmake b/tools/cmake/common/LazyFetch.cmake
+index 68e790e..7676201 100644
+--- a/tools/cmake/common/LazyFetch.cmake
++++ b/tools/cmake/common/LazyFetch.cmake
+@@ -87,11 +87,20 @@ function(LazyFetch_ConfigAndBuild)
+ 							"component specific. Pleas refer to the upstream documentation for more information.")
+ 	endif()
+ 
++	if(NOT DEFINED ${UC_DEP_NAME}_GENERATOR)
++		if(DEFINED ENV{${UC_DEP_NAME}_GENERATOR})
++			set(${UC_DEP_NAME}_GENERATOR ENV{${UC_DEP_NAME}_GENERATOR} CACHE STRING "CMake generator used for ${UC_DEP_NAME}.")
++		else()
++			set(${UC_DEP_NAME}_GENERATOR ${CMAKE_GENERATOR} CACHE STRING "CMake generator used for ${UC_DEP_NAME}.")
++		endif()
++	endif()
++
+ 	execute_process(COMMAND
+ 		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
+ 		${CMAKE_COMMAND}
+ 			"-C${CONFIGURED_CACHE_FILE}"
+ 			-DCMAKE_BUILD_TYPE=${${UC_DEP_NAME}_BUILD_TYPE}
++			-G${${UC_DEP_NAME}_GENERATOR}
+ 			-S ${BUILD_SRC_DIR}
+ 			-B ${BUILD_BIN_DIR}
+ 		RESULT_VARIABLE
+-- 
+2.34.1
+
meta-arm/recipes-security/trusted-services/trusted-services-src.inc +1 -0
index 86eb5083..50360b1d 100644
@@ -9,6 +9,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
 SRC_URI:append = "\
 	file://0001-Limit-nanopb-build-to-single-process.patch \
+	file://0001-LazyFetch-allow-setting-the-cmake-generator.patch \
 "
 
 #Latest on 2023 April 28
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/10 arm/trusted-services: add missing pkgconfig inherit

In reply to [email protected]

From: Ross Burton <[email protected]>

The configure log warns that it couldn't find pkgconfig, so add this so it can.

---
 meta-arm/recipes-security/trusted-services/trusted-services.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/recipes-security/trusted-services/trusted-services.inc +1 -1
index c64a1d41..b46cd498 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "https://trusted-services.readthedocs.io/en/latest/index.html"
 
 LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib"
 
-inherit python3native cmake
+inherit python3native cmake pkgconfig
 
 COMPATIBLE_HOST = "aarch64.*-linux"
 COMPATIBLE_MACHINE ?= "invalid"
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/10 arm/trusted-services/ts-remote-test: move binary to $bindir

In reply to [email protected]

From: Ross Burton <[email protected]>

As with ts-service-test, manually move the binary to $bindir.

---
 .../trusted-services/ts-remote-test_git.bb                 | 7 +++++++
 1 file changed, 7 insertions(+)
meta-arm/recipes-security/trusted-services/ts-remote-test_git.bb +7 -0
index 203defea..1633ecfe 100644
@@ -10,3 +10,10 @@ RDEPENDS:${PN} += "libts"
 OECMAKE_SOURCEPATH = "${S}/deployments/ts-remote-test/${TS_ENV}"
 
 FILES:${PN} = "${bindir}/ts-remote-test"
+
+do_install:append () {
+    install -d ${D}${bindir}
+    mv ${D}${TS_INSTALL}/bin/ts-remote-test ${D}${bindir}
+
+    rm -r --one-file-system ${D}${TS_INSTALL}
+}
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/10 arm/trusted-services/ts-sp-env-test: add missing DEPENDS

In reply to [email protected]

From: Ross Burton <[email protected]>

This recipe won't pass configure without the jsonschema and jinja2 Python modules.

---
 .../recipes-security/trusted-services/ts-sp-env-test_git.bb     | 2 ++
 1 file changed, 2 insertions(+)
meta-arm/recipes-security/trusted-services/ts-sp-env-test_git.bb +2 -0
index 5551a4de..cda43e6e 100644
@@ -8,4 +8,6 @@ COMPATIBLE_MACHINE ?= "invalid"
 SP_UUID = "${ENV_TEST_UUID}"
 TS_SP_ENVTEST_CONFIG ?= "baremetal-fvp_base_revc"
 
+DEPENDS += "python3-jsonschema-native python3-jinja2-native"
+
 OECMAKE_SOURCEPATH="${S}/deployments/env-test/config/${TS_SP_ENVTEST_CONFIG}-${TS_ENV}"
Signature · 1 line
2.34.1
#5 lore raw

PATCH 6/10 arm/trusted-services/ts-sp-env-test: remove

In reply to [email protected]

From: Ross Burton <[email protected]>

This test needs the TF-A sources available to build. When the test is needed, this commit can be reverted to bring it back.

---
 .../trusted-services/ts-sp-env-test_git.bb          | 13 -------------
 1 file changed, 13 deletions(-)
 delete mode 100644 meta-arm/recipes-security/trusted-services/ts-sp-env-test_git.bb
meta-arm/recipes-security/trusted-services/ts-sp-env-test_git.bb deleted +0 -13
deleted file mode 100644
index cda43e6e..00000000
@@ -1,13 +0,0 @@
-DESCRIPTION = "Trusted Services test_runner service provider"
-
-require ts-sp-common.inc
-
-# Current version of env-test SP contains hard-coded values for FVP.
-COMPATIBLE_MACHINE ?= "invalid"
-
-SP_UUID = "${ENV_TEST_UUID}"
-TS_SP_ENVTEST_CONFIG ?= "baremetal-fvp_base_revc"
-
-DEPENDS += "python3-jsonschema-native python3-jinja2-native"
-
-OECMAKE_SOURCEPATH="${S}/deployments/env-test/config/${TS_SP_ENVTEST_CONFIG}-${TS_ENV}"
Signature · 1 line
2.34.1
#6 lore raw

PATCH 7/10 arm/trusted-services: use apply_local_src_patches

In reply to [email protected]

From: Ross Burton <[email protected]>

Now that the apply_local_src_patches class supports being used with multiple directories, use that instead of reimplementing the logic.

Also remove redundant patchdir assignments as these patches are against the trusted-services repository, which is ${S}. I suspect these are exposing a subtle bug in the core patching logic which meant the local patches were not applying correctly.

---
 .../trusted-services/ts-arm-platforms.inc     | 16 ++++++++--------
 .../trusted-services/trusted-services-src.inc | 19 ++++++++++---------
 .../ts-psa-api-test-common_git.inc            | 10 +++-------
 3 files changed, 21 insertions(+), 24 deletions(-)
meta-arm-bsp/recipes-security/trusted-services/ts-arm-platforms.inc +8 -8
index 29e33ffe..551a67dc 100644
@@ -2,14 +2,14 @@ FILESEXTRAPATHS:prepend:corstone1000 := "${THISDIR}/corstone1000:"
 
 COMPATIBLE_MACHINE:corstone1000 = "corstone1000"
 SRC_URI:append:corstone1000  = " \
-    file://0001-Add-stub-capsule-update-service-components.patch;patchdir=../trusted-services \
-    file://0002-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch;patchdir=../trusted-services \
-    file://0003-FMP-Support-in-Corstone1000.patch;patchdir=../trusted-services \
-    file://0004-GetNextVariableName-Fix.patch;patchdir=../trusted-services     \
-    file://0005-plat-corstone1000-add-compile-definitions-for-ECP_DP.patch;patchdir=../trusted-services \
-    file://0006-plat-corstone1000-Use-the-stateless-platform-service.patch;patchdir=../trusted-services \
-    file://0007-plat-corstone1000-Initialize-capsule-update-provider.patch;patchdir=../trusted-services \
-    file://0008-plat-corstone1000-change-ns-interrupt-action.patch;patchdir=../trusted-services \
+    file://0001-Add-stub-capsule-update-service-components.patch \
+    file://0002-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch \
+    file://0003-FMP-Support-in-Corstone1000.patch \
+    file://0004-GetNextVariableName-Fix.patch     \
+    file://0005-plat-corstone1000-add-compile-definitions-for-ECP_DP.patch \
+    file://0006-plat-corstone1000-Use-the-stateless-platform-service.patch \
+    file://0007-plat-corstone1000-Initialize-capsule-update-provider.patch \
+    file://0008-plat-corstone1000-change-ns-interrupt-action.patch \
     "
 
 
meta-arm/recipes-security/trusted-services/trusted-services-src.inc +10 -9
index 50360b1d..ce073943 100644
@@ -61,16 +61,17 @@ LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e14135
 
 SRCREV_FORMAT = "trusted-services_dtc_mbedtls_nanopb_qcbor_tcose_cpputest_libmetal_openamp"
 
-# TS ships patches for external dependencies that needs to be applied
-apply_ts_patches() {
-    ( cd ${WORKDIR}/git/qcbor;    git stash; git branch -f bf_am; git am ${S}/external/qcbor/*.patch; git reset bf_am )
-    ( cd ${WORKDIR}/git/tcose;    git stash; git branch -f bf_am; git am ${S}/external/t_cose/*.patch; git reset bf_am )
-    ( cd ${WORKDIR}/git/mbedtls;  git stash; git branch -f bf_am; git am ${S}/external/MbedTLS/*.patch; git reset bf_am )
-    ( cd ${WORKDIR}/git/cpputest; git stash; git apply ${S}/external/CppUTest/*.patch )
-    ( cd ${WORKDIR}/git/dtc;      git stash; git apply ${S}/external/libfdt/*.patch )
-    ( cd ${WORKDIR}/git/nanopb;   git stash; git apply ${S}/external/nanopb/*.patch )
+inherit apply_local_src_patches
+LOCAL_SRC_PATCHES_INPUT_DIR = "N/A"
+
+do_apply_local_src_patches() {
+    apply_local_src_patches ${S}/external/qcbor ${WORKDIR}/git/qcbor
+    apply_local_src_patches ${S}/external/t_cose ${WORKDIR}/git/tcose
+    apply_local_src_patches ${S}/external/MbedTLS ${WORKDIR}/git/mbedtls
+    apply_local_src_patches ${S}/external/CppUTest ${WORKDIR}/git/cpputest
+    apply_local_src_patches ${S}/external/libfdt ${WORKDIR}/git/dtc
+    apply_local_src_patches ${S}/external/nanopb ${WORKDIR}/git/nanopb
 }
-do_patch[postfuncs] += "apply_ts_patches"
 
 # Paths to dependencies required by some TS SPs/tools
 EXTRA_OECMAKE += "-DDTC_SOURCE_DIR=${WORKDIR}/git/dtc \
meta-arm/recipes-security/trusted-services/ts-psa-api-test-common_git.inc +3 -7
index 8a7b0e5c..c8b4e992 100644
@@ -16,15 +16,11 @@ SRC_URI += "git://github.com/ARM-software/psa-arch-tests.git;name=psatest;protoc
 SRCREV_psatest = "38cb53a4d9e292435ddf7899960b15af62decfbe"
 LIC_FILES_CHKSUM += "file://../psatest/LICENSE.md;md5=2a944942e1496af1886903d274dedb13"
 
-EXTRA_OECMAKE += "\
-                  -DPSA_ARCH_TESTS_SOURCE_DIR=${WORKDIR}/git/psatest \
-                 "
+EXTRA_OECMAKE += "-DPSA_ARCH_TESTS_SOURCE_DIR=${WORKDIR}/git/psatest"
 
-# TS check if there are patches to apply to psa-arch-tests, if so apply them
-apply_ts_patch() {
-    find ${S}/external/psa_arch_tests -type f -name '*.patch' -exec patch -p1 -d ${WORKDIR}/git/psatest -i {} \;
+do_apply_local_src_patches:append() {
+    apply_local_src_patches ${S}/external/psa_arch_tests ${WORKDIR}/git/psatest
 }
-do_patch[postfuncs] += "apply_ts_patch"
 
 FILES:${PN} = "${bindir}/${PSA_TEST}"
 
Signature · 1 line
2.34.1
#7 lore raw

PATCH 8/10 arm/trusted-services: upgrade nanopb and fix build races

In reply to [email protected]

From: Ross Burton <[email protected]>

Upgrade nanopb, clean up how it is build, and hopefully fix the build races. This patch isn't quite ready to be upstreamed but discussion with the TS maintainer is ongoing.

---
 .../files/nanopb-upgrade.patch                | 112 ++++++++++++++++++
 .../trusted-services/trusted-services-src.inc |   5 +-
 2 files changed, 115 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm/recipes-security/trusted-services/files/nanopb-upgrade.patch
meta-arm/recipes-security/trusted-services/files/nanopb-upgrade.patch new file +112 -0
new file mode 100644
index 00000000..3e21f553
@@ -0,0 +1,112 @@
+Upgrade the nanopb checkout to 0.4.7 plus some important build fixes, and
+change the build/install process to be more reliable.
+
+This should be upstreamed, but some pieces of this are not upstreamable in their
+current state.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/external/nanopb/fix-pyhon-name.patch b/external/nanopb/fix-pyhon-name.patch
+deleted file mode 100644
+index ab0e84c..0000000
+--- a/external/nanopb/fix-pyhon-name.patch
++++ /dev/null
+@@ -1,41 +0,0 @@
+-This patch fixes two issues:
+-
+-1. On windows the python3 executable is not allways called "python3". As a result
+-    "protoc" execution can fail due to the shebang in the file. This patch fixes
+-    this by running protoc with the intepreter.
+-
+-2. In addition when not running from a virtualenv, the install path for python file
+-    is set to the "user site-packages" to avoid needing elevated access rights.
+-
+-diff --git a/CMakeLists.txt b/CMakeLists.txt
+-index 31c86e7..e827015 100644
+---- a/CMakeLists.txt
+-+++ b/CMakeLists.txt
+-@@ -54,13 +54,25 @@ if(nanopb_BUILD_GENERATOR)
+-         string(REGEX REPLACE "([^;]+)" "\\1_pb2.py" generator_proto_py_file "${generator_proto}")
+-         add_custom_command(
+-             OUTPUT ${generator_proto_py_file}
+--            COMMAND ${nanopb_PROTOC_PATH} --python_out=${PROJECT_BINARY_DIR} -I${PROJECT_SOURCE_DIR}/generator/proto ${generator_proto_file}
+-+            COMMAND ${Python_EXECUTABLE} ${nanopb_PROTOC_PATH} --python_out=${PROJECT_BINARY_DIR} -I${PROJECT_SOURCE_DIR}/generator/proto ${generator_proto_file}
+-             DEPENDS ${generator_proto_file}
+-         )
+-         add_custom_target("generate_${generator_proto_py_file}" ALL DEPENDS ${generator_proto_py_file})
+-+
+-+        if (DEFINED ENV{VIRTUAL_ENV})
+-+            set(PYTHON_INSTALL_DIR ${Python_SITELIB} CACHE PATH "Install location for generated python modules.")
+-+        else()
+-+            execute_process(
+-+                COMMAND ${Python_EXECUTABLE} -m site --user-site
+-+                OUTPUT_VARIABLE PYTHON_USER_SITE
+-+                OUTPUT_STRIP_TRAILING_WHITESPACE
+-+            )
+-+            set(PYTHON_INSTALL_DIR ${PYTHON_USER_SITE} CACHE PATH "Install location for generated python modules.")
+-+        endif()
+-+
+-         install(
+-             FILES ${PROJECT_BINARY_DIR}/${generator_proto_py_file}
+--            DESTINATION ${Python_SITELIB}
+-+            DESTINATION ${PYTHON_INSTALL_DIR}
+-         )
+-     endforeach()
+- endif()
+diff --git a/external/nanopb/nanopb-init-cache.cmake.in b/external/nanopb/nanopb-init-cache.cmake.in
+index fb8104d..8df41dd 100644
+--- a/external/nanopb/nanopb-init-cache.cmake.in
++++ b/external/nanopb/nanopb-init-cache.cmake.in
+@@ -12,11 +12,15 @@ set(BUILD_STATIC_LIBS On CACHE BOOL "")
+ set(nanopb_BUILD_RUNTIME On CACHE BOOL "")
+ set(nanopb_BUILD_GENERATOR On CACHE BOOL "")
+ set(nanopb_MSVC_STATIC_RUNTIME Off BOOL "")
+-set(nanopb_PROTOC_PATH ${CMAKE_SOURCE_DIR}/generator/protoc CACHE STRING "")
++
++set(Python_EXECUTABLE "@Python_EXECUTABLE@" CACHE PATH "Location of python3 executable")
+ 
+ string(TOUPPER @CMAKE_CROSSCOMPILING@ CMAKE_CROSSCOMPILING) # CMake expects TRUE
+ if (CMAKE_CROSSCOMPILING)
+ 	set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE STRING "")
+ endif()
+ 
++set(nanopb_PYTHON_INSTDIR_OVERRIDE "@BUILD_INSTALL_DIR@/lib/python" CACHE PATH "")
++set(NANOPB_GENERATOR_DIR "@BUILD_INSTALL_DIR@/lib/python" CACHE PATH "")
++
+ @_cmake_fragment@
+diff --git a/external/nanopb/nanopb.cmake b/external/nanopb/nanopb.cmake
+index 36465f6..57cf3d6 100644
+--- a/external/nanopb/nanopb.cmake
++++ b/external/nanopb/nanopb.cmake
+@@ -28,7 +28,7 @@ running this module.
+ 
+ set(NANOPB_URL "https://github.com/nanopb/nanopb.git"
+ 		CACHE STRING "nanopb repository URL")
+-set(NANOPB_REFSPEC "nanopb-0.4.2"
++set(NANOPB_REFSPEC "nanopb-0.4.7"
+ 		CACHE STRING "nanopb git refspec")
+ set(NANOPB_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_deps/nanopb-src"
+ 		CACHE PATH "nanopb source-code")
+@@ -85,7 +85,7 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ 
+ find_file(NANOPB_GENERATOR_PATH
+ 			NAMES nanopb_generator.py
+-			PATHS ${nanopb_SOURCE_DIR}/generator
++			PATHS ${NANOPB_INSTALL_DIR}/bin
+ 			DOC "nanopb protobuf compiler"
+ 			NO_DEFAULT_PATH
+ 		)
+@@ -186,11 +186,10 @@ function(protobuf_generate)
+ 		target_include_directories(${PARAMS_TGT} PRIVATE ${_OUT_DIR_BASE})
+ 	endif()
+ 
+-	get_filename_component(NANOPB_GENERATOR_DIR "${NANOPB_GENERATOR_PATH}" DIRECTORY CACHE "Location of nanopb generator.")
+ 	#Append a protobuf generator command to the nanopb_generate target.
+ 	add_custom_command(OUTPUT "${_OUT_C}" "${_OUT_H}"
+ 					   COMMAND
+-					   ${CMAKE_COMMAND} -E env PYTHONPATH=${NANOPB_GENERATOR_DIR}
++					   ${CMAKE_COMMAND} -E env PYTHONPATH=${NANOPB_INSTALL_DIR}/lib/python
+ 					   ${Python3_EXECUTABLE} ${NANOPB_GENERATOR_PATH}
+ 						  -I ${PARAMS_BASE_DIR}
+ 						  -D ${_OUT_DIR_BASE}
meta-arm/recipes-security/trusted-services/trusted-services-src.inc +3 -2
index ce073943..20a46219 100644
@@ -10,6 +10,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 SRC_URI:append = "\
 	file://0001-Limit-nanopb-build-to-single-process.patch \
 	file://0001-LazyFetch-allow-setting-the-cmake-generator.patch \
+	file://nanopb-upgrade.patch \
 "
 
 #Latest on 2023 April 28
@@ -29,9 +30,9 @@ SRC_URI += "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;bra
 SRCREV_mbedtls = "8c89224991adff88d53cd380f42a2baa36f91454"
 LIC_FILES_CHKSUM += "file://../mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-# Nanopb, tag "nanopb-0.4.2"
+# Nanopb, tag "nanopb-0.4.7" plus some further fixes
 SRC_URI += "git://github.com/nanopb/nanopb.git;name=nanopb;protocol=https;branch=master;destsuffix=git/nanopb"
-SRCREV_nanopb = "df0e92f474f9cca704fe2b31483f0b4d1b1715a4"
+SRCREV_nanopb = "dbbf5d8992295aae669b8071eadad02f87d5faf0"
 LIC_FILES_CHKSUM += "file://../nanopb/LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
 
 # qcbor, tag "v1.0.0"
Signature · 1 line
2.34.1
#8 lore raw

PATCH 9/10 CI: use a venv for sphinx

In reply to [email protected]

From: Ross Burton <[email protected]>

The Kas container in version 4 onwards is based on Debian 12, which forbids pip from installing files into /usr or ~/.local/.

We want to install the arbitrary dependencies for the documentation build, so these should be installed in a venv.

The kas container doesn't currently install python3-venv, so we have to install that manually (patch sent upstream).

---
 .gitlab-ci.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
.gitlab-ci.yml +8 -1
index c750698d..7e1a77cd 100644
@@ -288,7 +288,14 @@ documentation:
   extends: .setup
   script:
     - |
-      sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
+      # This can be removed when the kas container has python3-venv installed
+      sudo apt-get update && sudo apt-get install --yes python3-venv
+
+      python3 -m venv venv
+      . ./venv/bin/activate
+
+      pip3 install -r meta-arm-bsp/documentation/requirements.txt
+
       for CONF in meta-*/documentation/*/conf.py ; do
         echo Building $CONF...
         SOURCE_DIR=$(dirname $CONF)
Signature · 1 line
2.34.1
#9 lore raw

PATCH 10/10 CI: upgrade to Kas 4 container

In reply to [email protected]

From: Ross Burton <[email protected]>

The Kas binary is identical, but the container has been rebuilt using Debian 12 (Bookworm).

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 7e1a77cd..806d4b4a 100644
@@ -1,4 +1,4 @@
-image: ${MIRROR_GHCR}/siemens/kas/kas:3.3
+image: ${MIRROR_GHCR}/siemens/kas/kas:4.0
 
 variables:
   CPU_REQUEST: ""
Signature · 1 line
2.34.1
Applied
#10 lore raw
In reply to [email protected]
Quoted 9 lines · On Fri, 29 Sep 2023 16:21:19 +0100, [email protected] wrote:

Pull out the patch application logic so the postfunc by default scans for patches in LOCAL_SRC_PATCHES_INPUT_DIR and applies them to LOCAL_SRC_PATCHES_DEST_DIR as before.

This allows recipes to inherit the class and directly call apply_local_src_patches as needed to process patches in multiple directories.

[...]

Applied, thanks!

[01/10] arm/apply_local_src_patches: allow use in multiple directories

        commit: be76055bdccaa476f6b68abf1ff26c007d4717c9
[02/10] arm/trusted-services: pass through CMake generator
        commit: 893b20fbee25b7a9a6791ec415fe6117ddeb2cd8
[03/10] arm/trusted-services: add missing pkgconfig inherit
        commit: 7a126f00ded5a4cf013df80e75198c1f55883eca
[04/10] arm/trusted-services/ts-remote-test: move binary to $bindir
        commit: 909d49fa6f5eaf3ee686b5f6c0eee5ed4a830d47
[05/10] arm/trusted-services/ts-sp-env-test: add missing DEPENDS
        commit: 549e05e486cb55697adf2fd068e6cc22dd194942
[06/10] arm/trusted-services/ts-sp-env-test: remove
        commit: 67deb2cf1bbfd343cc2bb847bd625a5e3b79ed74
[07/10] arm/trusted-services: use apply_local_src_patches
        commit: 46e6f42e31a239aee59255022742819ea1ed6aaf
[08/10] arm/trusted-services: upgrade nanopb and fix build races
        commit: 210a6ace832534cb1a492649e3e61532e9ca6a8f
[09/10] CI: use a venv for sphinx
        commit: dbad5d928199e3feae0acb43cc23c6daeacc7f1b
[10/10] CI: upgrade to Kas 4 container
        commit: 4d76ed4c75dbfef8bb444777dab9fae88e3dcaaa

Best regards,

Signature · 1 line
Jon Mason <[email protected]>