similarity index 96%
rename from recipes-framework/tensorflow/files/0001-fix-python3-include-directory-not-found.patch
rename to recipes-framework/tensorflow/files/0011-fix-python3-include-directory-not-found.patch
@@ -1,4 +1,4 @@
-From b0df1f017ab730b150dcfe71084620e4edf44504 Mon Sep 17 00:00:00 2001
+From d15265b01f6247e32ee3793e44ac6d0416e63615 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 14 Nov 2022 15:27:41 +0800
Subject: [PATCH] fix python3 include directory not found
similarity index 97%
rename from recipes-framework/tensorflow/files/0011-add-yocto-toolchain-to-support-cross-compiling.patch
rename to recipes-framework/tensorflow/files/0012-add-yocto-toolchain-to-support-cross-compiling.patch
@@ -1,4 +1,4 @@
-From cc522bdebaa28115662d38b655f3b9e8eee28026 Mon Sep 17 00:00:00 2001
+From 8c0c0341c7db90116e970d5920cfcbc8458172d9 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@eng.windriver.com>
Date: Sun, 12 Mar 2023 23:38:01 -0700
Subject: [PATCH] add yocto toolchain to support cross compiling
similarity index 95%
rename from recipes-framework/tensorflow/files/0012-fix-build-tensorflow-lite-examples-label_image-label.patch
rename to recipes-framework/tensorflow/files/0013-fix-build-tensorflow-lite-examples-label_image-label.patch
@@ -1,4 +1,4 @@
-From 0dd71f76f8384c8dec85c31f94df6bdaa9ee665e Mon Sep 17 00:00:00 2001
+From eb54003a69b626e7b46764e817426c5e7e63b95c Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Tue, 17 Aug 2021 16:00:24 +0800
Subject: [PATCH] fix build //tensorflow/lite/examples/label_image:label_image
similarity index 97%
rename from recipes-framework/tensorflow/files/0013-label_image-tweak-default-model-location.patch
rename to recipes-framework/tensorflow/files/0014-label_image-tweak-default-model-location.patch
@@ -1,4 +1,4 @@
-From 4b97089f7c18df8fef47cb4d825d96aa07316d35 Mon Sep 17 00:00:00 2001
+From fc0d23151539eba2beb9a33e8229e99a32453d2a Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 16 May 2022 00:36:00 -0700
Subject: [PATCH] label_image: tweak default model location
similarity index 95%
rename from recipes-framework/tensorflow/files/0014-label_image.lite-tweak-default-model-location.patch
rename to recipes-framework/tensorflow/files/0015-label_image.lite-tweak-default-model-location.patch
@@ -1,4 +1,4 @@
-From 5e6734503d8d5bc56dfe47dd7d5d0ee50aa4832c Mon Sep 17 00:00:00 2001
+From 4b546bb68b8b1c3ebb244bd0e0b4071bb6fc3595 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 9 Dec 2020 09:53:30 +0800
Subject: [PATCH] label_image.lite: tweak default model location
similarity index 95%
rename from recipes-framework/tensorflow/files/0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch
rename to recipes-framework/tensorflow/files/0016-CheckFeatureOrDie-use-warning-to-avoid-die.patch
@@ -1,4 +1,4 @@
-From 6c0e8215f1e476862f42b61b7ee6029d8ba397a4 Mon Sep 17 00:00:00 2001
+From 8d182dd0c99c063b308bcfb26aad662fd38a8264 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 16 May 2022 00:39:33 -0700
Subject: [PATCH] CheckFeatureOrDie: use warning to avoid die
similarity index 98%
rename from recipes-framework/tensorflow/files/0016-support-32-bit-x64-and-arm-for-yocto.patch
rename to recipes-framework/tensorflow/files/0017-support-32-bit-x64-and-arm-for-yocto.patch
@@ -1,4 +1,4 @@
-From 480271c4007031090043db9534a63acd4db997e9 Mon Sep 17 00:00:00 2001
+From 11bc5bdda19d610e2b0f7704fccf3372f27e6e1c Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@eng.windriver.com>
Date: Sun, 12 Mar 2023 23:48:00 -0700
Subject: [PATCH] support 32 bit x64 and arm for yocto
similarity index 93%
rename from recipes-framework/tensorflow/files/0017-Revert-set-distinct_host_configuration-false-by-defa.patch
rename to recipes-framework/tensorflow/files/0018-Revert-set-distinct_host_configuration-false-by-defa.patch
@@ -1,4 +1,4 @@
-From c40feb600abaeba1de7e736a4a4d0de71d798a44 Mon Sep 17 00:00:00 2001
+From 07554cdcd86f1091c8e27090dce6ce3863b68e8f Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 16 May 2022 00:53:00 -0700
Subject: [PATCH] Revert "set --distinct_host_configuration=false by default
similarity index 70%
rename from recipes-framework/tensorflow/files/0018-distutils-is-deprecated-in-Python-3.10-51776.patch
rename to recipes-framework/tensorflow/files/0019-distutils-is-deprecated-in-Python-3.10-51776.patch
@@ -1,4 +1,4 @@
-From 85fada9708cd38c278cc4237feb90d0c94425758 Mon Sep 17 00:00:00 2001
+From f4bdb494b665d13b469b00e4b51e468b30268f1b Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 16 May 2022 01:18:43 -0700
Subject: [PATCH] `distutils` is deprecated in Python 3.10 #51776
@@ -14,14 +14,14 @@ Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
- third_party/py/python_configure.bzl | 19 +------------------
- 1 file changed, 1 insertion(+), 18 deletions(-)
+ third_party/py/python_configure.bzl | 17 +----------------
+ 1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl
-index 300cbfb6c71..e57af9f9dc9 100644
+index 14248233dc1..e57af9f9dc9 100644
--- a/third_party/py/python_configure.bzl
+++ b/third_party/py/python_configure.bzl
-@@ -149,24 +149,7 @@ def _check_python_bin(repository_ctx, python_bin):
+@@ -149,22 +149,7 @@ def _check_python_bin(repository_ctx, python_bin):
def _get_python_include(repository_ctx, python_bin):
"""Gets the python include path."""
@@ -31,11 +31,9 @@ index 300cbfb6c71..e57af9f9dc9 100644
- python_bin,
- "-Wignore",
- "-c",
-- "import importlib; " +
-- "import importlib.util; " +
-- "print(importlib.import_module('distutils.sysconfig').get_python_inc() " +
-- "if importlib.util.find_spec('distutils.sysconfig') " +
-- "else importlib.import_module('sysconfig').get_path('include'))",
+- "from __future__ import print_function;" +
+- "import sysconfig;" +
+- "print(sysconfig.get_path('include'))"
- ],
- error_msg = "Problem getting python include path.",
- error_details = ("Is the Python binary path set up right? " +
similarity index 99%
rename from recipes-framework/tensorflow/files/0019-fix-XNNPACK-build-failure-for-qemuarm.patch
rename to recipes-framework/tensorflow/files/0020-fix-XNNPACK-build-failure-for-qemuarm.patch
@@ -1,4 +1,4 @@
-From 2ace7a16a8033169b7ddb71a79956416644ffa3e Mon Sep 17 00:00:00 2001
+From 78979d043ffc4395b4a311aeef220cc34aac8c8d Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 23 Mar 2023 10:28:04 +0800
Subject: [PATCH] fix XNNPACK build failure for qemuarm
@@ -1,21 +1,21 @@
include tensorflow.inc
SRC_URI += " \
- file://0011-add-yocto-toolchain-to-support-cross-compiling.patch \
- file://0012-fix-build-tensorflow-lite-examples-label_image-label.patch \
- file://0013-label_image-tweak-default-model-location.patch \
- file://0014-label_image.lite-tweak-default-model-location.patch \
- file://0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
- file://0016-support-32-bit-x64-and-arm-for-yocto.patch \
- file://0017-Revert-set-distinct_host_configuration-false-by-defa.patch \
- file://0018-distutils-is-deprecated-in-Python-3.10-51776.patch \
+ file://0012-add-yocto-toolchain-to-support-cross-compiling.patch \
+ file://0013-fix-build-tensorflow-lite-examples-label_image-label.patch \
+ file://0014-label_image-tweak-default-model-location.patch \
+ file://0015-label_image.lite-tweak-default-model-location.patch \
+ file://0016-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
+ file://0017-support-32-bit-x64-and-arm-for-yocto.patch \
+ file://0018-Revert-set-distinct_host_configuration-false-by-defa.patch \
+ file://0019-distutils-is-deprecated-in-Python-3.10-51776.patch \
file://BUILD.in \
file://BUILD.yocto_compiler \
file://cc_config.bzl.tpl \
file://yocto_compiler_configure.bzl \
"
SRC_URI:append:arm = " \
- file://0019-fix-XNNPACK-build-failure-for-qemuarm.patch \
+ file://0020-fix-XNNPACK-build-failure-for-qemuarm.patch \
"
SRC_URI += "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz;name=model-inv3"
@@ -1,9 +1,5 @@
include tensorflow.inc
-SRC_URI += " \
- file://0001-fix-python3-include-directory-not-found.patch \
-"
-
inherit native
export PYTHON_BIN_PATH="${PYTHON}"
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/tensorflow/tensorflow.git;branch=r2.12;protocol=http
file://0008-Fix-failure-while-gcc-7.5.0.patch \
file://0009-fix-compile-error-for-gcc-13.1.patch \
file://0010-fix-compile-failure.patch \
+ file://0011-fix-python3-include-directory-not-found.patch \
"
S = "${WORKDIR}/git"
@@ -1,14 +1,15 @@
include tensorflow.inc
SRC_URI += " \
- file://0011-add-yocto-toolchain-to-support-cross-compiling.patch \
- file://0012-fix-build-tensorflow-lite-examples-label_image-label.patch \
- file://0013-label_image-tweak-default-model-location.patch \
- file://0014-label_image.lite-tweak-default-model-location.patch \
- file://0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
- file://0016-support-32-bit-x64-and-arm-for-yocto.patch \
- file://0017-Revert-set-distinct_host_configuration-false-by-defa.patch \
- file://0018-distutils-is-deprecated-in-Python-3.10-51776.patch \
+ file://0011-fix-python3-include-directory-not-found.patch \
+ file://0012-add-yocto-toolchain-to-support-cross-compiling.patch \
+ file://0013-fix-build-tensorflow-lite-examples-label_image-label.patch \
+ file://0014-label_image-tweak-default-model-location.patch \
+ file://0015-label_image.lite-tweak-default-model-location.patch \
+ file://0016-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
+ file://0017-support-32-bit-x64-and-arm-for-yocto.patch \
+ file://0018-Revert-set-distinct_host_configuration-false-by-defa.patch \
+ file://0019-distutils-is-deprecated-in-Python-3.10-51776.patch \
file://BUILD.in \
file://BUILD.yocto_compiler \
file://cc_config.bzl.tpl \
* move 0001-fix-python3-include-directory-not-found.patch from tensorflow-native to tensorflow.inc as the whole section is later removed for target builds by: 0019-distutils-is-deprecated-in-Python-3.10-51776.patch so we can use single chain of .patch files Signed-off-by: Martin Jansa <martin.jansa@gmail.com> --- ...-python3-include-directory-not-found.patch} | 2 +- ...toolchain-to-support-cross-compiling.patch} | 2 +- ...flow-lite-examples-label_image-label.patch} | 2 +- ...l_image-tweak-default-model-location.patch} | 2 +- ...ge.lite-tweak-default-model-location.patch} | 2 +- ...eatureOrDie-use-warning-to-avoid-die.patch} | 2 +- ...support-32-bit-x64-and-arm-for-yocto.patch} | 2 +- ...nct_host_configuration-false-by-defa.patch} | 2 +- ...s-is-deprecated-in-Python-3.10-51776.patch} | 18 ++++++++---------- ...ix-XNNPACK-build-failure-for-qemuarm.patch} | 2 +- .../tensorflow/tensorflow-lite_2.12.0.bb | 18 +++++++++--------- .../tensorflow/tensorflow-native_2.12.0.bb | 4 ---- recipes-framework/tensorflow/tensorflow.inc | 1 + .../tensorflow/tensorflow_2.12.0.bb | 17 +++++++++-------- 14 files changed, 36 insertions(+), 40 deletions(-) rename recipes-framework/tensorflow/files/{0001-fix-python3-include-directory-not-found.patch => 0011-fix-python3-include-directory-not-found.patch} (96%) rename recipes-framework/tensorflow/files/{0011-add-yocto-toolchain-to-support-cross-compiling.patch => 0012-add-yocto-toolchain-to-support-cross-compiling.patch} (97%) rename recipes-framework/tensorflow/files/{0012-fix-build-tensorflow-lite-examples-label_image-label.patch => 0013-fix-build-tensorflow-lite-examples-label_image-label.patch} (95%) rename recipes-framework/tensorflow/files/{0013-label_image-tweak-default-model-location.patch => 0014-label_image-tweak-default-model-location.patch} (97%) rename recipes-framework/tensorflow/files/{0014-label_image.lite-tweak-default-model-location.patch => 0015-label_image.lite-tweak-default-model-location.patch} (95%) rename recipes-framework/tensorflow/files/{0015-CheckFeatureOrDie-use-warning-to-avoid-die.patch => 0016-CheckFeatureOrDie-use-warning-to-avoid-die.patch} (95%) rename recipes-framework/tensorflow/files/{0016-support-32-bit-x64-and-arm-for-yocto.patch => 0017-support-32-bit-x64-and-arm-for-yocto.patch} (98%) rename recipes-framework/tensorflow/files/{0017-Revert-set-distinct_host_configuration-false-by-defa.patch => 0018-Revert-set-distinct_host_configuration-false-by-defa.patch} (93%) rename recipes-framework/tensorflow/files/{0018-distutils-is-deprecated-in-Python-3.10-51776.patch => 0019-distutils-is-deprecated-in-Python-3.10-51776.patch} (70%) rename recipes-framework/tensorflow/files/{0019-fix-XNNPACK-build-failure-for-qemuarm.patch => 0020-fix-XNNPACK-build-failure-for-qemuarm.patch} (99%)