Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ZSher1
Novice
4,426 Views

Building yocto with layers - Openjdk 8?

Jump to solution

Hi all,

In my quest to get the ath10k driver on my galileo board, I found that I could enable different configuration options using the Yocto Layers setup. However, before that even matters, I'm trying to build the iot-dev image usinghttps://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... this tutorial. When I get to the part where you use the command "bitbake iot-devkit-prof-dev-image" I get the following output:

NOTE: Resolving any missing task queue dependencies

ERROR: Nothing RPROVIDES 'openjdk-8-jre' (but /home/zach/Documents/netblazr/BSP-old/iotdk/meta-intel-iot-devkit/recipes-core/images/iot-devkit-prof-dev-image.bb RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'openjdk-8-jre' is unbuildable, removing...

Missing or unbuildable dependency chain was: ['openjdk-8-jre']

ERROR: Required build target 'iot-devkit-prof-dev-image' has no buildable providers.

Missing or unbuildable dependency chain was: ['iot-devkit-prof-dev-image', 'openjdk-8-jre']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code

However, I have openjdk 8 installed! It's even set as my default Java. Has anyone else encountered this? Keyword-searching the forums seems to turn up nothing. Any help is appreciated!

Thanks,

Zach

1 Solution
VZhuk3
Beginner
874 Views

Same problem, but I don't have openjdk installed. Searched which commit added openjdk and updated to the previous one:

sh-4.3$ git log |grep -B 4 -A 20 -i jdk

commit 1918d716808e2579fec0027d37d78b7e7933b8bc

Author: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

Date: Fri Sep 11 09:57:51 2015 +0100

iot-devkit-image.bb: Add meta-java and openjdk-8 to images

Signed-off-by: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

 

commit a4b2f647fbe8ad45155002c819e3eb41127ea077

Author: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

Date: Tue Aug 18 17:58:45 2015 +0100

avahi: Fix broken avahi due to wrong file

Signed-off-by: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

sh-4.3$ pwd

/home/builder/iotdk/meta-intel-iot-devkit

sh-4.3$ git checkout a4b2f647fbe8ad45155002c819e3eb41127ea077

View solution in original post

15 Replies
SLema1
Beginner
874 Views

I am having the same problem, i was able to find the Layer for the JDK 7, change the line iot-devkit-prof-dev-image.bb, but i just got stuck with this instead:

ERROR: Nothing PROVIDES 'openjdk-8' (but /home/vagrant/buildOS/iotdk/meta-intel-iot-middleware/recipes-devtools/mraa/mraa_0.8.0.bb, /home/vagrant/buildOS/iotdk/meta-intel-iot-middleware/recipes-devtools/upm/upm_0.4.0.bb DEPENDS on or otherwise requires it). Close matches:

openjdk-7

openjdk-6

openjdk-7-jre

VZhuk3
Beginner
875 Views

Same problem, but I don't have openjdk installed. Searched which commit added openjdk and updated to the previous one:

sh-4.3$ git log |grep -B 4 -A 20 -i jdk

commit 1918d716808e2579fec0027d37d78b7e7933b8bc

Author: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

Date: Fri Sep 11 09:57:51 2015 +0100

iot-devkit-image.bb: Add meta-java and openjdk-8 to images

Signed-off-by: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

 

commit a4b2f647fbe8ad45155002c819e3eb41127ea077

Author: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

Date: Tue Aug 18 17:58:45 2015 +0100

avahi: Fix broken avahi due to wrong file

Signed-off-by: Brendan Le Foll <</span>mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com>

sh-4.3$ pwd

/home/builder/iotdk/meta-intel-iot-devkit

sh-4.3$ git checkout a4b2f647fbe8ad45155002c819e3eb41127ea077

View solution in original post

Matthias_H_Intel
Employee
874 Views

looks like you made the openjdk recipe not visible

Although for Oracle JRE maybe my post can help in some respect: https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-... Some hints on Yocto builds for IoT devkit - example: adding Java JRE | Intel® Developer Zone

Bernard_G_Intel
Employee
874 Views

I felt on the same issue and solved it this way:

  1. Add a new meta layer:
    1. from the Yocto source: git clone --branch master git://git.yoctoproject.org/meta-java
    2. Edit file build/conf/bblayers.conf and add a new line for BBLAYERS variable : "/path/to/iotdk/meta-java" 
  2. sudo apt-get update openjdk-8-jre (or openjdk-7-jre if openjdk-8-jre is not available on your Linux distribution, like for me on Ubuntu 14.04 LTS)
  3. Only if you have openjdk-7, replace in meta-intel-iot-devkit/recipes-core/images/iot-devkit-image.bb "openjdk-8-jre" by "openjdk-7-jre"

https://software.intel.com/en-us/user/781175 Brendan Le Foll (Intel) you may need to update page https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... IoT - Creating a Yocto image for the Intel® Galileo board using split layers | Intel® Developer Zone

Brendan_L_Intel
Employee
874 Views

Use https://github.com/intel-iot-devkit/meta-java GitHub - intel-iot-devkit/meta-java: Fork of meta-java for openjdk8 support (to be upstreamed ASAP) as your meta-java layer

DPose
New Contributor II
874 Views

arfoll Brendan can you be a little more specific about the above? Followed the instructions in the readme as closely as I could and just things much worse. I need a new connman as 1.25 is broke as a soup sandwich and the the guys on # connman laugh me out of the channel when I tell them I'm running it.

My old image that used to build got globbered and when tried to create another I ran into the OP's issue. Can you tell me where I'm going wrong:?

Using your blogpost https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... as a guide I do:

$ git clone --branch dizzy git://git.yoctoproject.org/meta-intel-quark

$ git clone --branch dizzy git://git.yoctoproject.org/meta-intel-iot-middleware

$ git clone --branch dizzy git://git.yoctoproject.org/meta-intel-galileo

$ git clone git://git.yoctoproject.org/meta-intel-iot-devkit

$ git clone --branch dizzy http://github.com/openembedded/meta-openembedded.git http://github.com/openembedded/meta-openembedded.git meta-oe

$ git clone --branch dizzy http://github.com/openembedded/meta-openembedded.git http://github.com/openembedded/meta-openembedded.git meta-oe

$ git clone git://git.yoctoproject.org/meta-java

 

$ source oe-init-build-env

 

# Add these to build/conf/local.conf

 

PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"

PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"

PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"

PREFERRED_VERSION_openjdk-7-jre = "75b13-2.5.4"

PREFERRED_VERSION_icedtea7-native = "2.1.3"

# Add this to build/conf.bblayers.conf

LCONF_VERSION = "6"

 

BBPATH = "${TOPDIR}"

 

BBFILES ?=""

 

BBLAYERS += " \

 

/home/brendan/iotdk/meta \

 

/home/brendan/iotdk/meta-yocto \

 

/home/brendan/iotdk/meta-yocto-bsp \

 

/home/brendan/iotdk/meta-oe/meta-oe \

 

/home/brendan/iotdk/meta-oe/meta-filesystems \

 

/home/brendan/iotdk/meta-intel-quark \

 

/home/brendan/iotdk/meta-intel-galileo \

 

/home/brendan/iotdk/meta-intel-iot-middleware \

 

/home/brendan/iotdk/meta-intel-iot-devkit \

/home/brendan/iotdk/meta-openembedded/meta-oe \

/home/brendan/iotdk/sources/meta-java \"

 

Then just follow the rest of your blog post right?

 

Do I need openjdk-8-jre installed on my build machine?

 

Cause I get this:

 

dallas@Kaylie:~/yocto/iotdk/build$ bitbake iot-devkit-prof-dev-image

ERROR: Traceback (most recent call last):

File "/home/dallas/yocto/iotdk/bitbake/lib/bb/cookerdata.py", line 174, in wrapped

return func(fn, *args)

File "/home/dallas/yocto/iotdk/bitbake/lib/bb/cookerdata.py", line 184, in parse_config_file

return bb.parse.handle(fn, data, include)

File "/home/dallas/yocto/iotdk/bitbake/lib/bb/parse/__init__.py", line 107, in handle

return h['handle'](fn, data, include)

File "/home/dallas/yocto/iotdk/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle

abs_fn = resolve_file(fn, data)

File "/home/dallas/yocto/iotdk/bitbake/lib/bb/parse/__init__.py", line 130, in resolve_file

raise IOError("file %s not found" % fn)

IOError: file /home/dallas/yocto/iotdk/meta-openembedded/meta-oe/conf/layer.conf not found

ERROR: Unable to parse /home/dallas/yocto/iotdk/meta-openembedded/meta-oe/conf/layer.conf: file /home/dallas/yocto/iotdk/meta-openembedded/meta-oe/conf/layer.conf not found

What am I doing wrong?

Dallas

 

Vineeth_U_Intel
Employee
874 Views

@arfoll

Use https://github.com/intel-iot-devkit/meta-java GitHub - intel-iot-devkit/meta-java: Fork of meta-java for openjdk8 support (to be upstreamed ASAP) as your meta-java layer

Do I need to bitbake clean and replace the meta-java ?

becuase without doing that do_configure failed with exit code 1

log:

cannot rm src/mm/bohem-gc/ltmain.sh

Vineeth_U_Intel
Employee
874 Views

@Siderails you suggested to use openjdk-7-jre . .even I am building it on ubuntu 14.04

should we modify build/conf/local.conf by adding

 

PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"

PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"

PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"

PREFERRED_VERSION_openjdk-7-jre = "75b13-2.5.4"

PREFERRED_VERSION_icedtea7-native = "2.1.3"

 

Bernard_G_Intel
Employee
874 Views

You should do a

git clone https://github.com/intel-iot-devkit/meta-java.git https://github.com/intel-iot-devkit/meta-java.git

to get the layer meta-java

Then ,these 2 lines look strange:

/home/brendan/iotdk/meta-openembedded/meta-oe \

/home/brendan/iotdk/sources/meta-java \"

meta-openembedded is in meta-oe folder and is already added as layer in the lines above.

meta-java should be in .../iotdk/meta-java

Anyway, even like this I am still facing some errors (but not your ones).

Bernard_G_Intel
Employee
874 Views

My first comment was indeed not working.

I am now trying with update meta-java layer and I am still facing some errors.

But I would tend to think that it does not matter which java version you have on your pc (but not anyway fully sure). For now I am trying with oracle jdk 8.

Vineeth_U_Intel
Employee
874 Views

xthunderheartx you need to give your home path directory not /home/brendon

DPose
New Contributor II
874 Views

Yep, that is just an artifact of me copying and pasting from Brendan's post to summarized what I did. Pretty sure I changed them appropriately on the build host, but I'll check.

idata
Community Manager
874 Views

As an active & daily community user of the Yocto Project's build tools, I would recommend the solution to doing a 'git checkout' on an earlier commit of the meta-intel-iot-devkit layer rather than cloning and adding the meta-java layer to a Galileo build environment.

Most of the intel(quark) metadata layers for Yocto are not maintained and do not follow the "best practices" of creating a project with Yocto.

The reason I would recommend this, is because the master branch of meta-java is being continuously maintained to work with the latest branches of Yocto. The meta-intel-* layers are not actively maintained and were made to work with the 'dizzy' branch of Yocto. For example, the bitbake package recipe called, rxtx, in the meta-java layer requires a bitbake class file called, remove-libtool.bbclass. This class file does not exist in the dizzy branch of Yocto. Similarly, the openjdk-8-jre bitbake package recipe has been renamed. It is possible that a future commit to meta-java will be incompatible with the meta-intel-* layers, such that, a simple bitbake class or recipe change cannot fix to make it work. The meta-java layer will continue to break the Galileo build environment, until the meta-intel-* layers are maintained and updated to the latest branch of Yocto.

If any Intel moderators are able to contact mailto:brendan.le.foll@intel.com brendan.le.foll@intel.com, I would strongly urge him to revised documentation (https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board... Creating a Yocto image for the Intel® Galileo board using split layers | Intel® Software ) on building Galileio with the Yocto Project, or actively update/maintain the intel(quark) metadata layers, or just lock down a buildable/release version of the metadata layers to build Galileo.

The IoT community looks at Intel for quality work and updated documentation when building projects with Intel hardware. There is some difficulty when using & reading out-of-date material. This can drive users and companies away from using Intel hardware.

Example of good documentation & locking down an Intel product/image with a specific release/version of the Yocto Project.

 

http://iotdk.intel.com/src/3.5/edison/iot-devkit-yp-poky-edison-20160606.zip http://iotdk.intel.com/src/3.5/edison/iot-devkit-yp-poky-edison-20160606.zip

 

http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbsp_ug_331188007.pdf http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edisonbsp_ug_331188007.pdf

Thanks!

Matthias_H_Intel
Employee
874 Views

Maybe try arfoll

idata
Community Manager
874 Views

EricZ89: Good reply.

I jave just spent four days working through the nuances of a Yocto multi-layer build for the Galileo II, and its been very tough - poor/outdated documentation, and the attitudes of some of the "experts" that have replied to other people's postings for help - I have been amazed.

Your point about people turning away from the Galileo - after Intel stamped their name on it - is right on point. I believe I am safe in saying that the Galileo and Galileo 2 ARE NOT "teaching tools" that you can place in the hands of a newbie. From my work with Yocto this week, it seems to me that there was a major update in how Yocto works, somewhere around v2.0 of the project. With this update, all of the existing documentation went out the window, and assembling a "multi-layer bootable image" became a pipe dream. I appreciate someone's notion of writing the Yocto v2.1 "Mega Manual", but really - the Galileo is a major product release, and I still cant find an example document somewhere that shows how to build a Yocto multi-layer bootable image, on either KROGOTH or MORTY, that includes such basics as sshd, ntpd, java, and the developers tools. Does Intel want this product to die?

For exhibit 1: I visit a local MicroCenter store, and amidst all of the various developers platforms, they have only two Galileo kits in the lower left corner of the shelves, discounted half off from what they went for a year ago. And then I read somewhere in all my searching this week that "Brendan L (Intel)" was moved off to some other assignment away from Galileo? This guy was writing the good documentation that made sense - and intel moves him to some other assignment?

I am at a point that if I cant get sshd to work by end of business tomorrow, I will move off to some other platform for testing. This is ridiculous to say the least.

Hint: It would be great is someone from Yocto would publish an end-to-end example of how to build a fully functioning BSP bootable image for 1) Galileo, 2) Galileo 2, and 3) Rasberry that includes the basics: sshd, ftpd, ntpd, java, the appropriate development tools, and a configuration manager, and of course, the drivers for the basic hardware like wireless networking. It has to be a living document as the word "security" is ever present these days...

Please forgive my tone - I am very frustrated that I bought a name brand product, and have run into this much trouble trying to do something as basic as logging in through ssh. I am not asking for a Yocto BSP for some obscure and obsolete hardware like a Nokia Communicator or a Nokia 900, I just want to see the Galileo product work like all of Intel's other products.

Reply