aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-04-25 15:52:01 +0800
committerHongxu Jia <hongxu.jia@windriver.com>2019-04-25 17:10:55 +0800
commit313805d225515259f88e37d6f47d115bc78481d1 (patch)
tree0c14d8be542c25b633c0d6668409b8625f283015
parent10d34f24e99031e4691bf1527ef0e9bd38174b13 (diff)
downloadmeta-tensorflow-313805d225515259f88e37d6f47d115bc78481d1.tar.gz
meta-tensorflow-313805d225515259f88e37d6f47d115bc78481d1.tar.bz2
meta-tensorflow-313805d225515259f88e37d6f47d115bc78481d1.zip
use pre-build openjdk-8-native 212b04 to replace meta-java
The openjdk-8-native 212b04 is a pre-build binary from ojdkbuild which is a community build using source code from OpenJDK project. [https://github.com/ojdkbuild/ojdkbuild] The reason to use it rather than build from source by meta-java: - The meta-java introduce extra 38 depend recipes to openjdk-8-native, without meta-java could save build time 20%, and will not be broke by meta-java build failure - Only use openjdk-8-native to build bazel-native, and then use bazel-native to build others, any target recipes/packages does not require openjdk-8-native directly The pre-build binary only supports on x86-64, for other hosts, we could add use the one provided by meta-java. What you do is just add layer meta-java to your build. The idea refers meta-renesas-ai: https://github.com/renesas-rz/meta-renesas-ai/blob/master/meta-tensorflow/recipes-devtools/openjdk/openjdk-8-native_151-1.b12.bb Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-rw-r--r--README9
-rw-r--r--conf/layer.conf1
-rw-r--r--recipes-devtools/openjdk/openjdk-8-native_212b04.bb27
3 files changed, 30 insertions, 7 deletions
diff --git a/README b/README
index ed04cc9..44008b0 100644
--- a/README
+++ b/README
@@ -29,10 +29,6 @@ layers: meta-python, meta-oe
branch: master
revision: HEAD
-URI: git://git.yoctoproject.org/meta-java
-branch: master
-revision: HEAD
-
Source code
-----------
https://github.com/hongxu-jia/meta-tensorflow.git
@@ -67,6 +63,9 @@ Limitation
(BoringSSL is a fork of OpenSSL used to implement cryptography and TLS across
most of Google's products)
+- If host is not x86_64, please add meta-java to BBLAYERS in conf/bblayers.conf
+ (git://git.yoctoproject.org/meta-java)
+
Future plan
-----------
- Support offline build which bazel build system fetches archive tarballs
@@ -82,7 +81,6 @@ Build and run
$ mkdir <ts-project>
$ cd <ts-project>
$ git clone git://git.yoctoproject.org/meta-tensorflow
-$ git clone git://git.yoctoproject.org/meta-java
$ git clone git://git.openembedded.org/meta-openembedded
$ git clone git://git.openembedded.org/openembedded-core oe-core
$ cd oe-core
@@ -101,7 +99,6 @@ BBLAYERS ?= " \
<ts-project>/oe-core/meta \
<ts-project>/meta-openembedded/meta-python \
<ts-project>/meta-openembedded/meta-oe \
- <ts-project>/meta-java \
<ts-project>/meta-tensorflow \
"
diff --git a/conf/layer.conf b/conf/layer.conf
index 149b9a3..ac2c31b 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -15,7 +15,6 @@ LAYERSERIES_COMPAT_meta-tensorflow = "warrior"
LAYERDEPENDS_meta-tensorflow = " \
core \
- meta-java \
meta-python \
openembedded-layer \
"
diff --git a/recipes-devtools/openjdk/openjdk-8-native_212b04.bb b/recipes-devtools/openjdk/openjdk-8-native_212b04.bb
new file mode 100644
index 0000000..1527f8d
--- /dev/null
+++ b/recipes-devtools/openjdk/openjdk-8-native_212b04.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Java runtime based upon the OpenJDK Project, the community \
+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 = " \
+ https://github.com/ojdkbuild/contrib_jdk8u-ci/releases/download/jdk8u212-b04/jdk-8u212-ojdkbuild-linux-x64.zip \
+"
+
+S = "${WORKDIR}/jdk-8u212-ojdkbuild-linux-x64"
+do_install () {
+ install -d ${D}${libdir}/jvm/openjdk-8-native
+ cp -rf ${S}/* ${D}${libdir}/jvm/openjdk-8-native
+}
+
+inherit native
+INHIBIT_SYSROOT_STRIP = "1"
+
+python __anonymous() {
+ if d.getVar("BUILD_ARCH") != "x86_64":
+ msg = "\nThe pre-build openjdk-8-native does not support %s host," % d.getVar("BUILD_ARCH")
+ msg += "\nplease use the one in meta-java to replace,"
+ msg += "\nadd meta-java to BBLAYERS in conf/bblayers.conf"
+ raise bb.parse.SkipPackage(msg)
+}