[yocto] [meta-mingw][PATCH] mingw-libgnurx: fix file conflicting of dev package

2023-11-30 Thread hongxu
1. Both of glibc and mingw-libgnurx's dev package provides
/usr/include/regex.h, and mingw-libgnurx-dev depends on
glibc-dev. So install mingw-libgnurx-dev failed

  root@x86-64:~# rpm -qlp libc6-dev-2.37-r1.0.x86_64.rpm | grep regex.h
  /usr/include/regex.h

  root@x86-64:~# rpm -qlp libgnurx-dev-2.5.1-r0.0.x86_64.rpm |grep regex.h
  /usr/include/regex.h

  root@x86-64:~# rpm-ostree install mingw-libgnurx-dev
  rpm-ostree install: error: Checkout libgnurx-dev-2.5.1-r0.8.x86_64: 
Hardlinking 
0e/39f3fcd99b0db7455336559927b51bb413067abd030785662c3ff9aefa4c22.file to 
regex.h: File exists

Move /usr/include/regex.h of mingw-libgnurx-dev to 
/usr/include/mingw-libgnurx/regex.h

2. Due to autotool is used, drop 
0001-Honor-DESTDIR-variable-during-install.patch
to modify Makefile.in

Signed-off-by: Hongxu Jia 
---
 ...onor-DESTDIR-variable-during-install.patch | 39 ---
 .../0002-Add-autotool-files.patch |  2 +-
 .../mingw-libgnurx/mingw-libgnurx_2.5.1.bb|  1 -
 3 files changed, 1 insertion(+), 41 deletions(-)
 delete mode 100644 
recipes-support/mingw-libgnurx/mingw-libgnurx/0001-Honor-DESTDIR-variable-during-install.patch

diff --git 
a/recipes-support/mingw-libgnurx/mingw-libgnurx/0001-Honor-DESTDIR-variable-during-install.patch
 
b/recipes-support/mingw-libgnurx/mingw-libgnurx/0001-Honor-DESTDIR-variable-during-install.patch
deleted file mode 100644
index ea8d9ed..000
--- 
a/recipes-support/mingw-libgnurx/mingw-libgnurx/0001-Honor-DESTDIR-variable-during-install.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a9b7e07a8ba9c390d9774daae769748a09d409ce Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Sat, 1 May 2021 14:41:21 -0700
-Subject: [PATCH] Honor DESTDIR variable during install
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj 

- Makefile.in | 14 +++---
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 6397bf1..8395d2f 100644
 a/Makefile.in
-+++ b/Makefile.in
-@@ -78,16 +78,16 @@ gnurx.lib: libgnurx-$(DLLVERSION).dll
- install: install-dll @install_dev@
- 
- install-dll:
--  mkdir -p ${bindir}
--  cp -p $(BINDIST_FILES) ${bindir}
-+  mkdir -p $(DESTDIR)${bindir}
-+  cp -p $(BINDIST_FILES) $(DESTDIR)${bindir}
- 
- install-dev:
--  mkdir -p ${includedir} ${libdir}
--  cp -p ${srcdir}/regex.h ${includedir}
--  cp -p $(DEVDIST_FILES) ${libdir}
-+  mkdir -p ${includedir} $(DESTDIR)${libdir}
-+  cp -p ${srcdir}/regex.h $(DESTDIR)${includedir}
-+  cp -p $(DEVDIST_FILES) $(DESTDIR)${libdir}
-   for s in 3 7; do \
--mkdir -p ${mandir}/man$$s; \
--gzip -c ${srcdir}/regex.$$s > ${mandir}/man$$s/regex.$$s.gz; \
-+mkdir -p $(DESTDIR)${mandir}/man$$s; \
-+gzip -c ${srcdir}/regex.$$s > 
$(DESTDIR)${mandir}/man$$s/regex.$$s.gz; \
-   done
- 
- dist:  bindist devdist srcdist
diff --git 
a/recipes-support/mingw-libgnurx/mingw-libgnurx/0002-Add-autotool-files.patch 
b/recipes-support/mingw-libgnurx/mingw-libgnurx/0002-Add-autotool-files.patch
index 1365f24..0194a06 100644
--- 
a/recipes-support/mingw-libgnurx/mingw-libgnurx/0002-Add-autotool-files.patch
+++ 
b/recipes-support/mingw-libgnurx/mingw-libgnurx/0002-Add-autotool-files.patch
@@ -22,7 +22,7 @@ index 000..be0a797
 +lib_LTLIBRARIES = libgnurx.la
 + 
 +libgnurx_la_SOURCES = regex.c
-+libgnurx_la_includedir = $(includedir)
++libgnurx_la_includedir = $(includedir)/mingw-libgnurx
 +libgnurx_la_include_HEADERS = regex.h
 +libgnurx_la_CFLAGS = -I$(top_srcdir)
 +libgnurx_la_LDFLAGS = -no-undefined -version-info 0:0:0 -export-dynamic
diff --git a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb 
b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
index 4547298..436660e 100644
--- a/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
+++ b/recipes-support/mingw-libgnurx/mingw-libgnurx_2.5.1.bb
@@ -4,7 +4,6 @@ LICENSE = "LGPL-2.1-only"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
 
 SRC_URI = 
"http://download.sourceforge.net/mingw/Other/UserContributed/regex/mingw-regex-${PV}/mingw-libgnurx-${PV}-src.tar.gz
 \
-   file://0001-Honor-DESTDIR-variable-during-install.patch \
file://0002-Add-autotool-files.patch \
"
 SRC_URI[sha256sum] = 
"7147b7f806ec3d007843b38e19f42a5b7c65894a57ffc297a76b0dcd5f675d76"
-- 
2.27.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61783): https://lists.yoctoproject.org/g/yocto/message/61783
Mute This Topic: https://lists.yoctoproject.org/mt/102907503/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [meta-tensorflow][PATCH] bazel.bbclass: Fix build with bazel from sstate-cache

2023-07-11 Thread hongxu

On 7/11/23 16:55, Tomasz Dziendzielski wrote:

**
*CAUTION: This email comes from a non Wind River email account!*
Do not click links or open attachments unless you recognize the sender 
and know the content is safe.

Hi Hongxu,
I can see you disabled the uninative back in the bazel-native recipe. 
Can you please provide steps to reproduce the "bazel/bazel.real: 
Input/output error" so we could investigate why it happens? Disabling 
uninative will cause the failure if bazel is taken from sstate-cache.


It is not reproducible always, but be reproducible on specific build 
host, it seems gcc tool chain or libc related I guess


//Hongxu



Best regards,
Tomasz Dziendzielski



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60552): https://lists.yoctoproject.org/g/yocto/message/60552
Mute This Topic: https://lists.yoctoproject.org/mt/98901626/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [meta-tensorflow][PATCH] Update SRC_URI git default protocol

2022-01-23 Thread hongxu
Merged

//Hongxu

On 1/21/22 16:51, Changqing Li wrote:
> From: Changqing Li 
>
> Signed-off-by: Changqing Li 
> ---
>   recipes-framework/tensorflow/keras_2.6.0.bb  | 2 +-
>   recipes-framework/tensorflow/tensorflow-estimator_2.6.bb | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/recipes-framework/tensorflow/keras_2.6.0.bb 
> b/recipes-framework/tensorflow/keras_2.6.0.bb
> index dc1a98d..ebb668d 100644
> --- a/recipes-framework/tensorflow/keras_2.6.0.bb
> +++ b/recipes-framework/tensorflow/keras_2.6.0.bb
> @@ -3,7 +3,7 @@ DESCRIPTION = "TensorFlow Keras is an implementation of the 
> Keras API that\
>   LICENSE = "Apache-2.0"
>   LIC_FILES_CHKSUM = "file://LICENSE;md5=c573baaa40a28002a2d03d3e7e9bc583"
>   
> -SRC_URI = "git://github.com/keras-team/keras.git;branch=r2.6 \
> +SRC_URI = "git://github.com/keras-team/keras.git;branch=r2.6;protocol=https \
>  file://0001-customize-for-yocto.patch \
> "
>   
> diff --git a/recipes-framework/tensorflow/tensorflow-estimator_2.6.bb 
> b/recipes-framework/tensorflow/tensorflow-estimator_2.6.bb
> index 910ca4d..83804af 100644
> --- a/recipes-framework/tensorflow/tensorflow-estimator_2.6.bb
> +++ b/recipes-framework/tensorflow/tensorflow-estimator_2.6.bb
> @@ -3,7 +3,7 @@ learning programming."
>   LICENSE = "Apache-2.0"
>   LIC_FILES_CHKSUM = "file://LICENSE;md5=01e86893010a1b87e69a213faa753ebd"
>   
> -SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r2.6 \
> +SRC_URI = 
> "git://github.com/tensorflow/estimator.git;branch=r2.6;protocol=https \
>  file://0001-customize-for-yocto.patch \
> "
>   SRCREV = "9a6c1260bbb468a013e39cf7d6f5af369cf2db2b"
>
> 
>


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55951): https://lists.yoctoproject.org/g/yocto/message/55951
Mute This Topic: https://lists.yoctoproject.org/mt/88579541/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [meta-tensorflow][PATCH 3/3] tensorflow-lite: add recipe

2022-01-23 Thread hongxu
On 1/14/22 18:19, Julien Stephan wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]
Hi Hongxu

Did you have a chance to take a look at it?


Sorry for replying late, thanks for your contribution, merged

//Hongxu

Best
Julien

Le ven. 24 déc. 2021 à 19:48, Randy MacLeod 
mailto:randy.macl...@windriver.com>> a écrit :
Thanks Stephan.

Hongxu, did you miss this?

../Randy

On 2021-12-21 3:42 a.m., Julien STEPHAN wrote:
> Adding 2.6.1 tensorflow-lite recipe.
> This recipe is directly based on the corresponding 2.6.1 tensorflow
> recipe.
>
> It has been build tested with latest honister and tested on
> several mediatek soc using benchmark_model and label_image (C++ and
> python)
>
> Signed-off-by: Julien STEPHAN 
> mailto:jstep...@baylibre.com>>
> ---
>   
> .../tensorflow/tensorflow-lite_2.6.1.bb<https://urldefense.com/v3/__http://tensorflow-lite_2.6.1.bb__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnaoV9UJIs$>
>| 156 ++
>   1 file changed, 156 insertions(+)
>   create mode 100644 
> recipes-framework/tensorflow/tensorflow-lite_2.6.1.bb<https://urldefense.com/v3/__http://tensorflow-lite_2.6.1.bb__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnaoV9UJIs$>
>
> diff --git 
> a/recipes-framework/tensorflow/tensorflow-lite_2.6.1.bb<https://urldefense.com/v3/__http://tensorflow-lite_2.6.1.bb__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnaoV9UJIs$>
>  
> b/recipes-framework/tensorflow/tensorflow-lite_2.6.1.bb<https://urldefense.com/v3/__http://tensorflow-lite_2.6.1.bb__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnaoV9UJIs$>
> new file mode 100644
> index 000..104e5a3
> --- /dev/null
> +++ 
> b/recipes-framework/tensorflow/tensorflow-lite_2.6.1.bb<https://urldefense.com/v3/__http://tensorflow-lite_2.6.1.bb__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnaoV9UJIs$>
> @@ -0,0 +1,156 @@
> +include tensorflow.inc
> +
> +SRC_URI += " \
> +   file://0001-add-yocto-toolchain-to-support-cross-compiling.patch \
> +   
> file://0001-fix-build-tensorflow-lite-examples-label_image-label.patch \
> +   file://0001-label_image-tweak-default-model-location.patch \
> +   file://0001-label_image.lite-tweak-default-model-location.patch \
> +   file://0001-CheckFeatureOrDie-use-warning-to-avoid-die.patch \
> +   file://0001-support-32-bit-x64-and-arm-for-yocto.patch \
> +   
> file://0001-Revert-set-distinct_host_configuration-false-by-defa.patch \
> +   file://0001-fix-default-Bazel-toolchain-not-work.patch \
> +   file://0001-distutils-is-deprecated-in-Python-3.10-cross.patch \
> +   file://BUILD.in \
> +   file://BUILD.yocto_compiler \
> +   file://cc_config.bzl.tpl \
> +   file://yocto_compiler_configure.bzl \
> +  "
> +
> +SRC_URI += 
> "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz;name=model-inv3<https://urldefense.com/v3/__https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz;name=model-inv3__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnasT5egS_$>"
> +SRC_URI[model-inv3.md5sum] = "a904ddf15593d03c7dd786d552e22d73"
> +SRC_URI[model-inv3.sha256sum] = 
> "7045b72a954af4dce36346f478610acdccbf149168fa25c78e54e32f0c723d6d"
> +
> +SRC_URI += 
> "https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_1.0_224_quant_and_labels.zip;name=model-mobv1<https://urldefense.com/v3/__https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_1.0_224_quant_and_labels.zip;name=model-mobv1__;!!AjveYdw8EvQ!OefygVvkNPmaP3BVhhQxru8NW9j-GvUBIhd_NjvaFiUyqWtLct0UIc5WUzHnahpbuVO2$>"
> +SRC_URI[model-mobv1.md5sum] = "38ac0c626947875bd311ef96c8baab62"
> +SRC_URI[model-mobv1.sha256sum] = 
> "2f8054076cf655e1a73778a49bd8fd0306d32b290b7e576dda9574f00f186c0f"
> +
> +RDEPENDS:${PN} += " \
> +python3 \
> +python3-core \
> +python3-numpy \
> +"
> +
> +export PYTHON_BIN_PATH="${PYTHON}"
> +export PYTHON_LIB_PATH="${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages"
> +
> +export 
> CROSSTOOL_PYTHON_INCLUDE_PATH="${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}"
> +
> +do_configure:append () {
> +if [ ! -e ${CROSSTOOL_PYTHON_INCLUDE_PATH}/pyconfig-target.h ];then
> +mv ${CROSSTOOL_PYTHON_INCLUDE_PATH}/pyconfig.h 
> ${CROSSTOOL_PYTHON_INCLUDE_PATH}/pyconfig-target.h
&g

[yocto] [meta-selinux][PATCH] remove obsolete e2fsprogs bbappend

2021-02-07 Thread hongxu
Since oe-core commit [f51835e022 e2fsprogs: upgrade 1.45.6 -> 1.45.7] applied,
the backport misc_create_inode.c-label_rootfs.patch is not required

The lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch is not used by the recipe,
so also remove it.

Signed-off-by: Hongxu Jia 
---
 .../e2fsprogs/e2fsprogs_%.bbappend|  1 -
 .../e2fsprogs/e2fsprogs_selinux.inc   |  3 --
 ...t2fs-ext2_ext_attr.h-add-xattr-index.patch | 20 -
 .../misc_create_inode.c-label_rootfs.patch| 45 ---
 4 files changed, 69 deletions(-)
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
 delete mode 100644 recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
 delete mode 100644 
recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
 delete mode 100644 
recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch

diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend 
b/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
deleted file mode 100644
index 7719d3b..000
--- a/recipes-devtools/e2fsprogs/e2fsprogs_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'${BPN}_selinux.inc', '', d)}
diff --git a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc 
b/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
deleted file mode 100644
index 9cbb7fe..000
--- a/recipes-devtools/e2fsprogs/e2fsprogs_selinux.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += "file://misc_create_inode.c-label_rootfs.patch"
diff --git 
a/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
 
b/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
deleted file mode 100644
index b87c414..000
--- 
a/recipes-devtools/e2fsprogs/files/lib-ext2fs-ext2_ext_attr.h-add-xattr-index.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Add xattr name index for xattrs with the 'security' prefix. These are defined
-in the ext(2|3|4)/xattr.h in the kernel. We use the EXT2 prefix for consistency
-with e2fslibs naming.
-
-Signed-off-by: Philip Tricca 
-
-Index: e2fsprogs-1.42.9/lib/ext2fs/ext2_ext_attr.h
-===
 e2fsprogs-1.42.9.orig/lib/ext2fs/ext2_ext_attr.h
-+++ e2fsprogs-1.42.9/lib/ext2fs/ext2_ext_attr.h
-@@ -15,6 +15,9 @@
- /* Maximum number of references to one attribute block */
- #define EXT2_EXT_ATTR_REFCOUNT_MAX1024
- 
-+/* Name indexes */
-+#define EXT2_XATTR_INDEX_SECURITY   6
-+
- struct ext2_ext_attr_header {
-   __u32   h_magic;/* magic number for identification */
-   __u32   h_refcount; /* reference count */
diff --git 
a/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch 
b/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch
deleted file mode 100644
index 046e521..000
--- a/recipes-devtools/e2fsprogs/files/misc_create_inode.c-label_rootfs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Philip Tricca 
-To: ty...@mit.edu
-Cc: liezhi.y...@windriver.com
-Date: Sat, 20 Feb 2016 18:58:58 +
-Subject: [PATCH] misc/create_inode.c: Copy xattrs from root directory when 
populating fs.
-
-When copying a file system using the -d option the xattrs from the root
-directory need to be copied before the populate_fs recusion starts.
-
-Signed-off-by: Philip Tricca 
-Signed-off-by: Jeremy Puhlman 
-

- misc/create_inode.c | 8 
- 1 file changed, 8 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index a7b6d348..cfd15922 100644
 a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -979,6 +979,13 @@ errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t 
parent_ino,
-   return retval;
-   }
- 
-+  retval = set_inode_xattr(fs, root, source_dir);
-+  if (retval) {
-+  com_err(__func__, retval,
-+  _("while setting xattrs for \"%s\""), source_dir);
-+  goto out;
-+  }
-+
-   file_info.path_len = 0;
-   file_info.path_max_len = 255;
-   file_info.path = calloc(file_info.path_max_len, 1);
-@@ -987,6 +994,7 @@ errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t 
parent_ino,
-  &file_info, fs_callbacks);
- 
-   free(file_info.path);
-+out:
-   free(hdlinks.hdl);
-   return retval;
- }
--- 
-2.11.1
-
-- 
2.29.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52256): https://lists.yoctoproject.org/g/yocto/message/52256
Mute This Topic: https://lists.yoctoproject.org/mt/80471889/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] Review request 0/25:[meta-tensorflow] upgrade tensorflow 1.13.1 -> 2.4.0.rc4

2020-12-16 Thread hongxu
This series requires to work with two OE patches which I've submitted to 
OE mailing list


//Hongxu

On 12/16/20 9:07 PM, hongxu wrote:

# Build and Run
## 1. Clone away
```
$ mkdir 
$ cd 
$ git clone git://git.yoctoproject.org/meta-tensorflow
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone git://git.openembedded.org/openembedded-core oe-core
$ cd oe-core
$ git clone git://git.openembedded.org/bitbake
```

## 2. Prepare build
```
$ . /oe-core/oe-init-build-env 

# Build qemux86-64 which runqemu supports kvm.
$ echo 'MACHINE = "qemux86-64"' >> conf/local.conf

$ echo 'IMAGE_INSTALL_append = " tensorflow"' >> conf/local.conf

Edit conf/bblayers.conf to include other layers
BBLAYERS ?= " \
 /oe-core/meta \
 /meta-openembedded/meta-python \
 /meta-openembedded/meta-oe \
 /meta-tensorflow \
"
```
## 3. Build image
```
cd 
$ bitbake core-image-minimal
```

## 4. Start qemu with slrip + kvm + 5GB memory:
```
$ runqemu qemux86-64 core-image-minimal slirp kvm qemuparams="-m 5120"
```

## 5. Verify the install
```
root@qemux86-64:~# python3 -c "import tensorflow as 
tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
tf.Tensor(-3304.6208, shape=(), dtype=float32)

## 6. Run tutorial case
### Refer: https://www.tensorflow.org/tutorials
```
root@qemux86-64:~# cat >code-v2.py <
real0m7.178s

user0m6.101s
sys 0m0.893s

root@qemux86-64:~# time label_image.lite

INFO: Loaded model /usr/share/label_image/mobilenet_v1_1.0_224_quant.tflite
INFO: resolved reporter
INFO: invoked
INFO: average time: 213.584 ms
INFO: 0.780392: 653 military uniform
INFO: 0.105882: 907 Windsor tie
INFO: 0.0156863: 458 bow tie
INFO: 0.0117647: 466 bulletproof vest
INFO: 0.00784314: 835 suit

real0m0.233s
user0m0.216s
sys 0m0.012s






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51792): https://lists.yoctoproject.org/g/yocto/message/51792
Mute This Topic: https://lists.yoctoproject.org/mt/78999746/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 25/25] update LIMITATION.md

2020-12-16 Thread hongxu
Target arch only supports 32 bit arm and 32 bit x86, 64 bit arm and
64 bit x86. BSP (MACHINE) incluced in above archs should be supported.

Signed-off-by: Hongxu Jia 
---
 LIMITATION.md | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/LIMITATION.md b/LIMITATION.md
index deda0ad..3c69100 100644
--- a/LIMITATION.md
+++ b/LIMITATION.md
@@ -1,21 +1,19 @@
 # Limitation
 ```
-* Bazel build takes lots of time, since it like bitbake which has own rules
-  and builds everything from scratch. Currently bazel could not reuse Yocto
-  DEPENDS/RDEPENDS.
+* Target arch only supports 32 bit arm and 32 bit x86, 64 bit arm and
+  64 bit x86. BSP (MACHINE) incluced in above archs should be supported.
+
+* Bazel build takes lots of time, it has own rules and builds everything
+  from scratch. Currently bazel could not reuse Yocto DEPENDS/RDEPENDS.
 
 * In order to run tensorflow cases in a reasonable time, although it builds
-  successfully on qemuarm, qemuarm64, qemumips, qemumips64, qemux86 and
-  qemux86-64, only qemux86-64 with kvm for runtime test.
+  successfully on qemuarm, qemuarm64, qemux86 and qemux86-64, only qemux86-64
+  with kvm for runtime test.
 
-* It failed to use pre-build model to do predict/inference on big-endian 
platform
-  (such as qemumips), since upstream does not support big-endian very well
+* It failed to use pre-build model to do predict/inference on big-endian
+  platform, since upstream does not support big-endian very well
   https://github.com/tensorflow/tensorflow/issues/16364
 
-* Do not support 32-bit powerpc (qemuppc) since BoringSSL does not support it.
-  (BoringSSL is a fork of OpenSSL used to implement cryptography and TLS across
-  most of Google's products)
-
 * If host(build system) is not x86_64, please add meta-java to BBLAYERS in
   conf/bblayers.conf (git://git.yoctoproject.org/meta-java)
 ```
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51791): https://lists.yoctoproject.org/g/yocto/message/51791
Mute This Topic: https://lists.yoctoproject.org/mt/78999795/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 23/25] BUILD.md: update quick start for tensorflow 2

2020-12-16 Thread hongxu
Refers begginers of upstream [1] [2]
[1] https://www.tensorflow.org/install/pip
[2] https://www.tensorflow.org/tutorials/quickstart/beginner

Signed-off-by: Hongxu Jia 
---
 BUILD.md | 97 
 1 file changed, 55 insertions(+), 42 deletions(-)

diff --git a/BUILD.md b/BUILD.md
index da5a148..bd0f44a 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -41,75 +41,88 @@ $ runqemu qemux86-64 core-image-minimal slirp kvm 
qemuparams="-m 5120"
 
 ## 5. Verify the install
 ```
-root@qemux86-64:~# python3 -c "import tensorflow as tf; 
tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 
1000])))"
-tf.Tensor(-604.65454, shape=(), dtype=float32)
+root@qemux86-64:~# python3 -c "import tensorflow as 
tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
+tf.Tensor(-3304.6208, shape=(), dtype=float32)
 ```
 
 ## 6. Run tutorial case
 ### Refer: https://www.tensorflow.org/tutorials
 ```
-root@qemux86-64:~# cat >code.py <code-v2.py <https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
-11493376/11490434 [==] - 7s 1us/step
-Instructions for updating:
-Colocations handled automatically by placer.
-Instructions for updating:
-Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - 
keep_prob`.
+root@qemux86-64:~# python3 ./code-v2.py
+2020-12-15 08:16:44.171593: I 
tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR 
optimization passes are enabled (registered 2)
+2020-12-15 08:16:44.184464: I 
tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 
305000 Hz
 Epoch 1/5
-6/6 [==] - 27s 449us/sample - loss: 0.2211 
- acc: 0.9346
+1875/1875 [==] - 14s 7ms/step - loss: 0.4833 - 
accuracy: 0.8595
 Epoch 2/5
-6/6 [==] - 24s 408us/sample - loss: 0.0969 
- acc: 0.9702
+1875/1875 [==] - 13s 7ms/step - loss: 0.1549 - 
accuracy: 0.9558
 Epoch 3/5
-6/6 [==] - 26s 439us/sample - loss: 0.0694 
- acc: 0.9780
+1875/1875 [==] - 13s 7ms/step - loss: 0.1135 - 
accuracy: 0.9651
 Epoch 4/5
-6/6 [==] - 23s 390us/sample - loss: 0.0540 
- acc: 0.9832
+1875/1875 [==] - 13s 7ms/step - loss: 0.0889 - 
accuracy: 0.9729
 Epoch 5/5
-6/6 [==] - 24s 399us/sample - loss: 0.0447 
- acc: 0.9851
-1/1 [==] - 1s 91us/sample - loss: 0.0700 - 
acc: 0.9782
+1875/1875 [==] - 13s 7ms/step - loss: 0.0741 - 
accuracy: 0.9777
+313/313 - 1s - loss: 0.0757 - accuracy: 0.9757
 ```
 ## 7. TensorFlow/TensorFlow Lite C++ Image Recognition Demo
 ```
 root@qemux86-64:~# time label_image
-2019-03-06 06:08:51.076028: I tensorflow/examples/label_image/main.cc:251] 
military uniform (653): 0.834306
-2019-03-06 06:08:51.078221: I tensorflow/examples/label_image/main.cc:251] 
mortarboard (668): 0.0218695
-2019-03-06 06:08:51.080054: I tensorflow/examples/label_image/main.cc:251] 
academic gown (401): 0.010358
-2019-03-06 06:08:51.081943: I tensorflow/examples/label_image/main.cc:251] 
pickelhaube (716): 0.00800814
-2019-03-06 06:08:51.083830: I tensorflow/examples/label_image/main.cc:251] 
bulletproof vest (466): 0.00535084
-real0m 10.50s
-user0m 3.95s
-sys 0m 6.46s
+2020-12-15 08:18:34.853885: I 
tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 
305000 Hz
+2020-12-15 08:18:41.565167: I tensorflow/examples/label_image/main.cc:252] 
military uniform (653): 0.834306
+2020-12-15 08:18:41.567874: I tensorflow/examples/label_image/main.cc:252] 
mortarboard (668): 0.0218696
+2020-12-15 08:18:41.568936: I tensorflow/examples/label_image/main.cc:252] 
academic gown (401): 0.0103581
+2020-12-15 08:18:41.569985: I tensorflow/examples/label_image/main.cc:252] 
pickelhaube (716): 0.00800819
+2020-12-15 08:18:41.571025: I tensorflow/examples/label_image/main.cc:252] 
bulletproof vest (466): 0.00535086
+
+real   0m7.178s
+user   0m6.101s
+sys0m0.893s
+
 root@qemux86-64:~# time label_image.lite
-Loaded model /usr/share/label_image/mobilenet_v1_1.0_224_quant.tflite
-resolved reporter
-invoked
-average time: 1064.8 ms
-0.780392: 653 military uniform
-0.105882: 907 Windsor tie
-0.0156863: 458 bow tie
-0.0117647: 466 bulletproof vest
-0.00784314: 835 suit
-real0m 1.10s
-user0m 1.07s
-sys 0m 0.02s
+INFO: Loaded model /usr/share/label_image/mobilenet_v1_1.0_224_quant.tflite
+INFO: resolved reporter
+INFO: invoked
+INFO: average time: 213.584 ms
+INFO: 0.780392: 653 military uniform
+INFO: 0.105882: 907 Windsor tie
+INFO: 0.0156863: 458 bow tie
+INFO: 0.0117647: 466 bulletproof vest
+INFO: 0.00784314: 835 suit
+
+real   0m0.233s
+user   0m0.216s
+sys0m0.012s
 ```
-- 
2.21.0


-=-=-=-

[yocto] [meta-tensorflow][PATCH 24/25] tensorflow: split sub packages

2020-12-16 Thread hongxu
Split sub packages (libtensorflow-c libtensorflow-framework
label-image label-image-lite python3-tensorflow), then user
chould select the required one rather than install them
as a whole

Signed-off-by: Hongxu Jia 
---
 recipes-framework/tensorflow/tensorflow_2.4.0.bb | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/recipes-framework/tensorflow/tensorflow_2.4.0.bb 
b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
index 49c868e..6c4163e 100644
--- a/recipes-framework/tensorflow/tensorflow_2.4.0.bb
+++ b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
@@ -168,7 +168,20 @@ FILES_${PN}-dev = ""
 INSANE_SKIP_${PN} += "dev-so \
   already-stripped \
  "
-FILES_${PN} += "${libdir}/* ${datadir}/*"
+
+PACKAGE_BEFORE_PN += "libtensorflow-c libtensorflow-framework label-image 
label-image-lite python3-tensorflow"
+
+RDEPENDS_label-image += "libtensorflow-framework"
+RDEPENDS_python3-tensorflow += "libtensorflow-framework"
+RDEPENDS_${PN} += "libtensorflow-c libtensorflow-framework label-image 
label-image-lite python3-tensorflow"
+
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_python3-tensorflow += "${libdir}/* ${datadir}/* ${sbindir}/*"
+FILES_libtensorflow-c = "${libdir}/libtensorflow.so 
${libdir}/libtensorflow_cc.so"
+FILES_libtensorflow-framework = "${libdir}/libtensorflow.so 
${libdir}/libtensorflow_framework.so*"
+FILES_label-image = "${sbindir}/label_image"
+FILES_label-image-lite = "${sbindir}/label_image.lite"
 
 inherit siteinfo unsupportarch
 python __anonymous() {
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51790): https://lists.yoctoproject.org/g/yocto/message/51790
Mute This Topic: https://lists.yoctoproject.org/mt/78999793/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 22/25] bazel-native/bazel.bbclass: support bazel build without limitation

2020-12-16 Thread hongxu
Set BAZEL_JOBS and BAZEL_MEM with empty string to make bazel build without
limitation

Signed-off-by: Hongxu Jia 
---
 classes/bazel.bbclass| 9 -
 recipes-devtools/bazel/bazel-native_3.7.1.bb | 6 +++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index 8a3dadf..f5dc597 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -77,13 +77,20 @@ def bazel_get_flags(d):
 flags += "# From TOOLCHAIN_OPTIONS\n"
 flags += "build --linkopt=%s\n" % i
 
+if d.getVar("BAZEL_JOBS"):
+flags += "# From BAZEL_JOBS\n"
+flags += "build --jobs=%s --local_cpu_resources=%s\n" % 
(d.getVar("BAZEL_JOBS"), d.getVar("BAZEL_JOBS"))
+
+if d.getVar("BAZEL_MEM"):
+flags += "# From BAZEL_MEM\n"
+flags += "build --local_ram_resources=%s\n" % (d.getVar("BAZEL_MEM"))
+
 return flags
 
 bazel_do_configure () {
 cat > "${S}/bazelrc" <<-EOF
 build --verbose_failures
 build --spawn_strategy=standalone --genrule_strategy=standalone
-build --jobs=${BAZEL_JOBS} --local_ram_resources=${BAZEL_MEM} 
--local_cpu_resources=${BAZEL_JOBS}
 test --verbose_failures --verbose_test_summary
 test --spawn_strategy=standalone --genrule_strategy=standalone
 
diff --git a/recipes-devtools/bazel/bazel-native_3.7.1.bb 
b/recipes-devtools/bazel/bazel-native_3.7.1.bb
index 03cff37..4f2e28b 100644
--- a/recipes-devtools/bazel/bazel-native_3.7.1.bb
+++ b/recipes-devtools/bazel/bazel-native_3.7.1.bb
@@ -30,9 +30,9 @@ inherit bazel-base
 EXTRA_BAZEL_ARGS = " \
 --host_javabase=@local_jdk//:jdk \
 --python_path=python3 \
---jobs=${BAZEL_JOBS} \
---local_ram_resources=${BAZEL_MEM} \
---local_cpu_resources=${BAZEL_JOBS} \
+${@oe.utils.conditional("BAZEL_JOBS", "", "", "--jobs=${BAZEL_JOBS}", d )} 
\
+${@oe.utils.conditional("BAZEL_JOBS", "", "", 
"--local_cpu_resources=${BAZEL_JOBS}", d )} \
+${@oe.utils.conditional("BAZEL_MEM", "", "", 
"--local_ram_resources=${BAZEL_MEM}", d )} \
 "
 
 do_compile () {
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51788): https://lists.yoctoproject.org/g/yocto/message/51788
Mute This Topic: https://lists.yoctoproject.org/mt/78999789/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 21/25] add classes/bazel-base.bbclass and imporve classes/bazel-base.bbclass

2020-12-16 Thread hongxu
- Move common config settings to bazel-base.bbclass

- Improve bazel_get_flags to make each flag per line with comments

- Use BAZEL_MEM rather than hardcoded for option --local_ram_resources

- Explicitly remove dir ${BAZEL_DIR} before do_clean

Signed-off-by: Hongxu Jia 
---
 classes/bazel-base.bbclass   | 11 +
 classes/bazel.bbclass| 47 
 recipes-devtools/bazel/bazel-native_3.7.1.bb |  6 +--
 3 files changed, 41 insertions(+), 23 deletions(-)
 create mode 100644 classes/bazel-base.bbclass

diff --git a/classes/bazel-base.bbclass b/classes/bazel-base.bbclass
new file mode 100644
index 000..a067733
--- /dev/null
+++ b/classes/bazel-base.bbclass
@@ -0,0 +1,11 @@
+export JAVA_HOME="${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native"
+
+BAZEL_JOBS ??= "4"
+
+# Memory 4GB
+BAZEL_MEM ??= "4096"
+
+TS_DL_DIR ??= "${DL_DIR}"
+
+CCACHE_DISABLE = "1"
+
diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index 3ace2ba..8a3dadf 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -3,6 +3,8 @@ DEPENDS += "bazel-native \
   "
 DEPENDS_append_class-target = " python3"
 
+inherit bazel-base
+
 BAZEL_DIR ?= "${WORKDIR}/bazel"
 BAZEL_OUTPUTBASE_DIR ?= "${BAZEL_DIR}/output_base"
 export BAZEL_ARGS="--output_user_root=${BAZEL_DIR}/user_root \
@@ -11,8 +13,6 @@ export BAZEL_ARGS="--output_user_root=${BAZEL_DIR}/user_root \
--batch  \
   "
 
-export JAVA_HOME="${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native"
-
 BAZEL ?= "${BAZEL_DIR}/bazel"
 
 do_prepare_recipe_sysroot[postfuncs] += "do_install_bazel"
@@ -26,56 +26,64 @@ do_install_bazel() {
 def bazel_get_flags(d):
 flags = ""
 for i in d.getVar("CC").split()[1:]:
-flags += "--conlyopt=%s --cxxopt=%s --linkopt=%s " % (i, i, i)
+flags += "# From CC\n"
+flags += "build --conlyopt=%s --cxxopt=%s --linkopt=%s\n" % (i, i, i)
 
 for i in d.getVar("CFLAGS").split():
 if i == "-g":
 continue
-flags += "--conlyopt=%s " % i
+flags += "# From CFLAGS\n"
+flags += "build --conlyopt=%s\n" % i
 
 for i in d.getVar("BUILD_CFLAGS").split():
-flags += "--host_conlyopt=%s " % i
+flags += "# From BUILD_CFLAGS\n"
+flags += "build --host_conlyopt=%s\n" % i
 
 for i in d.getVar("CXXFLAGS").split():
 if i == "-g":
 continue
-flags += "--cxxopt=%s " % i
+flags += "# From CXXFLAGS\n"
+flags += "build --cxxopt=%s\n" % i
 
 for i in d.getVar("BUILD_CXXFLAGS").split():
-flags += "--host_cxxopt=%s " % i
+flags += "# From BUILD_CXXFLAGS\n"
+flags += "build --host_cxxopt=%s\n" % i
 
 for i in d.getVar("CPPFLAGS").split():
 if i == "-g":
 continue
-flags += "--conlyopt=%s --cxxopt=%s " % (i, i)
+flags += "# From CPPFLAGS\n"
+flags += "build --conlyopt=%s --cxxopt=%s\n" % (i, i)
 
 for i in d.getVar("BUILD_CPPFLAGS").split():
-flags += "--host_conlyopt=%s --host_cxxopt=%s " % (i, i)
+flags += "# From BUILD_CPPFLAGS\n"
+flags += "build --host_conlyopt=%s --host_cxxopt=%s\n" % (i, i)
 
 for i in d.getVar("LDFLAGS").split():
 if i == "-Wl,--as-needed":
 continue
-flags += "--linkopt=%s " % i
+flags += "# From LDFLAGS\n"
+flags += "build --linkopt=%s\n" % i
 
 for i in d.getVar("BUILD_LDFLAGS").split():
 if i == "-Wl,--as-needed":
 continue
-flags += "--host_linkopt=%s " % i
+flags += "# From BUILD_LDFLAGS\n"
+flags += "build --host_linkopt=%s\n" % i
 
 for i in d.getVar("TOOLCHAIN_OPTIONS").split():
 if i == "-Wl,--as-needed":
 continue
-flags += "--linkopt=%s " % i
+flags += "# From TOOLCHAIN_OPTIONS\n"
+flags += "build --linkopt=%s\n" % i
 
 return flags
 
-TS_DL_DIR ??= "${DL_DIR}"
-BAZEL_JOBS ??= "4"
 bazel_do_configure () {
 cat > "${S}/bazelrc" <<-EOF
 build --verbose_failures
 build --spawn_strategy=standalone --genrule_strategy=standalone
-#build --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
+build --jobs=${BAZEL_JOBS} --local_ram_resources=${BAZEL_MEM} 
--local_cpu_resources=${BAZEL_JOBS}
 test --ve

[yocto] [meta-tensorflow][PATCH 20/25] bazel-native: 3.1.0 -> 3.7.1

2020-12-16 Thread hongxu
Signed-off-by: Hongxu Jia 
---
 ...l-native_3.1.0.bb => bazel-native_3.7.1.bb} |  4 ++--
 ...e-sysroot-dir-to-the-default-Bazel-to.patch | 12 ++--
 .../bazel/files/0001-python3.patch | 18 +-
 3 files changed, 17 insertions(+), 17 deletions(-)
 rename recipes-devtools/bazel/{bazel-native_3.1.0.bb => bazel-native_3.7.1.bb} 
(90%)

diff --git a/recipes-devtools/bazel/bazel-native_3.1.0.bb 
b/recipes-devtools/bazel/bazel-native_3.7.1.bb
similarity index 90%
rename from recipes-devtools/bazel/bazel-native_3.1.0.bb
rename to recipes-devtools/bazel/bazel-native_3.7.1.bb
index 1336da8..a1575d6 100644
--- a/recipes-devtools/bazel/bazel-native_3.1.0.bb
+++ b/recipes-devtools/bazel/bazel-native_3.7.1.bb
@@ -2,8 +2,8 @@ DESCRIPTION = "Bazel build and test tool"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI[md5sum] = "381ca27503c566ce5e489d1ba07d1d25"
-SRC_URI[sha256sum] = 
"d7f40d0cac95a06cea6cb5b7f7769085257caebc3ee84269dd9298da760d5615"
+SRC_URI[md5sum] = "cc255121586e849c4de2483a8a5814b6"
+SRC_URI[sha256sum] = 
"c9244e5905df6b0190113e26082c72d58b56b1b0dec66d076f083ce4089b0307"
 
 SRC_URI = 
"https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${PV}-dist.zip
 \
file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
diff --git 
a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
index b08c65a..7d73eb7 100644
--- 
a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
+++ 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
@@ -1,6 +1,6 @@
-From 707ba08068432262b3d02b29804c00afe7133ff6 Mon Sep 17 00:00:00 2001
+From 34c4dc1a10140addf75d3503d4b9f427303fe212 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Thu, 10 Dec 2020 16:12:51 +0800
+Date: Mon, 14 Dec 2020 16:45:31 +0800
 Subject: [PATCH] add Yocto native sysroot dir to the default Bazel toolchain
 
 While using the default Bazel C++ toolchain to build Yocto native tools
@@ -21,12 +21,12 @@ Signed-off-by: Hongxu Jia 
  1 file changed, 3 insertions(+)
 
 diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
-index 84f5479..e17aa9d 100755
+index d48485b..0d297bf 100755
 --- a/tools/cpp/unix_cc_configure.bzl
 +++ b/tools/cpp/unix_cc_configure.bzl
-@@ -424,6 +424,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, 
overriden_tools):
- ),
- )
+@@ -443,6 +443,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, 
overriden_tools):
+ paths["@bazel_tools//tools/cpp:generate_system_module_map.sh"],
+ ))
  
 +# Customize for Yocto
 +
builtin_include_directories.append(get_env_var(repository_ctx,"YOCTO_NATIVE_SYSROOT",
 "NOT_SET_YOCTO_NATIVE_SYSROOT"))
diff --git a/recipes-devtools/bazel/files/0001-python3.patch 
b/recipes-devtools/bazel/files/0001-python3.patch
index 93eee2d..c14dec7 100644
--- a/recipes-devtools/bazel/files/0001-python3.patch
+++ b/recipes-devtools/bazel/files/0001-python3.patch
@@ -1,6 +1,6 @@
-From e43263d6163f7ba1622b268e93635bf42493f758 Mon Sep 17 00:00:00 2001
+From aa31b751f9b2e5263e4510c8719f29050b8ce0de Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Tue, 8 Dec 2020 11:09:44 +0800
+Date: Mon, 14 Dec 2020 16:43:45 +0800
 Subject: [PATCH] set python3 interpreter
 
 Since many distrobution choose python3, and drop python2,
@@ -20,28 +20,28 @@ Signed-off-by: Hongxu Jia 
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-index 2c0ae4d..ae39cc9 100755
+index 9be9ef3..dec19e5 100755
 --- 
a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
 +++ 
b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-@@ -237,7 +237,7 @@ public class BazelPythonSemantics implements 
PythonSemantics {
+@@ -247,7 +247,7 @@ public class BazelPythonSemantics implements 
PythonSemantics {
  PathFragment shExecutable = ShToolchain.getPathOrError(ruleContext);
  // TODO(#8685): Remove this special-case handling as part of making 
the proper shebang a
  // property of the Python toolchain configuration.
 -String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? 
"python3" : "python";
 +String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? 
"python3" : "python3";
+ // NOTE: keep the following line intact to support nix builds
+ String pythonShebang = &quo

[yocto] [meta-tensorflow][PATCH 18/25] tensorboard: 1.12.2 -> 2.4

2020-12-16 Thread hongxu
Rebase patch to 2.4
- 0001-customize-for-Yocto.patch

Fix projector cannot find module 'd3'

Signed-off-by: Hongxu Jia 
---
 .../0001-customize-for-Yocto.patch| 199 +++---
 ...-projector-fix-cannot-find-module-d3.patch |  34 +++
 ...nsorboard_1.12.2.bb => tensorboard_2.4.bb} |  53 -
 3 files changed, 195 insertions(+), 91 deletions(-)
 create mode 100644 
recipes-framework/tensorflow/tensorboard/0001-projector-fix-cannot-find-module-d3.patch
 rename recipes-framework/tensorflow/{tensorboard_1.12.2.bb => 
tensorboard_2.4.bb} (47%)

diff --git 
a/recipes-framework/tensorflow/tensorboard/0001-customize-for-Yocto.patch 
b/recipes-framework/tensorflow/tensorboard/0001-customize-for-Yocto.patch
index 07d8257..4055e0b 100644
--- a/recipes-framework/tensorflow/tensorboard/0001-customize-for-Yocto.patch
+++ b/recipes-framework/tensorflow/tensorboard/0001-customize-for-Yocto.patch
@@ -1,6 +1,6 @@
-From 03b1ddf5058485ce1c94e6a8dc0762ad3430b6a2 Mon Sep 17 00:00:00 2001
+From 30c3d17327b7b66e082dbb443c9e528bf7aa6ac4 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Thu, 25 Apr 2019 21:13:32 +0800
+Date: Mon, 14 Dec 2020 15:14:25 +0800
 Subject: [PATCH] customize for Yocto
 
 - Remove virtualenv/pip/bdist_wheel calling which Yocto does not support
@@ -11,13 +11,13 @@ Upstream-Status: Inappropriate [oe specific]
 
 Signed-off-by: Hongxu Jia 
 ---
- WORKSPACE|  6 ++
- tensorboard/pip_package/build_pip_package.sh | 31 +++-
- third_party/workspace.bzl|  8 +++
- 3 files changed, 17 insertions(+), 28 deletions(-)
+ WORKSPACE|  6 +++
+ tensorboard/pip_package/build_pip_package.sh | 57 ++--
+ third_party/workspace.bzl|  8 +++
+ 3 files changed, 17 insertions(+), 54 deletions(-)
 
 diff --git a/WORKSPACE b/WORKSPACE
-index 8ab70cc..0c18f6f 100644
+index 86f5feaa..8056cfff 100644
 --- a/WORKSPACE
 +++ b/WORKSPACE
 @@ -1,5 +1,11 @@
@@ -31,102 +31,139 @@ index 8ab70cc..0c18f6f 100644
 +
  load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  
- # Needed as a transitive dependency of rules_webtesting below.
+ http_archive(
 diff --git a/tensorboard/pip_package/build_pip_package.sh 
b/tensorboard/pip_package/build_pip_package.sh
-index 754fa83..969709d 100755
+index ef8df010..085ea608 100755
 --- a/tensorboard/pip_package/build_pip_package.sh
 +++ b/tensorboard/pip_package/build_pip_package.sh
-@@ -23,7 +23,7 @@ else
-   sedi="sed -i"
- fi
- 
--run_smoke_test=1
-+run_smoke_test=0
- while [ "$#" -gt 0 ]; do
-   case "$1" in
- "--no-smoke")
-@@ -71,31 +71,20 @@ from tensorboard.plugins.beholder import Beholder, 
BeholderHook
+@@ -12,7 +12,7 @@
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+-
++set -x
+ usage() {
+   cat </dev/null
--command -v perl >/dev/null
--command -v python2 >/dev/null
--command -v python3 >/dev/null
--command -v virtualenv >/dev/null
- [ -d "${RUNFILES}" ]
+ main() {
+-  if [ $# -ne 1 ]; then
+-usage 2>&1
+-return 1
+-  fi
+-  output="$1"
+-
+   if [ -z "${RUNFILES+set}" ]; then
+ RUNFILES="$(CDPATH="" cd -- "$0.runfiles" && pwd)"
+   fi
+@@ -41,16 +35,12 @@ main() {
+   if [ "$(uname)" = "Darwin" ]; then
+ workdir="$(mktemp -d -t tensorboard-pip)"
+   else
+-workdir="$(mktemp -d -p /tmp -t tensorboard-pip.XX)"
++workdir="${DESTDIR}"
++rm -rf ${workdir} && mkdir -p ${workdir}
+   fi
+   original_wd="${PWD}"
+   cd "${workdir}" || return 2
  
--dest=/tmp/tensorboard
-+dest=${DESTDIR}
- if [ ! -e $dest ]; then
--  mkdir $dest
-+  mkdir -p $dest
- else
-   dest="$(mktemp -d -p /tmp -t tensorboard-pip.XX)"
- fi
- cd "${dest}"
+-  cleanup() {
+-rm -r "${workdir}"
+-  }
+-  trap cleanup EXIT
+-
+   log_file="${workdir}/log"
+   build >"${log_file}" 2>&1
+   exit_code=$?
+@@ -68,20 +58,12 @@ build() (
+ sedi="sed -i"
+   fi
  
- cp -LR "${RUNFILES}/org_tensorflow_tensorboard/tensorboard" .
--mv -f "tensorboard/pip_package/LICENSE" .
--mv -f "tensorboard/pip_package/MANIFEST.in" .
--mv -f "tensorboard/pip_package/README.rst" .
--mv -f "tensorboard/pip_package/setup.cfg" .
--mv -f "tensorboard/pip_package/setup.py" .
- rm -rf tensorboard/pip_package
+-  command -v virtualenv >/dev/null
+   [ -d "${RUNFILES}" ]
  
- rm -f tensorboard/tensorboard  # bazel py_binary sh wrapper
--chmod -x LICENSE   # bazel symlinks

[yocto] [meta-tensorflow][PATCH 19/25] tensorflow: clean up CROSSTOOL.tpl

2020-12-16 Thread hongxu
CROSSTOOL files are no longer supported after Bazel v0.26+

Signed-off-by: Hongxu Jia 
---
 .../tensorflow/files/CROSSTOOL.tpl| 230 --
 .../tensorflow/tensorflow_2.4.0.bb|   3 -
 2 files changed, 233 deletions(-)
 delete mode 100644 recipes-framework/tensorflow/files/CROSSTOOL.tpl

diff --git a/recipes-framework/tensorflow/files/CROSSTOOL.tpl 
b/recipes-framework/tensorflow/files/CROSSTOOL.tpl
deleted file mode 100644
index 753898a..000
--- a/recipes-framework/tensorflow/files/CROSSTOOL.tpl
+++ /dev/null
@@ -1,230 +0,0 @@
-major_version: "local"
-minor_version: ""
-default_target_cpu: "same_as_host"
-
-toolchain {
-  abi_version: "armeabi"
-  abi_libc_version: "armeabi"
-  builtin_sysroot: ""
-  compiler: "compiler"
-  host_system_name: "armeabi"
-  needsPic: true
-  supports_gold_linker: false
-  supports_incremental_linker: false
-  supports_fission: false
-  supports_interface_shared_objects: false
-  supports_normalizing_ar: false
-  supports_start_end_lib: false
-  target_libc: "armeabi"
-  target_cpu: "armeabi"
-  target_system_name: "armeabi"
-  toolchain_identifier: "yocto-linux-gnueabihf"
-
-  tool_path { name: "ar" path:
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-ar"
 }
-  tool_path { name: "compat-ld" path: "/bin/false" }
-  tool_path { name: "cpp" path:   
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-cpp"
 }
-  tool_path { name: "dwp" path:   
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-dwp"
 }
-  tool_path { name: "gcc" path:   
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-gcc"
 }
-  tool_path { name: "gcov" path:  
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-gcov"
 }
-  tool_path { name: "ld" path:
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-ld"
 }
-
-  tool_path { name: "nm" path:
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-nm"
 }
-  tool_path { name: "objcopy" path:   
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-objcopy"
 }
-  tool_path { name: "objdump" path:   
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-objdump"
 }
-  tool_path { name: "strip" path: 
"%%YOCTO_COMPILER_PATH%%/recipe-sysroot-native/usr/bin/%%CT_NAME%%/%%CT_NAME%%-strip"
 }
-
-
-  cxx_builtin_include_directory: "%%YOCTO_COMPILER_PATH%%"
-
-  compiler_flag: "--sysroot=%%YOCTO_COMPILER_PATH%%/recipe-sysroot"
-
-  # The path below must match the one used in
-  # tensorflow/tools/ci_build/pi/build_raspberry_pi.sh.
-  cxx_builtin_include_directory: "/tmp/openblas_install/include/"
-  cxx_flag: "-std=c++11"
-  # The cxx_builtin_include_directory directives don't seem to be adding 
these, so
-  # explicitly set them as flags. There's a query to the Bazel team 
outstanding about
-  # why this is necessary.
-  linker_flag: "-lstdc++"
-
-  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
-  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
-  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
-
-  unfiltered_cxx_flag: "-no-canonical-prefixes"
-  unfiltered_cxx_flag: "-fno-canonical-system-headers"
-
-  # Include target pyconfig.h
-  compiler_flag: "-D_PYTHON_INCLUDE_TARGET"
-
-  compiler_flag: "-U_FORTIFY_SOURCE"
-  compiler_flag: "-D_FORTIFY_SOURCE=1"
-  compiler_flag: "-fstack-protector"
-  compiler_flag: "-DRASPBERRY_PI"  # To differentiate from mobile builds.
-  linker_flag: "-Wl,-z,relro,-z,now"
-
-  linker_flag: "-no-canonical-prefixes"
-  linker_flag: "-pass-exit-codes"
-
-  linker_flag: "-Wl,--build-id=md5"
-
-  compilation_mode_flags {
-mode: DBG
-# Enable debug symbols.
-compiler_flag: "-g"
-  }
-  compilation_mode_flags {
-mode: OPT
-
-# No debug symbols.
-# Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
-# even generally? However, that can't happen here, as it requires special
-# handling in Bazel.
-compiler_flag: "-g0"
-
-# Conservative choice for -O
-# -O3 can increase binary size and even slow down the resulting binaries.
-# Profile first and / or use FDO if you need better performance than this.
-com

[yocto] [meta-tensorflow][PATCH 17/25] python3-pyasn1-modules: add version 0.2.8

2020-12-16 Thread hongxu
It is required by tensorboard

Signed-off-by: Hongxu Jia 
---
 .../python/python3-pyasn1-modules_0.2.8.bb| 22 +++
 1 file changed, 22 insertions(+)
 create mode 100644 recipes-devtools/python/python3-pyasn1-modules_0.2.8.bb

diff --git a/recipes-devtools/python/python3-pyasn1-modules_0.2.8.bb 
b/recipes-devtools/python/python3-pyasn1-modules_0.2.8.bb
new file mode 100644
index 000..fb11941
--- /dev/null
+++ b/recipes-devtools/python/python3-pyasn1-modules_0.2.8.bb
@@ -0,0 +1,22 @@
+SUMMARY = "ASN.1 modules for Python"
+HOMEPAGE = "https://github.com/etingof/pyasn1-modules";
+DESCRIPTION = "The pyasn1-modules package contains a collection of \
+ASN.1 data structures expressed as Python classes based on \
+pyasn1 data model."
+SECTION = "devel/python"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a14482d15c2249de3b6f0e8a47e021fd"
+
+inherit pypi
+
+SRC_URI[md5sum] = ""
+SRC_URI[sha256sum] = ""
+
+RDEPENDS_${PN} += " \
+python3-pyasn1 \
+"
+
+BBCLASSEXTEND = "native"
+
+inherit setuptools3
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51783): https://lists.yoctoproject.org/g/yocto/message/51783
Mute This Topic: https://lists.yoctoproject.org/mt/78999780/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 16/25] python3-pyasn1: add 0.4.8

2020-12-16 Thread hongxu
It is required by tensorboard

Signed-off-by: Hongxu Jia 
---
 recipes-devtools/python/python3-pyasn1_0.4.8.bb | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 recipes-devtools/python/python3-pyasn1_0.4.8.bb

diff --git a/recipes-devtools/python/python3-pyasn1_0.4.8.bb 
b/recipes-devtools/python/python3-pyasn1_0.4.8.bb
new file mode 100644
index 000..7f8b718
--- /dev/null
+++ b/recipes-devtools/python/python3-pyasn1_0.4.8.bb
@@ -0,0 +1,17 @@
+SUMMARY = "ASN.1 library for Python"
+HOMEPAGE = "https://github.com/etingof/pyasn1";
+DESCRIPTION = "This is a free and open source implementation of ASN.1 types \
+and codecs as a Python package"
+SECTION = "devel/python"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=a14482d15c2249de3b6f0e8a47e021fd"
+
+inherit pypi
+
+SRC_URI[md5sum] = "dffae4ff9f997a83324b3f33fe62be54"
+SRC_URI[sha256sum] = 
"aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"
+
+BBCLASSEXTEND = "native"
+
+inherit setuptools3
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51782): https://lists.yoctoproject.org/g/yocto/message/51782
Mute This Topic: https://lists.yoctoproject.org/mt/78999779/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 14/25] python3-google-auth: 1.6.3 -> 1.24.0

2020-12-16 Thread hongxu
Move it from meta-demo to meta-tensorflow which is required by
tensorboard

Signed-off-by: Hongxu Jia 
---
 .../python/python-google-auth.inc  | 10 --
 .../python/python3-google-auth_1.24.0.bb   |  0
 2 files changed, 8 insertions(+), 2 deletions(-)
 rename {meta-demo/recipes-devtools => 
recipes-devtools}/python/python-google-auth.inc (63%)
 rename meta-demo/recipes-devtools/python/python3-google-auth_1.6.3.bb => 
recipes-devtools/python/python3-google-auth_1.24.0.bb (100%)

diff --git a/meta-demo/recipes-devtools/python/python-google-auth.inc 
b/recipes-devtools/python/python-google-auth.inc
similarity index 63%
rename from meta-demo/recipes-devtools/python/python-google-auth.inc
rename to recipes-devtools/python/python-google-auth.inc
index 61e37c0..bfee039 100644
--- a/meta-demo/recipes-devtools/python/python-google-auth.inc
+++ b/recipes-devtools/python/python-google-auth.inc
@@ -9,7 +9,13 @@ LIC_FILES_CHKSUM = 
"file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
 inherit pypi
 
-SRC_URI[md5sum] = "0440718247cc4531422e2a8f4f012e8b"
-SRC_URI[sha256sum] = 
"0f7c6a64927d34c1a474da92cfc59e552a5d3b940d3266606c6a28b72888b9e4"
+SRC_URI[md5sum] = "d1f8a9284283b8db69e84c41b36db501"
+SRC_URI[sha256sum] = 
"0b0e026b412a0ad096e753907559e4bdb180d9ba9f68dd9036164db4fdc4ad2e"
+
+RDEPENDS_${PN} += " \
+python3-cachetools \
+python3-rsa \
+python3-pyasn1-modules \
+"
 
 BBCLASSEXTEND = "native"
diff --git a/meta-demo/recipes-devtools/python/python3-google-auth_1.6.3.bb 
b/recipes-devtools/python/python3-google-auth_1.24.0.bb
similarity index 100%
rename from meta-demo/recipes-devtools/python/python3-google-auth_1.6.3.bb
rename to recipes-devtools/python/python3-google-auth_1.24.0.bb
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51780): https://lists.yoctoproject.org/g/yocto/message/51780
Mute This Topic: https://lists.yoctoproject.org/mt/78999776/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 15/25] python3-google-auth-oauthlib: add version 0.4.2

2020-12-16 Thread hongxu
It is required by tensorboard

Signed-off-by: Hongxu Jia 
---
 .../python3-google-auth-oauthlib_0.4.2.bb | 20 +++
 1 file changed, 20 insertions(+)
 create mode 100644 
recipes-devtools/python/python3-google-auth-oauthlib_0.4.2.bb

diff --git a/recipes-devtools/python/python3-google-auth-oauthlib_0.4.2.bb 
b/recipes-devtools/python/python3-google-auth-oauthlib_0.4.2.bb
new file mode 100644
index 000..09e3900
--- /dev/null
+++ b/recipes-devtools/python/python3-google-auth-oauthlib_0.4.2.bb
@@ -0,0 +1,20 @@
+SUMMARY = "The oauthlib integration for Google Auth"
+HOMEPAGE = "https://github.com/googleapis/google-auth-library-python-oauthlib";
+DESCRIPTION = "This library provides oauthlib integration with google-auth."
+SECTION = "devel/python"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7b7e367c7e1664e6565ee7d1658a"
+
+inherit pypi
+
+SRC_URI[md5sum] = "5d3cb6250dd05fff0b7bc0912a3e8f0a"
+SRC_URI[sha256sum] = 
"65b65bc39ad8cab15039b35e5898455d3d66296d0584d96fe0e79d67d04c51d9"
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN} += " \
+python3-requests-oauthlib \
+python3-oauthlib \
+"
+inherit setuptools3
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51781): https://lists.yoctoproject.org/g/yocto/message/51781
Mute This Topic: https://lists.yoctoproject.org/mt/78999778/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 11/25] tensorflow: update cross compile support

2020-12-16 Thread hongxu
- CROSSTOOL files are no longer supported after Bazel v0.26+,
  so converted over to the new toolchain config format

- Support 32 bit x86 and 64 bit x86 for Yocto

- Support 32 bit arm and 64 bit arm (aarch64) for Yocto

Signed-off-by: Hongxu Jia 
---
 classes/bazel.bbclass |   7 +-
 classes/unsupportarch.bbclass |  13 +-
 ...support-32-bit-x64-and-arm-for-yocto.patch | 129 ++
 recipes-framework/tensorflow/files/BUILD  |  56 ---
 recipes-framework/tensorflow/files/BUILD.in   |  40 ++
 .../tensorflow/files/cc_config.bzl.tpl| 411 ++
 .../files/yocto_compiler_configure.bzl|  26 +-
 ...or_1.13.bb => tensorflow-estimator_2.4.bb} |   0
 .../tensorflow/tensorflow_2.4.0.bb|  21 +-
 9 files changed, 634 insertions(+), 69 deletions(-)
 create mode 100644 
recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch
 delete mode 100644 recipes-framework/tensorflow/files/BUILD
 create mode 100644 recipes-framework/tensorflow/files/BUILD.in
 create mode 100644 recipes-framework/tensorflow/files/cc_config.bzl.tpl
 rename recipes-framework/tensorflow/{tensorflow-estimator_1.13.bb => 
tensorflow-estimator_2.4.bb} (100%)

diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index 2a64156..5a76244 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -75,13 +75,16 @@ bazel_do_configure () {
 cat > "${S}/bazelrc" <<-EOF
 build --verbose_failures
 build --spawn_strategy=standalone --genrule_strategy=standalone
-buuld --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
+build --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
 test --verbose_failures --verbose_test_summary
 test --spawn_strategy=standalone --genrule_strategy=standalone
 
 build --linkopt=-Wl,--no-as-needed
 build --host_linkopt=-Wl,--no-as-needed
 
+build --host_conlyopt=-D_PYTHON_INCLUDE_NATIVE 
--host_cxxopt=-D_PYTHON_INCLUDE_NATIVE
+build --conlyopt=-D_PYTHON_INCLUDE_TARGET --cxxopt=-D_PYTHON_INCLUDE_TARGET
+
 build --strip=never
 
 build --python_path=python3
@@ -108,6 +111,8 @@ EXPORT_FUNCTIONS do_configure
 
 CCACHE_DISABLE = "1"
 
+PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/bazel"
+
 inherit unsupportarch
 
 export 
YOCTO_NATIVE_SYSROOT="${BAZEL_OUTPUTBASE_DIR}/external/yocto_compiler/recipe-sysroot-native"
diff --git a/classes/unsupportarch.bbclass b/classes/unsupportarch.bbclass
index 8aecca3..f169c35 100644
--- a/classes/unsupportarch.bbclass
+++ b/classes/unsupportarch.bbclass
@@ -1,8 +1,11 @@
-UNSUPPORTED_TARGET_ARCH ??= "powerpc"
-UNSUPPORTED_TARGET_ARCH_mipsarchn32_append = " mips64"
+BAZEL_TARGET_CPU ??= ""
+BAZEL_TARGET_CPU_x86 = "x86"
+BAZEL_TARGET_CPU_x86-64 = "k8"
+BAZEL_TARGET_CPU_arm = "arm"
+BAZEL_TARGET_CPU_aarch64 = "aarch64"
 
 python __anonymous() {
-target_arch = d.getVar("TARGET_ARCH")
-if target_arch in d.getVar("UNSUPPORTED_TARGET_ARCH").split():
-raise bb.parse.SkipPackage("TensorFlow does not support Target Arch 
'%s'" % target_arch)
+if not d.getVar("BAZEL_TARGET_CPU"):
+target_arch = d.getVar("TARGET_ARCH")
+raise bb.parse.SkipPackage("BAZEL_TARGET_CPU is not set\nTensorFlow 
does not support Target Arch '%s'" % target_arch)
 }
diff --git 
a/recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch
 
b/recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch
new file mode 100644
index 000..7324136
--- /dev/null
+++ 
b/recipes-framework/tensorflow/files/0001-support-32-bit-x64-and-arm-for-yocto.patch
@@ -0,0 +1,129 @@
+From 52b0c97764b65e4351aa2005217b0827d94b842f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Sat, 12 Dec 2020 21:41:29 +0800
+Subject: [PATCH] support 32 bit x64 and arm for yocto
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ tensorflow/BUILD  |  1 -
+ tensorflow/workspace.bzl  |  1 +
+ .../0001-XNNPACK-support-32-bit-x86.patch | 29 +++
+ third_party/aws/BUILD.bazel   |  6 
+ third_party/aws/aws-c-common.bazel|  9 ++
+ third_party/cpuinfo/BUILD.bazel   |  1 -
+ 6 files changed, 45 insertions(+), 2 deletions(-)
+ create mode 100644 third_party/0001-XNNPACK-support-32-bit-x86.patch
+
+diff --git a/tensorflow/BUILD b/tensorflow/BUILD
+index 85e172afa03..4d2d90cd755 100644
+--- a/tensorflow/BUILD
 b/tensorflow/BUILD
+@@ -86,7 +86,6 @@ config_setting(
+ config_setting(
+ name = "android_x86",
+ values = {
+-"crosstool_top": "//external:android/crosstool",
+ "cpu": "x86",
+ },
+ visi

[yocto] [meta-tensorflow][PATCH 13/25] classes/bazel.bbclass: clean up bazel files before do_clean

2020-12-16 Thread hongxu
Signed-off-by: Hongxu Jia 
---
 classes/bazel.bbclass | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index 5a76244..3ace2ba 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -75,7 +75,7 @@ bazel_do_configure () {
 cat > "${S}/bazelrc" <<-EOF
 build --verbose_failures
 build --spawn_strategy=standalone --genrule_strategy=standalone
-build --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
+#build --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
 test --verbose_failures --verbose_test_summary
 test --spawn_strategy=standalone --genrule_strategy=standalone
 
@@ -116,3 +116,13 @@ PSEUDO_IGNORE_PATHS .= ",${WORKDIR}/bazel"
 inherit unsupportarch
 
 export 
YOCTO_NATIVE_SYSROOT="${BAZEL_OUTPUTBASE_DIR}/external/yocto_compiler/recipe-sysroot-native"
+
+do_clean[prefuncs] += "clean_bazel"
+clean_bazel() {
+if [ -d ${S} ]; then
+cd ${S}
+if [ -e ${BAZEL} ] && [ -e ${S}/bazelrc ]; then
+${BAZEL} clean
+fi
+fi
+}
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51779): https://lists.yoctoproject.org/g/yocto/message/51779
Mute This Topic: https://lists.yoctoproject.org/mt/78999773/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 12/25] tensorflow: fix Multiple shlib providers for libtensorflow_framework.so

2020-12-16 Thread hongxu
|ERROR: tensorflow: Multiple shlib providers for
libtensorflow_framework.so.2: tensorflow, tensorflow (used by files:
tmp-glibc/work/core2-64-wrs-linux/tensorflow/2.4.0-r0/packages-split/
tensorflow/usr/lib64/python3.9/site-packages/tensorflow/python/
_pywrap_tf_session.so)

Remove the duplicate one

Signed-off-by: Hongxu Jia 
---
 recipes-framework/tensorflow/tensorflow_2.4.0.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/recipes-framework/tensorflow/tensorflow_2.4.0.bb 
b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
index ba441a7..af66397 100644
--- a/recipes-framework/tensorflow/tensorflow_2.4.0.bb
+++ b/recipes-framework/tensorflow/tensorflow_2.4.0.bb
@@ -120,8 +120,6 @@ do_install() {
 ${D}${libdir}
 install -m 644 ${S}/bazel-bin/tensorflow/libtensorflow_cc.so \
 ${D}${libdir}
-install -m 644 ${S}/bazel-bin/tensorflow/libtensorflow_framework.so \
-${D}${libdir}
 
 install -d ${D}${sbindir}
 install -m 755 ${S}/bazel-bin/tensorflow/tools/benchmark/benchmark_model \
@@ -165,7 +163,7 @@ do_install() {
 mv $app ${D}${sbindir}
 done
 
-rm -f 
${D}${PYTHON_SITEPACKAGES_DIR}/tensorflow/libtensorflow_framework.so
+mv 
${D}${PYTHON_SITEPACKAGES_DIR}/tensorflow/libtensorflow_framework.so*  
${D}${libdir}
 )
 }
 
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51778): https://lists.yoctoproject.org/g/yocto/message/51778
Mute This Topic: https://lists.yoctoproject.org/mt/78999770/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 10/25] bazel-native/bazel.bbclass: replace deprecated --local_resources

2020-12-16 Thread hongxu
1. Use --local_ram_resources and --local_cpu_resources to replace
deprecated --local_resources

2. Add options to bazel-native build

|ERROR: --local_resources is deprecated. Please use --local_ram_resources 
and/or --local_cpu_resources

Signed-off-by: Hongxu Jia 
---
 classes/bazel.bbclass|  2 +-
 recipes-devtools/bazel/bazel-native_3.1.0.bb | 12 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index b4c2a7f..2a64156 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -75,7 +75,7 @@ bazel_do_configure () {
 cat > "${S}/bazelrc" <<-EOF
 build --verbose_failures
 build --spawn_strategy=standalone --genrule_strategy=standalone
-build --jobs=${BAZEL_JOBS} --local_resources=4096,${BAZEL_JOBS},1.0
+buuld --jobs=${BAZEL_JOBS} --local_ram_resources=4096 
--local_cpu_resources=${BAZEL_JOBS}
 test --verbose_failures --verbose_test_summary
 test --spawn_strategy=standalone --genrule_strategy=standalone
 
diff --git a/recipes-devtools/bazel/bazel-native_3.1.0.bb 
b/recipes-devtools/bazel/bazel-native_3.1.0.bb
index 0555f2f..1336da8 100644
--- a/recipes-devtools/bazel/bazel-native_3.1.0.bb
+++ b/recipes-devtools/bazel/bazel-native_3.1.0.bb
@@ -26,11 +26,21 @@ DEPENDS = "coreutils-native \
 S="${WORKDIR}"
 
 TS_DL_DIR ??= "${DL_DIR}"
+
+BAZEL_JOBS ??= "4"
+EXTRA_BAZEL_ARGS = " \
+--host_javabase=@local_jdk//:jdk \
+--python_path=python3 \
+--jobs=${BAZEL_JOBS} \
+--local_ram_resources=4096 \
+--local_cpu_resources=${BAZEL_JOBS} \
+"
+
 do_compile () {
 export JAVA_HOME="${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native"
 TMPDIR="${TOPDIR}/bazel" \
 VERBOSE=yes \
-EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --python_path=python3" \
+EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS}" \
 ./compile.sh
 }
 
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51776): https://lists.yoctoproject.org/g/yocto/message/51776
Mute This Topic: https://lists.yoctoproject.org/mt/78999767/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 9/25] bazel-native/bazel.bbclass: use default Bazel toolchain to build Yocto native tools

2020-12-16 Thread hongxu
While using the default Bazel C++ toolchain to build Yocto native tools
(bazel build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain),
it failed with `bazel references a path outside of the execution root',

Add Yocto native sysroot dir (YOCTO_NATIVE_SYSROOT) to
builtin_include_directories could fix the issue

If not set YOCTO_NATIVE_SYSROOT, use NOT_SET_YOCTO_NATIVE_SYSROOT
to replace as a warning

Set YOCTO_NATIVE_SYSROOT in bazel.bbclass

Signed-off-by: Hongxu Jia 
---
 classes/bazel.bbclass |  2 +
 recipes-devtools/bazel/bazel-native_3.1.0.bb  |  1 +
 ...-sysroot-dir-to-the-default-Bazel-to.patch | 39 +++
 3 files changed, 42 insertions(+)
 create mode 100644 
recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch

diff --git a/classes/bazel.bbclass b/classes/bazel.bbclass
index 65d2932..b4c2a7f 100644
--- a/classes/bazel.bbclass
+++ b/classes/bazel.bbclass
@@ -109,3 +109,5 @@ EXPORT_FUNCTIONS do_configure
 CCACHE_DISABLE = "1"
 
 inherit unsupportarch
+
+export 
YOCTO_NATIVE_SYSROOT="${BAZEL_OUTPUTBASE_DIR}/external/yocto_compiler/recipe-sysroot-native"
diff --git a/recipes-devtools/bazel/bazel-native_3.1.0.bb 
b/recipes-devtools/bazel/bazel-native_3.1.0.bb
index f3efde1..0555f2f 100644
--- a/recipes-devtools/bazel/bazel-native_3.1.0.bb
+++ b/recipes-devtools/bazel/bazel-native_3.1.0.bb
@@ -9,6 +9,7 @@ SRC_URI = 
"https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${P
file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
file://0001-fix-unzip-command-not-found.patch \
file://0001-python3.patch \
+   
file://0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch \
 "
 
 inherit native python3native
diff --git 
a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
new file mode 100644
index 000..b08c65a
--- /dev/null
+++ 
b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
@@ -0,0 +1,39 @@
+From 707ba08068432262b3d02b29804c00afe7133ff6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Thu, 10 Dec 2020 16:12:51 +0800
+Subject: [PATCH] add Yocto native sysroot dir to the default Bazel toolchain
+
+While using the default Bazel C++ toolchain to build Yocto native tools
+(bazel build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain),
+it failed `bazel references a path outside of the execution root',
+
+Add Yocto native sysroot dir (YOCTO_NATIVE_SYSROOT) to
+builtin_include_directories could fix the issue
+
+If not set YOCTO_NATIVE_SYSROOT, use NOT_SET_YOCTO_NATIVE_SYSROOT
+to replace as a warning
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ tools/cpp/unix_cc_configure.bzl | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
+index 84f5479..e17aa9d 100755
+--- a/tools/cpp/unix_cc_configure.bzl
 b/tools/cpp/unix_cc_configure.bzl
+@@ -424,6 +424,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, 
overriden_tools):
+ ),
+ )
+ 
++# Customize for Yocto
++
builtin_include_directories.append(get_env_var(repository_ctx,"YOCTO_NATIVE_SYSROOT",
 "NOT_SET_YOCTO_NATIVE_SYSROOT"))
++
+ write_builtin_include_directory_paths(repository_ctx, cc, 
builtin_include_directories)
+ repository_ctx.template(
+ "BUILD",
+-- 
+2.18.2
+
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51775): https://lists.yoctoproject.org/g/yocto/message/51775
Mute This Topic: https://lists.yoctoproject.org/mt/78999765/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 8/25] tensorflow-estimator: 1.13 -> 2.4

2020-12-16 Thread hongxu
Signed-off-by: Hongxu Jia 
---
 .../0001-customize-for-yocto.patch| 28 +++
 .../tensorflow/tensorflow-estimator_1.13.bb   | 12 ++--
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 
recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch

diff --git 
a/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch
 
b/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch
new file mode 100644
index 000..e9b66d5
--- /dev/null
+++ 
b/recipes-framework/tensorflow/tensorflow-estimator/0001-customize-for-yocto.patch
@@ -0,0 +1,28 @@
+From a1bcf09a43fc44ad5e04c441ee45cc23d16cf7d2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia 
+Date: Wed, 9 Dec 2020 17:59:01 +0800
+Subject: [PATCH] customize for yocto
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia 
+---
+ tensorflow_estimator/tools/pip_package/build_pip_package.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tensorflow_estimator/tools/pip_package/build_pip_package.sh 
b/tensorflow_estimator/tools/pip_package/build_pip_package.sh
+index d4953a6..e08cd8a 100755
+--- a/tensorflow_estimator/tools/pip_package/build_pip_package.sh
 b/tensorflow_estimator/tools/pip_package/build_pip_package.sh
+@@ -38,7 +38,7 @@ function prepare_src() {
+ 
+   # Verifies all expected files are in pip.
+   # Creates init files in all directory in pip.
+-  python tensorflow_estimator/tools/pip_package/create_pip_helper.py 
--pip-root "${TMPDIR}/tensorflow_estimator/" --bazel-root 
"./tensorflow_estimator"
++  nativepython3 tensorflow_estimator/tools/pip_package/create_pip_helper.py 
--pip-root "${TMPDIR}/tensorflow_estimator/" --bazel-root 
"./tensorflow_estimator"
+ }
+ 
+ function build_wheel() {
+-- 
+2.18.2
+
diff --git a/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb 
b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
index f3a5098..5b2fe5d 100644
--- a/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
+++ b/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
@@ -3,9 +3,10 @@ learning programming."
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=01e86893010a1b87e69a213faa753ebd"
 
-SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r1.13 \
+SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r2.4 \
+   file://0001-customize-for-yocto.patch \
   "
-SRCREV = "340703eed78ba4854862f749ed94f91598826e79"
+SRCREV = "c3e7f2b5bbcc35185ef71797955a28cadce28f60"
 S = "${WORKDIR}/git"
 
 inherit python3native bazel
@@ -19,12 +20,18 @@ DEPENDS += " \
 python3-astor-native \
 python3-gast-native \
 python3-termcolor-native \
+python3-wrapt-native \
+python3-opt-einsum-native \
+python3-astunparse-native \
+flatbuffers-native \
 tensorflow-native \
 "
 
 do_compile () {
 unset CC
 export TMPDIR="${WORKDIR}"
+export PYTHON_BIN_PATH="${PYTHON}"
+
 ${BAZEL} build \
 --subcommands --explain=${T}/explain.log \
 --verbose_explanations --verbose_failures \
@@ -32,7 +39,6 @@ do_compile () {
 --python_path="${PYTHON}" \
 //tensorflow_estimator/tools/pip_package:build_pip_package
 
-PYTHON_BIN_PATH="${PYTHON}" \
 ${S}/bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package \
 ${WORKDIR}/estimator_pip
 }
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51774): https://lists.yoctoproject.org/g/yocto/message/51774
Mute This Topic: https://lists.yoctoproject.org/mt/78999764/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 7/25] python3-astunparse: add 1.6.3

2020-12-16 Thread hongxu
It is required by tensorflow 2.4

Signed-off-by: Hongxu Jia 
---
 recipes-devtools/python/python3-astunparse_1.6.3.bb | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/python/python3-astunparse_1.6.3.bb

diff --git a/recipes-devtools/python/python3-astunparse_1.6.3.bb 
b/recipes-devtools/python/python3-astunparse_1.6.3.bb
new file mode 100644
index 000..c8977b8
--- /dev/null
+++ b/recipes-devtools/python/python3-astunparse_1.6.3.bb
@@ -0,0 +1,12 @@
+SUMMARY = "An AST unparser for Python"
+HOMEPAGE = "https://github.com/simonpercivall/astunparse";
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7a7c771110c28a37480b73d07ad6d2a1"
+
+SRC_URI[md5sum] = "2cea4d8e49beba7684bac890e73d6a40"
+SRC_URI[sha256sum] = 
"5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51773): https://lists.yoctoproject.org/g/yocto/message/51773
Mute This Topic: https://lists.yoctoproject.org/mt/78999763/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 6/25] python3-google-pasta: add 0.2.0

2020-12-16 Thread hongxu
It is required by tensorflow 2.4

Signed-off-by: Hongxu Jia 
---
 .../python/python3-google-pasta_0.2.0.bb | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/python/python3-google-pasta_0.2.0.bb

diff --git a/recipes-devtools/python/python3-google-pasta_0.2.0.bb 
b/recipes-devtools/python/python3-google-pasta_0.2.0.bb
new file mode 100644
index 000..50a363c
--- /dev/null
+++ b/recipes-devtools/python/python3-google-pasta_0.2.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "The AST-based Python refactoring library"
+HOMEPAGE = "https://github.com/google/pasta";
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=a10102394a800f3fa4a3df0934d57bb1"
+
+SRC_URI[md5sum] = "7c218a4a0d84303b9319352040fbfce6"
+SRC_URI[sha256sum] = 
"c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51772): https://lists.yoctoproject.org/g/yocto/message/51772
Mute This Topic: https://lists.yoctoproject.org/mt/78999761/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 5/25] python3-opt-einsum: add 3.3.0

2020-12-16 Thread hongxu
It is required by tensorflow 2.4

Signed-off-by: Hongxu Jia 
---
 .../python/python3-opt-einsum_3.3.0.bb   | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 recipes-devtools/python/python3-opt-einsum_3.3.0.bb

diff --git a/recipes-devtools/python/python3-opt-einsum_3.3.0.bb 
b/recipes-devtools/python/python3-opt-einsum_3.3.0.bb
new file mode 100644
index 000..16f3a6d
--- /dev/null
+++ b/recipes-devtools/python/python3-opt-einsum_3.3.0.bb
@@ -0,0 +1,16 @@
+SUMMARY = "A tensor contraction order optimizer"
+HOMEPAGE = "https://github.com/dgasmith/opt_einsum";
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5ab423c88cf3e69553decf93419f53ac"
+
+SRC_URI[md5sum] = "acf0a3997aab84b4e9a854296cc34971"
+SRC_URI[sha256sum] = 
"59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"
+
+inherit pypi setuptools3
+
+SRCNAME = "opt_einsum"
+PYPI_SRC_URI = 
"https://files.pythonhosted.org/packages/source/o/${PYPI_PACKAGE}/${SRCNAME}-${PV}.tar.gz";
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+BBCLASSEXTEND = "native"
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51771): https://lists.yoctoproject.org/g/yocto/message/51771
Mute This Topic: https://lists.yoctoproject.org/mt/78999758/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 3/25] tensorflow: 1.13.0 -> 2.4.0

2020-12-16 Thread hongxu
Refresh patches to 2.4.0
- 0001-support-musl.patch
- 0001-third_party-eigen_archive-workaround-ice-failure-whi.patch
- 0001-use-local-bazel-to-workaround-bazel-paralle-issue.patch
- 0001-add-yocto-toolchain-to-support-cross-compiling.patch
- 0001-fix-build-tensorflow-lite-examples-label_image-label.patch
- 0001-label_image.lite-tweak-default-model-location.patch

Drop backported patches
- 0001-Fix-TensorFlow-on-Python-3.8-logger-issue.patch
- 0001-Provide-overload-to-cope-with-const-ness-change-of-N.patch
- 0001-Rename-gettid-functions.patch
- 0001-SyntaxError-around-async-keyword-on-Python-3.7.patch
- 0001-fix-compilation-error.patch

Minor change on LICENSE, copy year

Signed-off-by: Hongxu Jia 
---
 ...ensorFlow-on-Python-3.8-logger-issue.patch |  55 
 ...-to-cope-with-const-ness-change-of-N.patch |  52 
 .../files/0001-Rename-gettid-functions.patch  | 125 --
 ...r-around-async-keyword-on-Python-3.7.patch | 116 
 ...toolchain-to-support-cross-compiling.patch |  60 -
 ...flow-lite-examples-label_image-label.patch |  38 +++---
 .../files/0001-fix-compilation-error.patch|  58 
 ...ge.lite-tweak-default-model-location.patch |  21 +--
 .../tensorflow/files/0001-support-musl.patch  |  39 +++---
 ...n_archive-workaround-ice-failure-whi.patch | 121 -
 ...el-to-workaround-bazel-paralle-issue.patch |  24 ++--
 ...e_1.13.0.bb => tensorflow-native_2.4.0.bb} |   0
 recipes-framework/tensorflow/tensorflow.inc   |  11 +-
 ...nsorflow_1.13.0.bb => tensorflow_2.4.0.bb} |   1 +
 14 files changed, 183 insertions(+), 538 deletions(-)
 delete mode 100644 
recipes-framework/tensorflow/files/0001-Fix-TensorFlow-on-Python-3.8-logger-issue.patch
 delete mode 100644 
recipes-framework/tensorflow/files/0001-Provide-overload-to-cope-with-const-ness-change-of-N.patch
 delete mode 100644 
recipes-framework/tensorflow/files/0001-Rename-gettid-functions.patch
 delete mode 100644 
recipes-framework/tensorflow/files/0001-SyntaxError-around-async-keyword-on-Python-3.7.patch
 delete mode 100644 
recipes-framework/tensorflow/files/0001-fix-compilation-error.patch
 rename recipes-framework/tensorflow/{tensorflow-native_1.13.0.bb => 
tensorflow-native_2.4.0.bb} (100%)
 rename recipes-framework/tensorflow/{tensorflow_1.13.0.bb => 
tensorflow_2.4.0.bb} (99%)

diff --git 
a/recipes-framework/tensorflow/files/0001-Fix-TensorFlow-on-Python-3.8-logger-issue.patch
 
b/recipes-framework/tensorflow/files/0001-Fix-TensorFlow-on-Python-3.8-logger-issue.patch
deleted file mode 100644
index 714cfed..000
--- 
a/recipes-framework/tensorflow/files/0001-Fix-TensorFlow-on-Python-3.8-logger-issue.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From db8840ea06bee6c8384d88edba2faa027ed74c02 Mon Sep 17 00:00:00 2001
-From: Yong Tang 
-Date: Sun, 3 Nov 2019 19:52:04 +
-Subject: [PATCH] Fix TensorFlow on Python 3.8 logger issue
-
-This fix tries to address the issue raised in 33799
-where running tensorflow on python 3.8 (Ubuntu 18.04)
-raised the following error:
-```
-TypeError: _logger_find_caller() takes from 0 to 1 positional arguments but 2 
were given
-```
-
-The issue was that findCaller changed in Python 3.8
-
-This PR fixes the issue.
-
-This PR fixes 33799
-
-Signed-off-by: Yong Tang 
-
-Upstream-Status: Backport 
[https://github.com/tensorflow/tensorflow/pull/33953/commits/ea3063c929c69f738bf65bc99dad1159803e772f]
-
-Signed-off-by: Chen Qi 

- tensorflow/python/platform/tf_logging.py | 13 +++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/tensorflow/python/platform/tf_logging.py 
b/tensorflow/python/platform/tf_logging.py
-index 813bcb89be..4862e70e4d 100644
 a/tensorflow/python/platform/tf_logging.py
-+++ b/tensorflow/python/platform/tf_logging.py
-@@ -57,9 +57,18 @@ def _get_caller(offset=3):
- f = f.f_back
-   return None, None
- 
--
- # The definition of `findCaller` changed in Python 3.2
--if _sys.version_info.major >= 3 and _sys.version_info.minor >= 2:
-+if _sys.version_info.major >= 3 and _sys.version_info.minor >= 8:
-+  def _logger_find_caller(stack_info=False, stacklevel=1):  # pylint: 
disable=g-wrong-blank-lines
-+code, frame = _get_caller(4)
-+sinfo = None
-+if stack_info:
-+  sinfo = '\n'.join(_traceback.format_stack())
-+if code:
-+  return (code.co_filename, frame.f_lineno, code.co_name, sinfo)
-+else:
-+  return '(unknown file)', 0, '(unknown function)', sinfo
-+elif _sys.version_info.major >= 3 and _sys.version_info.minor >= 2:
-   def _logger_find_caller(stack_info=False):  # pylint: 
disable=g-wrong-blank-lines
- code, frame = _get_caller(4)
- sinfo = None
--- 
-2.17.1
-
diff --git 
a/recipes-framework/tensorflow/files/0001-Provide-overload-to-cope-with-const-ness-change-of-N.patch
 
b/recipes-framework/tensorflow/files/0001-Provide-overload-to-cope-with-const-ness-change-of-N.patch
deleted file mode 100644
inde

[yocto] [meta-tensorflow][PATCH 4/25] add python3-gast 0.3.3

2020-12-16 Thread hongxu
The tensorflow requires the this version, as newer versions are
incompatible with the rest of the ecosystem [1]

[1] 
https://github.com/tensorflow/tensorflow/commit/710f3c83b4147eb76e748efcc218325c4978726c

Signed-off-by: Hongxu Jia 
---
 recipes-devtools/python/python3-gast_0.3.3.bb | 12 
 1 file changed, 12 insertions(+)
 create mode 100644 recipes-devtools/python/python3-gast_0.3.3.bb

diff --git a/recipes-devtools/python/python3-gast_0.3.3.bb 
b/recipes-devtools/python/python3-gast_0.3.3.bb
new file mode 100644
index 000..da3c477
--- /dev/null
+++ b/recipes-devtools/python/python3-gast_0.3.3.bb
@@ -0,0 +1,12 @@
+SUMMARY = "A generic AST to represent Python3's Abstract Syntax Tree(AST)."
+HOMEPAGE = "https://github.com/serge-sans-paille/gast";
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a3ad9b6802e713fc5e307e1230f1ea90"
+
+SRC_URI[md5sum] = "213b1820f576db14ed4fdf57efbfa67f"
+SRC_URI[sha256sum] = 
"b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51770): https://lists.yoctoproject.org/g/yocto/message/51770
Mute This Topic: https://lists.yoctoproject.org/mt/78999756/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 2/25] bazel-native: 0.21.0 -> 3.1.0

2020-12-16 Thread hongxu
Rebase patches to 3.1.0:
- 0001-HttpDownloader-save-download-tarball-to-distdir.patch
- 0001-fix-unzip-command-not-found.patch
- 0001-python3.patch

Drop backport patch:
- 0001-Rename-gettid-functions.patch

Tweak options according to [1]
[1] 
https://docs.bazel.build/versions/master/install-compile-source.html#bootstrap-unix-bootstrap

Signed-off-by: Hongxu Jia 
---
 ...native_0.21.0.bb => bazel-native_3.1.0.bb} |   7 +-
 ...der-save-download-tarball-to-distdir.patch | 119 ++
 .../files/0001-Rename-gettid-functions.patch  |  65 --
 .../0001-fix-unzip-command-not-found.patch|  20 +--
 .../bazel/files/0001-python3.patch|  32 ++---
 5 files changed, 95 insertions(+), 148 deletions(-)
 rename recipes-devtools/bazel/{bazel-native_0.21.0.bb => 
bazel-native_3.1.0.bb} (77%)
 delete mode 100644 
recipes-devtools/bazel/files/0001-Rename-gettid-functions.patch

diff --git a/recipes-devtools/bazel/bazel-native_0.21.0.bb 
b/recipes-devtools/bazel/bazel-native_3.1.0.bb
similarity index 77%
rename from recipes-devtools/bazel/bazel-native_0.21.0.bb
rename to recipes-devtools/bazel/bazel-native_3.1.0.bb
index f1baa33..f3efde1 100644
--- a/recipes-devtools/bazel/bazel-native_0.21.0.bb
+++ b/recipes-devtools/bazel/bazel-native_3.1.0.bb
@@ -2,12 +2,11 @@ DESCRIPTION = "Bazel build and test tool"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI[md5sum] = "8c8240b178a35c0f3c1bc03017550270"
-SRC_URI[sha256sum] = 
"6ccb831e683179e0cfb351cb11ea297b4db48f9eab987601c038aa0f83037db4"
+SRC_URI[md5sum] = "381ca27503c566ce5e489d1ba07d1d25"
+SRC_URI[sha256sum] = 
"d7f40d0cac95a06cea6cb5b7f7769085257caebc3ee84269dd9298da760d5615"
 
 SRC_URI = 
"https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${PV}-dist.zip
 \
file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
-   file://0001-Rename-gettid-functions.patch \
file://0001-fix-unzip-command-not-found.patch \
file://0001-python3.patch \
 "
@@ -30,7 +29,7 @@ do_compile () {
 export JAVA_HOME="${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native"
 TMPDIR="${TOPDIR}/bazel" \
 VERBOSE=yes \
-EXTRA_BAZEL_ARGS="--distdir=${TS_DL_DIR} --python_path=python3" \
+EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --python_path=python3" \
 ./compile.sh
 }
 
diff --git 
a/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
 
b/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
index 605756a..cdc270d 100644
--- 
a/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
+++ 
b/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
@@ -1,6 +1,6 @@
-From e31a37bc9cb53de5085e885b190652f994209cf6 Mon Sep 17 00:00:00 2001
+From 7225fc4a62a06b654fe7d04a2446a594888a7b8c Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Tue, 23 Apr 2019 05:21:40 -0400
+Date: Tue, 8 Dec 2020 10:58:52 +0800
 Subject: [PATCH] HttpDownloader: save download tarball to distdir
 
 It is helpful for collecting tarball url which supports offline build.
@@ -9,62 +9,75 @@ Upstream-Status: Inappropriate [oe specific]
 
 Signed-off-by: Hongxu Jia 
 ---
- .../repository/downloader/HttpDownloader.java  | 50 ++
- 1 file changed, 32 insertions(+), 18 deletions(-)
+ .../downloader/DownloadManager.java   | 62 ---
+ 1 file changed, 38 insertions(+), 24 deletions(-)
 
-diff --git 
a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
 
b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-index 18d10d2..cf71ac4 100755
 
a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-+++ 
b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-@@ -204,26 +204,29 @@ public class HttpDownloader {
+diff --git 
a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
 
b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
+index a89077e..ccaadb3 100755
+--- 
a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
 
b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
+@@ -152,33 +152,36 @@ public class DownloadManager {
+ } else if (!dir.isDirectory()) {
eventHandler.handle(Event.warn("distdir " + dir + " is not a 
directory"));
  } else {
-   boolean match = false;
--  Path candidate = dir.getRelative(destination.getBaseName());
--  try {
--match = Reposi

[yocto] Review request 0/25:[meta-tensorflow] upgrade tensorflow 1.13.1 -> 2.4.0.rc4

2020-12-16 Thread hongxu
# Build and Run
## 1. Clone away
```
$ mkdir 
$ cd 
$ git clone git://git.yoctoproject.org/meta-tensorflow
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone git://git.openembedded.org/openembedded-core oe-core
$ cd oe-core
$ git clone git://git.openembedded.org/bitbake
```

## 2. Prepare build
```
$ . /oe-core/oe-init-build-env 

# Build qemux86-64 which runqemu supports kvm.
$ echo 'MACHINE = "qemux86-64"' >> conf/local.conf

$ echo 'IMAGE_INSTALL_append = " tensorflow"' >> conf/local.conf

Edit conf/bblayers.conf to include other layers
BBLAYERS ?= " \ 
/oe-core/meta \
/meta-openembedded/meta-python \
/meta-openembedded/meta-oe \
/meta-tensorflow \
"
```
## 3. Build image   
   
``` 
   
cd   
   
$ bitbake core-image-minimal
   
```

## 4. Start qemu with slrip + kvm + 5GB memory:
```
$ runqemu qemux86-64 core-image-minimal slirp kvm qemuparams="-m 5120"
```

## 5. Verify the install
```
root@qemux86-64:~# python3 -c "import tensorflow as 
tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
tf.Tensor(-3304.6208, shape=(), dtype=float32)

## 6. Run tutorial case
### Refer: https://www.tensorflow.org/tutorials
```
root@qemux86-64:~# cat >code-v2.py <
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51766): https://lists.yoctoproject.org/g/yocto/message/51766
Mute This Topic: https://lists.yoctoproject.org/mt/78999746/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-tensorflow][PATCH 1/25] openjdk-8-native: 212b04 -> 275b01

2020-12-16 Thread hongxu
Signed-off-by: Hongxu Jia 
---
 ...njdk-8-native_212b04.bb => openjdk-8-native_275b01.bb} | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename recipes-devtools/openjdk/{openjdk-8-native_212b04.bb => 
openjdk-8-native_275b01.bb} (78%)

diff --git a/recipes-devtools/openjdk/openjdk-8-native_212b04.bb 
b/recipes-devtools/openjdk/openjdk-8-native_275b01.bb
similarity index 78%
rename from recipes-devtools/openjdk/openjdk-8-native_212b04.bb
rename to recipes-devtools/openjdk/openjdk-8-native_275b01.bb
index 788612a..dcc1780 100644
--- a/recipes-devtools/openjdk/openjdk-8-native_212b04.bb
+++ b/recipes-devtools/openjdk/openjdk-8-native_275b01.bb
@@ -3,13 +3,13 @@ builds using source code from OpenJDK project"
 LICENSE = "GPL-2.0-with-classpath-exception"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f"
 
-SRC_URI[md5sum] = "8082ad8dafec378f2a4b24cbfdb4a9a4"
-SRC_URI[sha256sum] = 
"ef6a3050a1c3477a6e13c24d10ab36decad548649a260559d466467401db15de"
+SRC_URI[md5sum] = "52c1f769ab67b58b4300713fb5d46a47"
+SRC_URI[sha256sum] = 
"fccaa6cc14571813dbb427ac08d5acd034782a2654e6090ad4d63e7200011ac4"
 SRC_URI = " \
-
https://github.com/ojdkbuild/contrib_jdk8u-ci/releases/download/jdk8u212-b04/jdk-8u212-ojdkbuild-linux-x64.zip
 \
+
https://github.com/ojdkbuild/contrib_jdk8u-ci/releases/download/jdk8u275-b01/jdk-8u275-ojdkbuild-linux-x64.zip
 \
 "
 
-S = "${WORKDIR}/jdk-8u212-ojdkbuild-linux-x64"
+S = "${WORKDIR}/jdk-8u275-ojdkbuild-linux-x64"
 
 do_patch[noexec] = "1"
 do_configure[noexec] = "1"
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51767): https://lists.yoctoproject.org/g/yocto/message/51767
Mute This Topic: https://lists.yoctoproject.org/mt/78999747/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [yocto] [meta-tensorflow] maintained?

2020-12-14 Thread hongxu

On 12/15/20 5:11 AM, Randy MacLeod wrote:

Add Hongxu.

On 2020-12-14 3:03 p.m., Philip Balister wrote:

On 12/14/20 7:56 AM, Marek Belisko wrote:

Hi,

I'm l;booking for a tensorflow recipe and forum that meta-tensorflow
have support for it (also saw that gatesgarth branch is there) but I
cannot build tensorflow + tensorflow seems to be a bit outdated.


Yes, it is a bit dated.
tf-2.x is out and I think that Hongxu has an uprev
underway but I'm not sure when he'll get to finishing it off.

Hongxu?

The upgrading is almost done, I will send them out for review by the end 
of next week


The new version is 2.4.0 (RC4) which is the newest of upstream

By the way, the build system of tensorflow, bazel will be upgraded to 
3.7.1 which is also the newest of upstream


//Hongxu




Anybody know if this layer is maintained? Thanks.

Searching the layer index for tensorflow shows:

http://layers.openembedded.org/layerindex/branch/master/recipes/?q=tensorflow

So the recipe exists in several layers. Looks like it is time to try and
get everyone to work on together on one layer. I ahve a recipe that
mostly works to build the c library part of torch that needs a home.

Philip



Nice, I think a new layer called something like: meta-ai

would be good to have.

../Randy


BR,

marek










--
# Randy MacLeod
# Wind River Linux




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#51749): https://lists.yoctoproject.org/g/yocto/message/51749
Mute This Topic: https://lists.yoctoproject.org/mt/78949334/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] [meta-security][PATCH] sssd: Avoid nss function conflicts with glibc nss.h

2020-08-10 Thread hongxu
glibc 2.32 will define these varibles [1] which results in conflicts
with these static function names, backport a fix from upstream

[1] 
https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d

Signed-off-by: Hongxu Jia 
---
 ...s-Collision-with-external-nss-symbol.patch | 77 +++
 recipes-security/sssd/sssd_1.16.4.bb  |  1 +
 2 files changed, 78 insertions(+)
 create mode 100644 
recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch

diff --git 
a/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch 
b/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch
new file mode 100644
index 000..9c2bbec
--- /dev/null
+++ 
b/recipes-security/sssd/files/0001-nss-Collision-with-external-nss-symbol.patch
@@ -0,0 +1,77 @@
+From a069e4186a3cb482226005d4bc73c6fb3dd35c79 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20=C5=BDidek?= 
+Date: Thu, 27 Feb 2020 06:50:40 +0100
+Subject: [PATCH] nss: Collision with external nss symbol
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+One of our internal static function names started
+to collide with external nss symbol. Additional
+sss_ suffix was added to avoid the collision.
+
+This is needed to unblock Fedora Rawhide's
+SSSD build.
+
+Reviewed-by: Pavel Březina 
+
+Upstream-Status: Backport [https://github.com/SSSD/sssd.git]
+Signed-off-by: Hongxu Jia 
+---
+ src/responder/nss/nss_cmd.c | 18 ++
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/src/responder/nss/nss_cmd.c b/src/responder/nss/nss_cmd.c
+index 25e663e..a4d4cfc 100644
+--- a/src/responder/nss/nss_cmd.c
 b/src/responder/nss/nss_cmd.c
+@@ -728,11 +728,13 @@ done:
+ talloc_free(cmd_ctx);
+ }
+ 
+-static void nss_setnetgrent_done(struct tevent_req *subreq);
++static void sss_nss_setnetgrent_done(struct tevent_req *subreq);
+ 
+-static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx,
+-   enum cache_req_type type,
+-   nss_protocol_fill_packet_fn fill_fn)
++/* This function's name started to collide with external nss symbol,
++ * so it has additional sss_* prefix unlike other functions here. */
++static errno_t sss_nss_setnetgrent(struct cli_ctx *cli_ctx,
++   enum cache_req_type type,
++   nss_protocol_fill_packet_fn fill_fn)
+ {
+ struct nss_ctx *nss_ctx;
+ struct nss_state_ctx *state_ctx;
+@@ -774,7 +776,7 @@ static errno_t nss_setnetgrent(struct cli_ctx *cli_ctx,
+ goto done;
+ }
+ 
+-tevent_req_set_callback(subreq, nss_setnetgrent_done, cmd_ctx);
++tevent_req_set_callback(subreq, sss_nss_setnetgrent_done, cmd_ctx);
+ 
+ ret = EOK;
+ 
+@@ -787,7 +789,7 @@ done:
+ return EOK;
+ }
+ 
+-static void nss_setnetgrent_done(struct tevent_req *subreq)
++static void sss_nss_setnetgrent_done(struct tevent_req *subreq)
+ {
+ struct nss_cmd_ctx *cmd_ctx;
+ errno_t ret;
+@@ -1037,8 +1039,8 @@ static errno_t nss_cmd_initgroups_ex(struct cli_ctx 
*cli_ctx)
+ 
+ static errno_t nss_cmd_setnetgrent(struct cli_ctx *cli_ctx)
+ {
+-return nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME,
+-   nss_protocol_fill_setnetgrent);
++return sss_nss_setnetgrent(cli_ctx, CACHE_REQ_NETGROUP_BY_NAME,
++   nss_protocol_fill_setnetgrent);
+ }
+ 
+ static errno_t nss_cmd_getnetgrent(struct cli_ctx *cli_ctx)
+-- 
+2.21.0
+
diff --git a/recipes-security/sssd/sssd_1.16.4.bb 
b/recipes-security/sssd/sssd_1.16.4.bb
index 2c3c803..d66c027 100644
--- a/recipes-security/sssd/sssd_1.16.4.bb
+++ b/recipes-security/sssd/sssd_1.16.4.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \
file://sssd.conf \
file://volatiles.99_sssd \
file://fix-ldblibdir.patch \
+   file://0001-nss-Collision-with-external-nss-symbol.patch \
"
 
 SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
-- 
2.21.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#50260): https://lists.yoctoproject.org/g/yocto/message/50260
Mute This Topic: https://lists.yoctoproject.org/mt/76118724/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[yocto] [meta-openssl102-fips][PATCH] openssh bbappend: refresh local patches to 8.1p1

2019-12-20 Thread hongxu
Since upstream oe-core upgraded openssh to 8.1p1,
refresh local patches of fips

Signed-off-by: Hongxu Jia 
---
 .../0001-conditional-enable-fips-mode.patch|  26 +++---
 .../openssh/openssh/0001-openssh-8.0p1-fips.patch  | 100 -
 .../openssh/openssh-6.6p1-ctr-cavstest.patch   |  14 +--
 .../openssh/openssh/openssh-6.7p1-kdf-cavs.patch   |  15 ++--
 4 files changed, 91 insertions(+), 64 deletions(-)

diff --git 
a/recipes-connectivity/openssh/openssh/0001-conditional-enable-fips-mode.patch 
b/recipes-connectivity/openssh/openssh/0001-conditional-enable-fips-mode.patch
index b47e184..705d4be 100644
--- 
a/recipes-connectivity/openssh/openssh/0001-conditional-enable-fips-mode.patch
+++ 
b/recipes-connectivity/openssh/openssh/0001-conditional-enable-fips-mode.patch
@@ -1,6 +1,6 @@
-From ea3e5eceab28ad2c00d438efbcea2be37a1b2969 Mon Sep 17 00:00:00 2001
+From fac114e44c00382af087fec04cd4c2fbd144d759 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Sun, 22 Sep 2019 14:31:51 +0800
+Date: Sat, 21 Dec 2019 13:03:23 +0800
 Subject: [PATCH] conditional enable fips mode
 
 Insert ssh_enable_fips_mode to ssh_malloc_init where each main app will invoke,
@@ -14,10 +14,10 @@ Signed-off-by: Hongxu Jia 
  1 file changed, 24 insertions(+)
 
 diff --git a/xmalloc.c b/xmalloc.c
-index 5cc0310..0218ccd 100644
+index 9cd0127..75d5018 100644
 --- a/xmalloc.c
 +++ b/xmalloc.c
-@@ -23,12 +23,20 @@
+@@ -23,6 +23,10 @@
  #include 
  #include 
  
@@ -28,17 +28,23 @@ index 5cc0310..0218ccd 100644
  #include "xmalloc.h"
  #include "log.h"
  
+@@ -30,11 +34,15 @@
+ char *malloc_options = "S";
+ #endif /* __OpenBSD__ */
+ 
 +void ssh_enable_fips_mode(void);
 +
- void
- ssh_malloc_init(void)
+ void *
+ xmalloc(size_t size)
  {
+   void *ptr;
+ 
 +  ssh_enable_fips_mode();
 +
- #if defined(__OpenBSD__)
-   extern char *malloc_options;
- 
-@@ -116,3 +124,19 @@ xasprintf(char **ret, const char *fmt, ...)
+   if (size == 0)
+   fatal("xmalloc: zero size");
+   ptr = malloc(size);
+@@ -110,3 +118,19 @@ xasprintf(char **ret, const char *fmt, ...)
  
return (i);
  }
diff --git a/recipes-connectivity/openssh/openssh/0001-openssh-8.0p1-fips.patch 
b/recipes-connectivity/openssh/openssh/0001-openssh-8.0p1-fips.patch
index a4b5836..0e35e31 100644
--- a/recipes-connectivity/openssh/openssh/0001-openssh-8.0p1-fips.patch
+++ b/recipes-connectivity/openssh/openssh/0001-openssh-8.0p1-fips.patch
@@ -1,6 +1,6 @@
-From 255e5dcdec36df7222f69b253dfc05be63927ed2 Mon Sep 17 00:00:00 2001
+From 511f5dfb3e22d30a7d573313fa88a063f1d49753 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia 
-Date: Fri, 20 Sep 2019 17:59:00 +0800
+Date: Sat, 21 Dec 2019 11:45:38 +0800
 Subject: [PATCH] openssh 8.0p1 fips
 
 Port openssh-7.7p1-fips.patch from Fedora
@@ -22,18 +22,18 @@ Signed-off-by: Hongxu Jia 
  readconf.c   | 17 +
  sandbox-seccomp-filter.c |  3 +++
  servconf.c   | 19 ++-
- ssh-keygen.c |  6 ++
+ ssh-keygen.c | 17 -
  ssh.c| 16 
  sshconnect2.c| 11 ---
  sshd.c   | 19 +++
  sshkey.c |  4 
- 16 files changed, 176 insertions(+), 30 deletions(-)
+ 16 files changed, 186 insertions(+), 31 deletions(-)
 
 diff --git a/Makefile.in b/Makefile.in
-index 6f001bb..ddd1804 100644
+index adb1977..37aec69 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -170,31 +170,31 @@ libssh.a: $(LIBSSH_OBJS)
+@@ -175,31 +175,31 @@ libssh.a: $(LIBSSH_OBJS)
$(RANLIB) $@
  
  ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
@@ -55,9 +55,9 @@ index 6f001bb..ddd1804 100644
 -  $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh 
-lopenbsd-compat $(LIBS)
 +  $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh 
-lopenbsd-compat -lfipscheck $(LIBS)
  
- ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
--  $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
-+  $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat -lfipscheck 
$(LIBS)
+ ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o sshsig.o
+-  $(LD) -o $@ ssh-keygen.o sshsig.o $(LDFLAGS) -lssh -lopenbsd-compat 
$(LIBS)
++  $(LD) -o $@ ssh-keygen.o sshsig.o $(LDFLAGS) -lssh -lopenbsd-compat 
-lfipscheck $(LIBS)
  
  ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o readconf.o 
uidswap.o compat.o
 -  $(LD) -o $@ ssh-keysign.o readconf.o uidswap.o $(LDFLAGS) -lssh 
-lopenbsd-compat $(LIBS)
@@ -68,10 +68,10 @@ index 6f001bb..ddd1804 100644
  
  ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o
 -  $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh 
$(LIBS)
-+  $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh 
-lfipscheck $(LIBS)
++  $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lf

[yocto] [meta-selinux][PATCH] sysvinit: sync bbappend to 2.96

2019-12-13 Thread hongxu
Since oe-core upgrades sysvinit to 2.96, wildcard its bbappend and
drop the backported patch

Signed-off-by: Hongxu Jia 
---
 .../sysvinit-fix-is_selinux_enabled.patch | 71 ---
 88dsf.bbappend => sysvinit_2.9%.bbappend} |  2 +-
 ...88dsf_selinux.inc => sysvinit_selinux.inc} |  2 -
 3 files changed, 1 insertion(+), 74 deletions(-)
 delete mode 100644 
recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch
 rename recipes-core/sysvinit/{sysvinit_2.88dsf.bbappend => 
sysvinit_2.9%.bbappend} (64%)
 rename recipes-core/sysvinit/{sysvinit-2.88dsf_selinux.inc => 
sysvinit_selinux.inc} (74%)

diff --git a/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch 
b/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch
deleted file mode 100644
index 62703b1..000
--- a/recipes-core/sysvinit/files/sysvinit-fix-is_selinux_enabled.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 0db0276202094c8d902fc93a18eca453b6211f8a Mon Sep 17 00:00:00 2001
-From: Xin Ouyang 
-Date: Thu, 12 Apr 2012 10:48:04 +0800
-Subject: [PATCH] sysvinit: Fix is_selinux_enabled() for libselinux
-
-is_selinux_enabled()!=1 means SELinux is disabled by kernel
-or SELinux is enabled but policy is not loaded.
-Only at this time, /sbin/init program should call
-selinux_init_load_policy() to detect whether SELinux is enabled
-and to load SELinux policy.
-
-This is fixed already in the upstream sysvinit,
-http://svn.savannah.nongnu.org/viewvc/sysvinit/trunk/src/init.c?root=sysvinit&r1=72&r2=90

- src/init.c |   33 +
- 1 files changed, 13 insertions(+), 20 deletions(-)
-
-diff --git a/src/init.c b/src/init.c
-index 27532ad..75ccf25 100644
 a/src/init.c
-+++ b/src/init.c
-@@ -54,10 +54,6 @@
- 
- #ifdef WITH_SELINUX
- #  include 
--#  include 
--#  ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */
--#define MNT_DETACH 2
--#  endif
- #endif
- 
- #ifdef __i386__
-@@ -2869,22 +2865,19 @@ int main(int argc, char **argv)
- 
- #ifdef WITH_SELINUX
-   if (getenv("SELINUX_INIT") == NULL) {
--const int rc = mount("proc", "/proc", "proc", 0, 0);
--if (is_selinux_enabled() > 0) {
--  putenv("SELINUX_INIT=YES");
--  if (rc == 0) umount2("/proc", MNT_DETACH);
--  if (selinux_init_load_policy(&enforce) == 0) {
--execv(myname, argv);
--  } else {
--if (enforce > 0) {
--  /* SELinux in enforcing mode but load_policy failed */
--  /* At this point, we probably can't open /dev/console, so log() 
won't work */
--  fprintf(stderr,"Unable to load SELinux Policy. Machine is in 
enforcing mode. Halting now.\n");
--  exit(1);
--}
--  }
--}
--if (rc == 0) umount2("/proc", MNT_DETACH);
-+  if (is_selinux_enabled() != 1) {
-+  if (selinux_init_load_policy(&enforce) == 0) {
-+  putenv("SELINUX_INIT=YES");
-+  execv(myname, argv);
-+  } else {
-+  if (enforce > 0) {
-+  /* SELinux in enforcing mode but 
load_policy failed */
-+  /* At this point, we probably can't 
open /dev/console, so log() won't work */
-+  fprintf(stderr,"Unable to load SELinux 
Policy. Machine is in enforcing mode. Halting now.\n");
-+  exit(1);
-+  }
-+  }
-+  }
-   }
- #endif  
-   /* Start booting. */
--- 
-1.7.5.4
-
diff --git a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend 
b/recipes-core/sysvinit/sysvinit_2.9%.bbappend
similarity index 64%
rename from recipes-core/sysvinit/sysvinit_2.88dsf.bbappend
rename to recipes-core/sysvinit/sysvinit_2.9%.bbappend
index 9df30b6..4ec2267 100644
--- a/recipes-core/sysvinit/sysvinit_2.88dsf.bbappend
+++ b/recipes-core/sysvinit/sysvinit_2.9%.bbappend
@@ -1 +1 @@
-require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'sysvinit-2.88dsf_selinux.inc', '', d)}
+require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'sysvinit_selinux.inc', '', d)}
diff --git a/recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc 
b/recipes-core/sysvinit/sysvinit_selinux.inc
similarity index 74%
rename from recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc
rename to recipes-core/sysvinit/sysvinit_selinux.inc
index fcfbdb7..2e54330 100644
--- a/recipes-core/sysvinit/sysvinit-2.88dsf_selinux.inc
+++ b/recipes-core/sysvinit/sysvinit_selinux.inc
@@ -2,8 +2,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
 
 B = "${S}"
 
-SRC_U

[yocto] [meta-selinux][PATCH] rename sed_4.2.2.bbappend to sed_4.%.bbappend

2019-12-08 Thread hongxu
Since upstream oe-core [bd40260cba sed: upgrade to 4.7],
renme bbappend to match the new version

Signed-off-by: Hongxu Jia 
---
 recipes-extended/sed/{sed_4.2.2.bbappend => sed_4.%.bbappend} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename recipes-extended/sed/{sed_4.2.2.bbappend => sed_4.%.bbappend} (100%)

diff --git a/recipes-extended/sed/sed_4.2.2.bbappend 
b/recipes-extended/sed/sed_4.%.bbappend
similarity index 100%
rename from recipes-extended/sed/sed_4.2.2.bbappend
rename to recipes-extended/sed/sed_4.%.bbappend
-- 
2.21.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#47595): https://lists.yoctoproject.org/g/yocto/message/47595
Mute This Topic: https://lists.yoctoproject.org/mt/67785147/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-