Hi,
I’m building an image from scratch and would like to include java. I just want to make sure that my configuration is fine.
I’m following Toradex tutorial.
But there is no information about 2.6 images , e.g :
repository version known to work with V2.5 images
META_JAVA=0d7ba0ff39a332b0f93c4958370b2c7db9ea0e30
So I´m including the latest from git repository:
META_JAVA=1d820a778c0aa5d1d8bbff9949e77c32a08c8a7b
Added java layer to build/conf/bblayers.conf :
${TOPDIR}/../stuff/meta-java \
Changed local.conf:
#OpenJDK Installation
PREFERRED_PROVIDER_virtual/java-initial = "cacao-initial"
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
IMAGE_INSTALL_append = "openjdk-8-jre \
jamvm \
But at meta-java page it’s suggested to use java-initial-native instead of java-initial
PREFERRED_PROVIDER_virtual/java-initial-native = “cacao-initial-native”
Which one is the right to use?
I saw elsewhere the following options to set. Is it necessary?
#For openjdk7:
PREFERRED_VERSION_openjdk-7-jre = "25b30-2.3.12"
PREFERRED_VERSION_icedtea7-native = "2.1.3"
#Sometimes the following is needed:
#PREFERRED_PROVIDER_openjdk-6-jre = "openjdk-6-jre"
#PREFERRED_PROVIDER_openjdk-7-jre = "openjdk-7-jre"
Regards!
Fabiano
Using sufix “-native”, this produces a recipe that only builds for the build host.
I have a model to use, but when I used was branch dizzy:
PREFERRED_PROVIDER_virtual/java-initial = "cacao-initial"
PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
PREFERRED_VERSION_openjdk-7-jre = "25b30-2.3.12"
PREFERRED_VERSION_icetea7-native = "2.1.3"
–
IMAGE_INSTALL_append = "openjdk-7-jre"
Cleiton Bueno
Blog | Linkedin | B2Open
Thanks Cleiton! I was using the same config as you but I’m trying to update java. Trying to find these “magic” numbers “25b30-2.3.12” or “2.1.3” for newer java versions.
With our current jethro branch I tested build of openjdk-8 using the master branch of meta-java and had a successful build.
[mas@linuxdev build]$ MACHINE=apalis-imx6 bitbake openjdk-8
Loading cache: 100% |######################################################################################| ETA: 00:00:00
Loaded 3255 entries from dependency cache.
Parsing recipes: 100% |####################################################################################| Time: 00:00:02
Parsing of 2628 .bb files complete (2626 cached, 2 parsed). 3256 targets, 182 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for make-native (make-native, remake-native)
NOTE: consider defining a PREFERRED_PROVIDER entry to match make-native
Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Fedora-23"
TARGET_SYS = "arm-angstrom-linux-gnueabi"
MACHINE = "apalis-imx6"
DISTRO = "angstrom"
DISTRO_VERSION = "v2015.12"
TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU = "vfp-neon"
meta-angstrom = "HEAD:85ac035eabb11d57467c58c18d9e5627a1f6fc9e"
meta-toradex = "v2.6-next:82ceaa988ebcdb6d09e9af4c6c5f341cbda4326e"
meta-linaro-toolchain = "HEAD:12993e6bc8658ee37d303d8d59007f8dd9ab2b30"
meta-oe
meta-efl
meta-gpe
meta-gnome
meta-xfce
meta-initramfs
meta-systemd
meta-networking
meta-multimedia
meta-python
meta-webserver = "HEAD:c305ac5d2f5285d5eec8952a4ca7f3b4f89aed96"
meta-java = "master:33ddb28a6428b02ddcc82d1954ecf27cd426fbb5"
meta-lxde = "HEAD:70bdda0a9d432d14dc5b858a168a33ac66695123"
meta-browser = "HEAD:e114d625d4bd23a52cc1108a45d96ffd8dc0ab7f"
meta-fsl-arm = "HEAD:aa2a6cee58743ca9f437ce3d552504d32519c8f1"
meta-fsl-arm-extra = "HEAD:7b1b30a2c8159b56103660903cd513bc1009cc21"
meta-fsl-demos = "HEAD:8bffde8d803dd2362fbded79781ce084d723b048"
meta-qt5 = "HEAD:9bfcf79fcd824efb9f2a9bd72ecbedfee1315c96"
meta-mono = "master:05824065bd5439e334b38236822e4be1743dd19c"
meta = "HEAD:4d879cb8d7384ac4a96f22c1664b8875f2d8f615"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: File 'build/mas/oe-jethro/build/out-glibc/sysroots/x86_64-linux/usr/lib/jvm/icedtea7-native/jre/lib/amd64/libfreetype.so.6' from icedtea7-native was already stripped, this will prevent future debugging!
WARNING: QA Issue: openjdk-8: /openjdk-8-dbg/usr/src/debug/openjdk-8/72b05-r0/jdk8u-e8bed1496ff2/hotspot/src/share/vm/code/scopeDesc.cpp is owned by uid 1005, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
NOTE: Tasks Summary: Attempted 1698 tasks of which 1676 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
Summary: There were 2 WARNING messages shown.
[mas@linuxdev build]$
But how to make it work with IMAGE_INSTALL_append ?
For Java, please follow the instruction here. However for META_JAVA use the below,
META_JAVA=33ddb28a6428b02ddcc82d1954ecf27cd426fbb5
In your ~oe-core/build/conf/local.conf add
IMAGE_INSTALL_append = " openjdk-8"
and then execute
MACHINE=apalis-imx6 bitbake angstrom-lxde-image
This should build an image with openjdk-8 support.