We are migrating Tensorflow-Lite from v2.18.0 to the
stable release v2.20.0

Key Changes:
 - Pin flatbuffers-native and protobuf-native to use the same version as
   TensorFlow Lite 2.20.0 to avoid version mismatch
 - Updated SRCREV for all the dependencies
 - Updated recipe to meet the build compatibilty

Removed Patches:
 - 0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch
   - This patch was TFLite v2.18 specific hence dropped in this version
 
Rebased Patches:
 - Updated with new commits:
   - 0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch
   - 0002-lite-Update-CMakeLists-for-building-shared-object-li.patch

Signed-off-by: Pratham Deshmukh <[email protected]>
---
Change Logs:

v2 -> v3:
 - Added Authored-by signature in relevant patches
 - Link to v2:
   - 
https://patchwork.yoctoproject.org/project/arago/cover/[email protected]/

v1 -> v2:
 - Added patches with new commits
 - Fixed recipe to handle proper versioned library file
 - Link to v1:
   - 
https://patchwork.yoctoproject.org/project/arago/cover/[email protected]/

 .../flatbuffers/flatbuffers-arago.inc         |  8 +++
 .../flatbuffers/flatbuffers.bbappend          |  4 ++
 .../protobuf/protobuf-arago.inc               | 18 +++++++
 .../protobuf/protobuf_%.bbappend              |  5 ++
 ...0001-Update-CMakeLists-for-building.patch} | 20 +++----
 ...akeLists-for-building-shared-object.patch} | 54 ++++++++++++-------
 ...uild-issues-observed-in-TFlite-v2.18.patch | 35 ------------
 ...te_2.18.0.bb => tensorflow-lite_2.20.0.bb} | 51 ++++++++++--------
 8 files changed, 108 insertions(+), 87 deletions(-)
 create mode 100644 
meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers-arago.inc
 create mode 100644 
meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers.bbappend
 create mode 100644 
meta-arago-extras/recipes-devtools/protobuf/protobuf-arago.inc
 create mode 100644 
meta-arago-extras/recipes-devtools/protobuf/protobuf_%.bbappend
 rename 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/{0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch
 => 0001-Update-CMakeLists-for-building.patch} (70%)
 rename 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/{0002-lite-Update-CMakeLists-for-building-shared-object-li.patch
 => 0002-Update-CMakeLists-for-building-shared-object.patch} (49%)
 delete mode 100644 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch
 rename 
meta-arago-extras/recipes-framework/tensorflow-lite/{tensorflow-lite_2.18.0.bb 
=> tensorflow-lite_2.20.0.bb} (84%)

diff --git 
a/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers-arago.inc 
b/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers-arago.inc
new file mode 100644
index 00000000..d85efc8b
--- /dev/null
+++ b/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers-arago.inc
@@ -0,0 +1,8 @@
+# Pin flatbuffers-native to use the same version as TensorFlow Lite 2.20.0
+# to avoid version mismatch errors
+
+# Override version to match
+PV = "24.3.25"
+
+# Use specific commit hash that corresponds to v24.3.25 tag
+SRCREV = "595bf0007ab1929570c7671f091313c8fc20644e"
diff --git 
a/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers.bbappend 
b/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers.bbappend
new file mode 100644
index 00000000..2a627698
--- /dev/null
+++ b/meta-arago-extras/recipes-devtools/flatbuffers/flatbuffers.bbappend
@@ -0,0 +1,4 @@
+# Conditionally include Arago-specific customizations for flatbuffers-native
+FLATBUFFERS_ARAGO = ""
+FLATBUFFERS_ARAGO:arago = "flatbuffers-arago.inc"
+require ${FLATBUFFERS_ARAGO}
diff --git a/meta-arago-extras/recipes-devtools/protobuf/protobuf-arago.inc 
b/meta-arago-extras/recipes-devtools/protobuf/protobuf-arago.inc
new file mode 100644
index 00000000..489b1444
--- /dev/null
+++ b/meta-arago-extras/recipes-devtools/protobuf/protobuf-arago.inc
@@ -0,0 +1,18 @@
+# Pin protobuf-native to use the same version as TensorFlow Lite 2.20.0
+# to avoid version mismatch errors
+
+# Override version to match
+PV = "3.21.9"
+
+# Use specific commit hash that corresponds to v24.3.25 tag
+SRCREV = "90b73ac3f0b10320315c2ca0d03a5a9b095d2f66"
+
+# Override SRC_URI to use 3.21.x branch and remove incompatible patches
+SRC_URI = 
"git://github.com/protocolbuffers/protobuf.git;branch=main;protocol=https \
+           file://run-ptest \
+          " 
+
+LIC_FILES_CHKSUM = " \
+    file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b \
+    file://third_party/utf8_range/LICENSE;md5=ef460f31070fd7184bd9059de2e4b132 
\
+"
diff --git a/meta-arago-extras/recipes-devtools/protobuf/protobuf_%.bbappend 
b/meta-arago-extras/recipes-devtools/protobuf/protobuf_%.bbappend
new file mode 100644
index 00000000..51c679a5
--- /dev/null
+++ b/meta-arago-extras/recipes-devtools/protobuf/protobuf_%.bbappend
@@ -0,0 +1,5 @@
+# Conditionally include Arago-specific customizations for flatbuffers-native
+PROTOBUF_ARAGO = ""
+PROTOBUF_ARAGO:arago = "protobuf-arago.inc"
+
+require ${PROTOBUF_ARAGO}
diff --git 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch
 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-Update-CMakeLists-for-building.patch
similarity index 70%
rename from 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch
rename to 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-Update-CMakeLists-for-building.patch
index 6c2b9155..308b029c 100644
--- 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch
+++ 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0001-Update-CMakeLists-for-building.patch
@@ -1,7 +1,7 @@
-From 050127548d7f28464cbe5dc9caa83c8023676d80 Mon Sep 17 00:00:00 2001
-From: Chirag Shilwant <[email protected]>
-Date: Thu, 13 Feb 2025 14:33:50 +0530
-Subject: [PATCH 1/3] lite: Update CMakeLists for building
+From b730b1086d715048f6e00c65dc6777f635df0428 Mon Sep 17 00:00:00 2001
+From: Pratham Deshmukh <[email protected]>
+Date: Thu, 5 Mar 2026 19:19:20 +0530
+Subject: [PATCH 1/2] Update CMakeLists for building 
  _pywrap_tensorflow_interpreter_wrapper
 
 - Update the CMakeLists.txt file for TensorFlow Lite to include the paths for
@@ -13,16 +13,17 @@ target that relies on these dependencies.
 
 Upstream-Status: Inappropriate [configuration]
 
-Signed-off-by: Chirag Shilwant <[email protected]>
+Authored-by: Chirag Shilwant <[email protected]>
+Signed-off-by: Pratham Deshmukh <[email protected]>
 ---
  tensorflow/lite/CMakeLists.txt | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt
-index bce9627fbd3..b7bb39869b5 100644
+index 3198ec61..63801efb 100644
 --- a/tensorflow/lite/CMakeLists.txt
 +++ b/tensorflow/lite/CMakeLists.txt
-@@ -810,6 +810,9 @@ 
set_target_properties(_pywrap_tensorflow_interpreter_wrapper PROPERTIES PREFIX "
+@@ -827,6 +827,9 @@ 
set_target_properties(_pywrap_tensorflow_interpreter_wrapper PROPERTIES PREFIX "
  target_include_directories(_pywrap_tensorflow_interpreter_wrapper
    PUBLIC
      ${TENSORFLOW_SOURCE_DIR}
@@ -30,7 +31,8 @@ index bce9627fbd3..b7bb39869b5 100644
 +    ${NUMPY_TARGET_INCLUDE}
 +    ${PYBIND11_TARGET_INCLUDE}
  )
-
+ 
  target_link_libraries(_pywrap_tensorflow_interpreter_wrapper
---
+-- 
 2.34.1
+
diff --git 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-lite-Update-CMakeLists-for-building-shared-object-li.patch
 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-Update-CMakeLists-for-building-shared-object.patch
similarity index 49%
rename from 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-lite-Update-CMakeLists-for-building-shared-object-li.patch
rename to 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-Update-CMakeLists-for-building-shared-object.patch
index 3450cf81..d1412cfa 100644
--- 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-lite-Update-CMakeLists-for-building-shared-object-li.patch
+++ 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0002-Update-CMakeLists-for-building-shared-object.patch
@@ -1,8 +1,7 @@
-From 339b5a7e5f17a60df1e3d6d2ffe607786ce34978 Mon Sep 17 00:00:00 2001
-From: Chirag Shilwant <[email protected]>
-Date: Thu, 13 Feb 2025 14:38:01 +0530
-Subject: [PATCH 2/3] lite: Update CMakeLists for building shared object
- library
+From 799d46ca08223b6f936093a790d510e9247249ae Mon Sep 17 00:00:00 2001
+From: Pratham Deshmukh <[email protected]>
+Date: Thu, 5 Mar 2026 19:41:36 +0530
+Subject: [PATCH 2/2] Update CMakeLists for building shared object library
 
 - When building TFLite with CMake, it builds static library
 (i.e. libtensorflow-lite.a) by default which isn't self-contained
@@ -16,45 +15,60 @@ inorder to generate a shared object library (i.e. 
libtensorflow-lite.so)
 it ensures that the properties are set correctly to manage the shared
 object version.
 
+- Implements conditional versioning using TF_MAJOR_VERSION, TF_MINOR_VERSION,
+and TF_PATCH_VERSION variables passed from the build system, replacing
+the previous approach that used undefined TFLITE_VERSION_MAJOR variable
+which caused malformed SONAME generation (libtensorflow-lite.so.)
+
+- The proper versioning ensures benchmark_model and other dependent binaries
+embed correct SONAME references for successful dynamic linking at runtime.
+
 [1]: https://ai.google.dev/edge/litert/build/cmake#step_5_build_litert
 
 Upstream-Status: Inappropriate [enable feature]
 
-Signed-off-by: Chirag Shilwant <[email protected]>
+Authored-by: Chirag Shilwant <[email protected]>
+Signed-off-by: Pratham Deshmukh <[email protected]>
 ---
- tensorflow/lite/CMakeLists.txt | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
+ tensorflow/lite/CMakeLists.txt | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
 
 diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt
-index b7bb39869b5..92b05e42446 100644
+index 63801efb..7e0004ef 100644
 --- a/tensorflow/lite/CMakeLists.txt
 +++ b/tensorflow/lite/CMakeLists.txt
-@@ -671,6 +671,7 @@ set(_ALL_TFLITE_SRCS
+@@ -684,6 +684,7 @@ set(_ALL_TFLITE_SRCS
    ${TFLITE_SOURCE_DIR}/kernels/internal/utils/sparsity_format_converter.cc
    ${TFLITE_SOURCE_DIR}/schema/conversion_metadata_generated.h
    ${TFLITE_SOURCE_DIR}/schema/schema_generated.h
 +  ${TFLITE_SOURCE_DIR}/schema/schema_conversion_utils.h
-   ${TF_SOURCE_DIR}/compiler/mlir/lite/schema/schema_utils.cc
-   ${TF_SOURCE_DIR}/compiler/mlir/lite/schema/schema_generated.h
-   ${TF_SOURCE_DIR}/compiler/mlir/lite/schema/conversion_metadata_generated.h
-@@ -697,7 +698,7 @@ else()
+   ${TFLITE_SRCS}
+   ${TF_SOURCE_DIR}/compiler/mlir/lite/allocation.cc
+   ${TF_SOURCE_DIR}/compiler/mlir/lite/allocation.h
+@@ -714,7 +715,7 @@ else()
    list(FILTER _ALL_TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation\\.cc$")
  endif()
-
+ 
 -add_library(tensorflow-lite
 +add_library(tensorflow-lite SHARED EXCLUDE_FROM_ALL
    ${_ALL_TFLITE_SRCS}
  )
  set(_ALL_TFLITE_HDRS ${_ALL_TFLITE_SRCS})
-@@ -773,6 +774,9 @@ if(TFLITE_ENABLE_INSTALL)
+@@ -790,6 +791,14 @@ if(TFLITE_ENABLE_INSTALL)
    )
  endif()
-
-+# Manage version for shared object (dynamic) library
-+set_target_properties(tensorflow-lite PROPERTIES VERSION 
"${TFLITE_VERSION_MAJOR}")
+ 
++# Set proper version properties for shared library
++if(DEFINED TF_MAJOR_VERSION AND DEFINED TF_MINOR_VERSION AND DEFINED 
TF_PATCH_VERSION)
++  set_target_properties(tensorflow-lite PROPERTIES
++    VERSION "${TF_MAJOR_VERSION}.${TF_MINOR_VERSION}.${TF_PATCH_VERSION}"
++    SOVERSION "${TF_MAJOR_VERSION}"
++  )
++endif()
 +
  # The kernel tests.
  if(TFLITE_KERNEL_TEST)
    enable_testing()
---
+-- 
 2.34.1
+
diff --git 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch
 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch
deleted file mode 100644
index 38cbf185..00000000
--- 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite/0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 577192caa67660f857f2869896d01db3611b4128 Mon Sep 17 00:00:00 2001
-From: Chirag Shilwant <[email protected]>
-Date: Thu, 13 Feb 2025 14:45:46 +0530
-Subject: [PATCH 3/3] CMakeLists: Fix build issues observed in TFlite v2.18
-
-- Improve regular expression for filtering neon and sse
-related sources. The improved expression avoids missing files
-in case the absolute path contains the terms neon or sse.
-
-- Fixes [1]
-
-[1]: https://github.com/tensorflow/tensorflow/issues/70730
-
-Upstream-Status: Backport from master
-
-Signed-off-by: Chirag Shilwant <[email protected]>
----
- tensorflow/lite/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt
-index 92b05e42446..737f754621f 100644
---- a/tensorflow/lite/CMakeLists.txt
-+++ b/tensorflow/lite/CMakeLists.txt
-@@ -605,7 +605,7 @@ 
populate_tflite_source_vars("kernels/internal/reference/sparse_ops"
- )
- populate_tflite_source_vars("kernels/internal/optimized/4bit"
-   TFLITE_KERNEL_INTERNAL_OPT_4BIT_SRCS
--  FILTER "(.*neon.*|.*sse.*)\\.(cc|h)"
-+  FILTER "(.*neon_.*|.*sse_.*)\\.(cc|h)"
- )
- set(TFLITE_PROFILER_SRCS
-   ${TFLITE_SOURCE_DIR}/profiling/platform_profiler.cc
---
-2.34.1
diff --git 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.18.0.bb 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.20.0.bb
similarity index 84%
rename from 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.18.0.bb
rename to 
meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.20.0.bb
index c76939ac..43562303 100644
--- 
a/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.18.0.bb
+++ 
b/meta-arago-extras/recipes-framework/tensorflow-lite/tensorflow-lite_2.20.0.bb
@@ -8,18 +8,19 @@ LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=4158a261ca7f2525513e31ba9c50ae98"
 
 # Get major of the PV variable
-MAJOR = "${@d.getVar('PV').split('.')[0]}"
+TF_MAJOR = "${@d.getVar('PV').split('.')[0]}"
+TF_MINOR = "${@d.getVar('PV').split('.')[1]}"
+TF_PATCH = "${@(d.getVar('PV').split('.') + ['0', '0'])[2]}"
 
 SRC_URI = " \
-    git://github.com/tensorflow/tensorflow.git;protocol=https;branch=r2.18 \
-    file://0001-lite-Update-CMakeLists-for-building-_pywrap_tensorfl.patch \
-    file://0002-lite-Update-CMakeLists-for-building-shared-object-li.patch \
-    file://0003-CMakeLists-Fix-build-issues-observed-in-TFlite-v2.18.patch \
+    git://github.com/tensorflow/tensorflow.git;protocol=https;branch=r2.20 \
+    file://0001-Update-CMakeLists-for-building.patch \
+    file://0002-Update-CMakeLists-for-building-shared-object.patch \
     file://tensorflow2-lite.pc.in \
 "
 
 SRC_URI += " \
-    
git://github.com/abseil/abseil-cpp.git;protocol=https;branch=lts_2023_08_02;name=abseil-cpp;destsuffix=${S}/external/abseil-cpp
 \
+    
git://github.com/abseil/abseil-cpp.git;protocol=https;branch=lts_2025_01_27;name=abseil-cpp;destsuffix=${S}/external/abseil-cpp
 \
     
git://gitlab.com/libeigen/eigen.git;protocol=https;branch=master;name=eigen;destsuffix=${S}/external/eigen
 \
     
git://github.com/google/farmhash.git;protocol=https;branch=master;name=farmhash;destsuffix=${S}/external/farmhash
 \
     
git://github.com/petewarden/OouraFFT.git;protocol=https;branch=master;name=fft2d;destsuffix=${S}/external/fft2d
 \
@@ -28,35 +29,35 @@ SRC_URI += " \
     
git://github.com/jax-ml/ml_dtypes.git;branch=main;protocol=https;name=ml_dtypes;destsuffix=${S}/external/ml_dtypes
 \
     
git://github.com/google/ruy.git;branch=master;protocol=https;name=ruy;destsuffix=${S}/external/ruy
 \
     
git://github.com/google/flatbuffers;branch=master;protocol=https;name=flatbuffers;destsuffix=${S}/external/flatbuffers
 \
-    
git://github.com/Maratyszcza/pthreadpool.git;branch=master;protocol=https;name=pthreadpool-source;destsuffix=${S}/external/pthreadpool-source
 \
+    
git://github.com/google/pthreadpool.git;branch=main;protocol=https;name=pthreadpool-source;destsuffix=${S}/external/pthreadpool-source
 \
     
git://github.com/google/XNNPACK.git;branch=master;protocol=https;name=xnnpack;destsuffix=${S}/external/xnnpack
 \
     
git://github.com/Maratyszcza/FXdiv.git;branch=master;protocol=https;name=FXdiv-source;destsuffix=${S}/external/FXdiv-source
 \
     
git://github.com/Maratyszcza/FP16.git;branch=master;protocol=https;name=FP16-source;destsuffix=${S}/external/FP16-source
 \
     
git://git.gitlab.arm.com/kleidi/kleidiai.git;branch=main;protocol=https;name=kleidiai;destsuffix=${S}/external/kleidiai
 \
     
git://github.com/Maratyszcza/psimd.git;branch=master;protocol=https;name=psimd;destsuffix=${S}/external/psimd
 \
-    
git://github.com/protocolbuffers/protobuf.git;branch=25.x;protocol=https;name=protobuf;destsuffix=${S}/external/protobuf
 \
+    
git://github.com/protocolbuffers/protobuf.git;branch=main;protocol=https;name=protobuf;destsuffix=${S}/external/protobuf
 \
 "
 
 SRCREV_FORMAT = "default"
 
 # Matches v${PV} tag
-SRCREV = "6550e4bd80223cdb8be6c3afd1f81e86a4d433c3"
-SRCREV_abseil-cpp = "fb3621f4f897824c0dbe0615fa94543df6192f30"
+SRCREV = "72fbba3d20f4616d7312b5e2b7f79daf6e82f2fa"
+SRCREV_abseil-cpp = "d9e4955c65cd4367dd6bf46f4ccb8cd3d100540b"
 SRCREV_eigen = "33d0937c6bdf5ec999939fb17f2a553183d14a74"
 SRCREV_farmhash = "0d859a811870d10f53a594927d0d0b97573ad06d"
 SRCREV_fft2d = "c6fd2dd6d21397baa6653139d31d84540d5449a2"
 SRCREV_gemmlowp = "16e8662c34917be0065110bfcd9cc27d30f52fdf"
-SRCREV_cpuinfo = "b73ae6ce38d5dd0b7fe46dbe0a4b5f4bab91c7ea"
+SRCREV_cpuinfo = "de0ce7c7251372892e53ce9bc891750d2c9a4fd8"
 SRCREV_ml_dtypes = "24084d9ed2c3d45bf83b7a9bff833aa185bf9172"
 SRCREV_ruy = "3286a34cc8de6149ac6844107dfdffac91531e72"
 SRCREV_flatbuffers = "e6463926479bd6b330cbcf673f7e917803fd5831"
-SRCREV_pthreadpool-source = "4fe0e1e183925bf8cfa6aae24237e724a96479b8"
-SRCREV_xnnpack = "6b83f69d4938da4dc9ad63c00bd13e9695659a51"
+SRCREV_pthreadpool-source = "c2ba5c50bb58d1397b693740cf75fad836a0d1bf"
+SRCREV_xnnpack = "585e73e63cb35c8a416c83a48ca9ab79f7f7d45e"
 SRCREV_FXdiv-source = "63058eff77e11aa15bf531df5dd34395ec3017c8"
-SRCREV_FP16-source = "0a92994d729ff76a58f692d3028ca1b64b145d91"
-SRCREV_kleidiai = "cddf991af5de49fd34949fa39690e4e906e04074"
+SRCREV_FP16-source = "4dfe081cf6bcd15db339cf2680b9281b8451eeb3"
+SRCREV_kleidiai = "dc69e899945c412a8ce39ccafd25139f743c60b1"
 SRCREV_psimd = "072586a71b55b7f8c584153d223e95687148a900"
-SRCREV_protobuf = "4a2aef570deb2bfb8927426558701e8bfc26f2a4"
+SRCREV_protobuf = "90b73ac3f0b10320315c2ca0d03a5a9b095d2f66"
 
 inherit setuptools3 cmake
 
@@ -91,7 +92,7 @@ OECMAKE_SOURCEPATH = "${S}/tensorflow/lite"
 # to further optimize the build for production use.
 # Hence, activate -O3 optimization and disable debug symbols.
 OECMAKE_C_FLAGS_RELEASE = "-O3 -DNDEBUG"
-OECMAKE_CXX_FLAGS_RELEASE = "-O3 -DNDEBUG -flax-vector-conversions"
+OECMAKE_CXX_FLAGS_RELEASE = "-O3 -DNDEBUG -flax-vector-conversions 
-DTF_MAJOR_VERSION=${TF_MAJOR} -DTF_MINOR_VERSION=${TF_MINOR} 
-DTF_PATCH_VERSION=${TF_PATCH} -DTF_VERSION_SUFFIX=\"\""
 
 OECMAKE_C_FLAGS_RELEASE:append:arm = " -march=armv7-a -mfpu=neon"
 OECMAKE_CXX_FLAGS_RELEASE:append:arm = " -march=armv7-a -mfpu=neon"
@@ -112,9 +113,8 @@ EXTRA_OECMAKE:append = " \
     -DCMAKE_SYSTEM_PROCESSOR=${TENSORFLOW_TARGET_ARCH} \
     -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
     -DPYTHON_TARGET_INCLUDE=${RECIPE_SYSROOT}${includedir}/${PYTHON_DIR} \
-    
-DNUMPY_TARGET_INCLUDE=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}/numpy/core/include
 \
+    
-DNUMPY_TARGET_INCLUDE=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}/numpy/_core/include
 \
     
-DPYBIND11_TARGET_INCLUDE=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR}/pybind11/include
 \
-    -DTFLITE_VERSION_MAJOR=${MAJOR}  \
     -DTFLITE_HOST_TOOLS_DIR=${STAGING_BINDIR_NATIVE} \
     -DPTHREADPOOL_SOURCE_DIR=${S}/external/pthreadpool-source \
     -DFXDIV_SOURCE_DIR=${S}/external/FXdiv-source \
@@ -122,6 +122,11 @@ EXTRA_OECMAKE:append = " \
     -DCPUINFO_SOURCE_DIR=${S}/external/cpuinfo \
     -DKLEIDIAI_SOURCE_DIR=${S}/external/kleidiai \
     -DPSIMD_SOURCE_DIR=${S}/external/psimd \
+    -DCMAKE_CXX_STANDARD=17 \
+    -DCMAKE_CXX_STANDARD_REQUIRED=ON \
+    -DTF_MAJOR_VERSION=${TF_MAJOR} \
+    -DTF_MINOR_VERSION=${TF_MINOR} \
+    -DTF_PATCH_VERSION=${TF_PATCH} \
     --compile-no-warning-as-error \
     --log-level=VERBOSE \
 "
@@ -143,7 +148,7 @@ do_compile:append() {
     BUILD_DIR=${B}
     TENSORFLOW_DIR=${S}
     TENSORFLOW_LITE_DIR="${TENSORFLOW_DIR}/tensorflow/lite"
-    TENSORFLOW_VERSION=$(grep "_VERSION = " 
"${TENSORFLOW_DIR}/tensorflow/tools/pip_package/setup.py" | cut -d= -f2 | sed 
"s/[ '-]//g")
+    TENSORFLOW_VERSION=$(grep "_VERSION = " 
"${TENSORFLOW_DIR}/tensorflow/tools/pip_package/setup.py.tpl" | cut -d= -f2 | 
sed "s/[ '-]//g")
     mkdir -p "${B}/tflite_runtime"
     cp -r "${TENSORFLOW_LITE_DIR}/tools/pip_package/debian" \
           "${TENSORFLOW_LITE_DIR}/tools/pip_package/MANIFEST.in" \
@@ -167,9 +172,9 @@ do_compile:append() {
 do_install() {
     # Install tensorflow-lite dynamic library
     install -d ${D}${libdir}
-    install -m 0644 ${B}/libtensorflow-lite.so.${MAJOR} 
${D}${libdir}/libtensorflow-lite.so.${PV}
+    install -m 0644 ${B}/libtensorflow-lite.so.${TF_MAJOR} 
${D}${libdir}/libtensorflow-lite.so.${PV}
 
-    ln -sf libtensorflow-lite.so.${PV} 
${D}${libdir}/libtensorflow-lite.so.${MAJOR}
+    ln -sf libtensorflow-lite.so.${PV} 
${D}${libdir}/libtensorflow-lite.so.${TF_MAJOR}
     ln -sf libtensorflow-lite.so.${PV} ${D}${libdir}/libtensorflow-lite.so
 
     # armnn expects the the dynamic library of tensorflow lite to be named as 
"libtensorflowlite.so"
@@ -197,7 +202,7 @@ do_install() {
 
     # Install pkgconfig file required for NNstreamer build
     install -d ${D}${libdir}/pkgconfig
-    install -m 0644 ${WORKDIR}/tensorflow2-lite.pc.in 
${D}${libdir}/pkgconfig/tensorflow2-lite.pc
+    install -m 0644 ${WORKDIR}/sources/tensorflow2-lite.pc.in 
${D}${libdir}/pkgconfig/tensorflow2-lite.pc
     sed -i 's:@version@:${PV}:g
             s:@libdir@:${libdir}:g
             s:@includedir@:${includedir}:g' \
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17259): 
https://lists.yoctoproject.org/g/meta-arago/message/17259
Mute This Topic: https://lists.yoctoproject.org/mt/118158190/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to