无法让Java在Ostro上运行

时间:2018-01-15 14:41:42

标签: java yocto

我已经从当前的repo构建了一个Ostro镜像,并在14.04的Ubuntu机器上构建了它。我已成功将其安装在具有intel i7-64位架构的目标机器上。根据我的观点,Java应该已经打包了,但是当我在命令行上输入java -version(在目标内部)时,我找不到Java命令。如何克服这一点,我错过了什么。请在这个场景中考虑我一个新手(第一次刷新操作系统)我也不确定如何添加这个问题的帮助需要标签,因为这不是一个问题,我很确定我错过了什么。我需要一个指南来帮助我入门。

这是我的bblayers.conf

# The following layers are available in the combined repository.
# Their recipes are filtered via white-listing in ostro.conf,
# i.e. even if the layer gets added, only explicitly listed recipes
# are enabled. Enable layers here only if they have enabled recipes
# to avoid warnings about empty layers.

# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-efl"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-filesystems"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-gnome"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-gpe"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-initramfs"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-multimedia"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-networking"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-oe"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-perl"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-python"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-ruby"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-systemd"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-webserver"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/meta-xfce"
# OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-openembedded/toolchain-layer"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-java"
OSTRO_LAYERS += "/home/ubuntu/Desktop/ostro-os/meta-soletta"

BBLAYERS ?= "${OSTRO_LAYERS}"

# toaster uses this hint to decide whether it let's the user
# remove a layer from BBLAYERS. All layers which provide something
# that is required to build ostro-image should be listed here.
# We do not really track that, so add all layers also here.
BBLAYERS_NON_REMOVABLE ?= "${OSTRO_LAYERS}"

在下面的答案中添加建议的部分后,我得到:

ERROR: Nothing RPROVIDES 'classpath-tools' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-tools' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-tools']
ERROR: Nothing RPROVIDES 'cacao' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: cacao was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'cacao' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['cacao']
ERROR: Nothing RPROVIDES 'classpath' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: classpath was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'classpath' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath']
ERROR: Nothing RPROVIDES 'jamvm' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
ERROR: jamvm was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)
NOTE: Runtime target 'jamvm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['jamvm']
ERROR: Nothing RPROVIDES 'classpath-examples' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-examples' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-examples']
ERROR: Nothing RPROVIDES 'openjdk-8-vm-jamvm' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'openjdk-8-vm-jamvm' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['openjdk-8-vm-jamvm']
ERROR: Nothing RPROVIDES 'openjdk-8-vm-cacao' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'openjdk-8-vm-cacao' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['openjdk-8-vm-cacao']
ERROR: Nothing RPROVIDES 'shadowopenjdk-8-jre' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'shadowopenjdk-8-jre' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['shadowopenjdk-8-jre']
ERROR: Nothing RPROVIDES 'ostro-image-noswupd'
ERROR: No eligible RPROVIDERs exist for 'ostro-image-noswupd'
NOTE: Runtime target 'ostro-image-noswupd' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['ostro-image-noswupd']
ERROR: Nothing RPROVIDES '\' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target '\' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['\\']
ERROR: Nothing RPROVIDES 'classpath-common' (but /home/ubuntu/Desktop/ostro-os/meta-ostro/recipes-image/images/ostro-image-noswupd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'classpath-common' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['classpath-common']

1 个答案:

答案 0 :(得分:1)

您的rootfs中似乎没有安装java。您必须在build / conf / local.conf中包含以下行才能启用它。

# Possible provider: cacao-initial-native and jamvm-initial-native 
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"

# Possible provider: cacao-native and jamvm-native
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"

# Optional since there is only one provider for now  
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"

您还需要根据您的要求在build / conf / local.conf中添加其中一些图像。这些是可选的。你可以根据你的要求修改它。

IMAGE_INSTALL_append = " openjdk-7-jre \
openjdk-7-vm-jamvm \
openjdk-7-vm-cacao \
classpath \
classpath-common \
classpath-examples \
classpath-tools \
jamvm \
cacao \
"