Skip to content

Instantly share code, notes, and snippets.

@FantomJAC
Last active December 30, 2015 07:39
Show Gist options
  • Save FantomJAC/7797612 to your computer and use it in GitHub Desktop.
Save FantomJAC/7797612 to your computer and use it in GitHub Desktop.
Beagleboard(armv7hf) build patch for OpenJFX8 (b118)
diff -r 25d3cad95e8b build.gradle
--- a/build.gradle Thu Nov 28 08:49:58 2013 -0800
+++ b/build.gradle Wed Dec 04 15:35:16 2013 -0800
@@ -1128,8 +1128,8 @@
if (IS_COMPILE_PANGO) {
// TODO: embedded support
- addNative(project, "fontFreetype", ["linux"])
- addNative(project, "fontPango", ["linux"])
+ addNative(project, "fontFreetype", ["linux", "armv7hf"])
+ addNative(project, "fontPango", ["linux", "armv7hf"])
}
if (IS_WINDOWS) {
@@ -2485,7 +2485,7 @@
def libs = ['font', 'prism', 'prismSW', 'prismES2', 'glass', 'iio']
if (IS_COMPILE_PANGO) {
// TODO: embedded support
- if ("${defaultHostTarget}" == "${t.name}") {
+ if ("${defaultHostTarget}" == "${t.name}" || "armv7hf" == "${t.name}") {
libs += ['fontFreetype', 'fontPango'];
}
}
diff -r 25d3cad95e8b buildSrc/armv7hf.gradle
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/armv7hf.gradle Wed Dec 04 15:35:16 2013 -0800
@@ -0,0 +1,484 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * ARMv7HF Beagleboard-xM w/ Yocto Poky/Dylan build.
+ *
+ * Author: Shotaro Uchida <[email protected]>
+ */
+
+ext.ARMV7HF = [:]
+
+// We should create toolchain using crosslibs-armv7hf.sh
+//fetchExternalTools('ARMV7HF',
+// ["armhf-beagleboard-00.tgz",
+// "gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.xz" ],
+// rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
+
+// Define the location of the sdk and toolchain
+def sdk=file("${rootProject.CROSS_TOOLS_DIR}/armhf-beagleboard-00")
+def compilerHome=file("${rootProject.CROSS_TOOLS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux")
+
+// Declare whether this particular target file applies to the current system
+ARMV7HF.canBuild = IS_LINUX && compilerHome.exists() && sdk.exists()
+if (!ARMV7HF.canBuild) {
+ if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
+ if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
+ return;
+}
+
+// Lambda for naming the generated libs
+ARMV7HF.library = { name -> return "lib${name}.so" as String }
+
+// alias for this platform in legacy artifacts
+ARMV7HF.artifactsName = "armv7hf-vfp"
+
+ARMV7HF.compileSwing = false;
+ARMV7HF.compileSWT = false;
+ARMV7HF.compileFXPackager = false;
+ARMV7HF.compileDesignTime = false;
+
+// Libraries end up in the sdk/rt/lib/arm directory for arm builds
+ARMV7HF.libDest = "lib/arm"
+
+// TODO this is garbage. Each target file should define what it includes,
+// not what it excludes.
+ARMV7HF.jfxrtJarExcludes = [
+ "**/*.hlsl",
+ "com/sun/glass/ui/win",
+ "com/sun/glass/ui/accessible/win",
+ "com/sun/prism/d3d",
+ "com/sun/prism/es2/gl/win",
+ //"com/sun/prism/null3d",
+ "com/sun/scenario/effect/impl/hw/d3d",
+
+ "com/sun/glass/events/mac",
+ "com/sun/glass/ui/mac",
+ "com/sun/glass/ui/accessible/mac",
+ "com/sun/prism/es2/gl/mac",
+
+ "com/sun/glass/ui/android",
+
+ "com/sun/glass/ui/ios",
+
+ "com/sun/glass/ui/swt", // SWT glass
+
+ "javafx/embed/swing", // Swing Interop
+
+ "javafx/embed/swt", // SWT Interop
+
+ "com/sun/prism/es2/MacGL*",
+ "com/sun/prism/es2/IOSGL*",
+ "com/sun/prism/es2/WinGL*",
+]
+
+def commonFlags = [
+ "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
+ "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
+// Specify the compilation parameters and link parameters
+def ccFlags = [
+ commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c",
+ IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
+def linkFlags = ["-shared", commonFlags].flatten()
+
+// Specify the compilation parameters and link parameters
+def extraCFlags = [
+ "-I", "-L",
+ ccFlags,
+ "-marm", "-mfloat-abi=hard", "-mfpu=vfp",
+ "-I$sdk/usr/include",
+ "-DOMAP3", "-DBEAGLEBOARD"].flatten();
+
+//See if we should build for imx6
+def imxHeader=file("$sdk/usr/include/linux/mxcfb.h")
+if (imxHeader.exists()) {
+ extraCFlags = [extraCFlags,"-DIMX6_PLATFORM"].flatten();
+}
+
+def extraLFlags = [
+ "-I", "-L",
+ linkFlags,
+ "-L$sdk/usr/lib"].flatten()
+
+def lensLFlags = [extraLFlags, "-lpthread", "-ludev", "-ldl", "-lm"].flatten()
+
+def fontCFlags = [extraCFlags].flatten()
+def fontLFlags = [extraLFlags].flatten()
+
+def iioCFlags = [extraCFlags].flatten()
+def iioLFlags = [extraLFlags].flatten()
+
+def es2EglfbCFlags = [extraCFlags, "-DIS_EGLFB", "-DLINUX"].flatten()
+def es2EglfbLFlags = [extraLFlags].flatten()
+
+def es2X11CFlags = [extraCFlags, "-DUSE_XSHM", "-DDEBUG", "-DIS_EGLX11", "-DLINUX"].flatten()
+def es2X11LFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
+
+def mediaCFlags = [extraCFlags,
+ "-I$sdk/usr/include/gstreamer-0.10",
+ "-I$sdk/usr/include/glib-2.0",
+ "-DENABLE_NATIVE_SOURCE=1", "-DENABLE_GST_FFMPEG=1"].flatten()
+def mediaLFlags = [extraLFlags, "-lgstreamer-0.10", "-lgstapp-0.10",
+ "-lgstbase-0.10", "-lglib-2.0", "-lgobject-2.0", "-lgmodule-2.0", "-lgthread-2.0"].flatten()
+
+def webCFlags = [extraCFlags].flatten()
+def webLFlags = [extraLFlags].flatten()
+
+// libraries to remove from the SDK
+//deploy.trim.public.library.filter= \
+// fxavcodecplugin-52.so \
+// fxavcodecplugin-53.so \
+// fxplugins.so \
+// libjfxwebkit.so \
+// libgstplugins-lite.so \
+// libgstreamer-lite.so \
+// libprism-es2-eglx11.so \
+// libglass_lens_fb.so \
+
+def gtkCFlags = [extraCFlags].flatten()
+def gtkLFlags = [extraLFlags].flatten()
+setupTools("armv7hf_tools",
+ { propFile ->
+ ByteArrayOutputStream results = new ByteArrayOutputStream();
+ exec {
+ commandLine("$sdk/bin/pkg-config", "--cflags", "gtk+-2.0", "gthread-2.0", "xtst");
+ setStandardOutput(results);
+ }
+ propFile << "cflags=" << results.toString().trim() << "\n";
+
+ results = new ByteArrayOutputStream();
+ exec {
+ commandLine "$sdk/bin/pkg-config", "--libs", "gtk+-2.0", "gthread-2.0", "xtst"
+ standardOutput = results
+ }
+ propFile << "libs=" << results.toString().trim();
+ },
+ { properties ->
+ gtkCFlags.addAll(properties.getProperty("cflags").split(" "))
+ gtkLFlags.addAll(properties.getProperty("libs").split(" "))
+ }
+)
+
+ARMV7HF.javafxPlatformProperties ="""javafx.platform=eglfb
+directfb.glass.platform=Lens
+directfb.glass.lens=dfb
+directfb.prism.order=sw
+directfb.com.sun.javafx.isEmbedded=true
+directfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
+eglfb.glass.platform=Lens
+eglfb.glass.lens=eglfb
+eglfb.prism.order=es2
+eglfb.prism.eglfb=true
+eglfb.prism.lcdtext=false
+eglfb.use.egl=true
+eglfb.use.gles2=true
+eglfb.embedded=eglfb
+eglfb.com.sun.javafx.isEmbedded=true
+eglfb.doNativeComposite=true
+eglfb.com.sun.javafx.scene.control.skin.FXVK.cache=true
+eglfb.prism.glDepthSize=0
+fb.glass.platform=Lens
+fb.glass.lens=fb
+fb.prism.order=sw
+fb.com.sun.javafx.isEmbedded=true
+fb.glass.restrictWindowToScreen=true
+fb.com.sun.javafx.scene.control.skin.FXVK.cache=true
+eglx11.glass.platform=Lens
+eglx11.glass.lens=eglx11
+eglx11.prism.order=es2
+eglx11.prism.eglx11=true
+eglx11.prism.lcdtext=false
+eglx11.use.egl=true
+eglx11.use.gles2=true
+eglx11.embedded=eglx11
+eglx11.com.sun.javafx.isEmbedded=true
+eglx11.com.sun.javafx.scene.control.skin.FXVK.cache=true
+eglx11.prism.glDepthSize=0
+gtk.glass.platform=gtk
+gtk.prism.order=sw
+gtk.com.sun.javafx.isEmbedded=true
+gtk.com.sun.javafx.scene.control.skin.FXVK.cache=true"""
+
+def pangoCCFlags = [extraCFlags, "-D_ENABLE_PANGO"];
+def pangoLinkFlags = [extraLFlags];
+setupTools("armv7hf_pango_tools",
+ { propFile ->
+ ByteArrayOutputStream results = new ByteArrayOutputStream();
+ exec {
+ commandLine "$sdk/bin/pkg-config", "--cflags", "pangoft2"
+ standardOutput = results
+ }
+ propFile << "cflags=" << results.toString().trim() << "\n";
+
+ results = new ByteArrayOutputStream();
+ exec {
+ commandLine "$sdk/bin/pkg-config", "--libs", "pangoft2"
+ standardOutput = results
+ }
+ propFile << "libs=" << results.toString().trim();
+ },
+ { properties ->
+ pangoCCFlags.addAll(properties.getProperty("cflags").split(" "))
+ pangoLinkFlags.addAll(properties.getProperty("libs").split(" "))
+ }
+)
+
+def freetypeCCFlags = [ext.COMPILE_PANGO ? "-D_ENABLE_PANGO" :
+ ext.COMPILE_HARFBUZZ ? "-D_ENABLE_HARFBUZZ" : ""]
+def freetypeLinkFlags = []
+setupTools("armv7hf_freetype_tools",
+ { propFile ->
+ ByteArrayOutputStream results = new ByteArrayOutputStream();
+ exec {
+ commandLine "$sdk/bin/pkg-config", "--cflags", "freetype2"
+ standardOutput = results
+ }
+ propFile << "cflags=" << results.toString().trim() << "\n";
+
+ results = new ByteArrayOutputStream();
+ exec {
+ commandLine "$sdk/bin/pkg-config", "--libs", "freetype2"
+ standardOutput = results
+ }
+ propFile << "libs=" << results.toString().trim();
+ },
+ { properties ->
+ freetypeCCFlags.addAll(properties.getProperty("cflags").split(" "))
+ freetypeLinkFlags.addAll(properties.getProperty("libs").split(" "))
+ }
+)
+
+def compiler = file("$compilerHome/bin/arm-linux-gnueabihf-gcc").getAbsolutePath()
+def linker = file("$compilerHome/bin/arm-linux-gnueabihf-g++").getAbsolutePath()
+
+ARMV7HF.glass = [:]
+ARMV7HF.glass.variants = ["eglfb", "directfb", "fb", "eglx11", "gtk", "lensport" ]
+ARMV7HF.glass.javahInclude = [
+ "com/sun/glass/events/**",
+ "com/sun/glass/ui/*",
+ "com/sun/glass/ui/lens/*",
+ "com/sun/glass/ui/gtk/*",
+ "com/sun/glass/ui/accessible/gtk/*"]
+ARMV7HF.glass.lib = "glass"
+
+ARMV7HF.glass.lensport = [:]
+ARMV7HF.glass.lensport.nativeSource = [
+ file("modules/graphics/src/main/native-glass/lens/lensport") ]
+ARMV7HF.glass.lensport.compiler = compiler
+ARMV7HF.glass.lensport.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB",
+ "-DLENSPORT", "-I", file("modules/graphics/src/main/native-glass/lens/") ].flatten()
+ARMV7HF.glass.lensport.linker = linker
+ARMV7HF.glass.lensport.linkFlags = [lensLFlags].flatten()
+ARMV7HF.glass.lensport.lib = "lens_porting"
+
+ARMV7HF.glass.eglfb = [:]
+// TODO when building headless, use lens/cursor/nullcursor/
+// otherwise we use lens/cursor/fbCursor/ and lens/input/udev
+
+// TODO when USE_RFB is specified use lens/rfb
+
+// TODO use /eglfb/x11ContainerScreen when using eglfb and EGL_X11_FB_CONTAINER
+// TODO use /headless/headlessScreen when using headless
+ARMV7HF.glass.eglfb.nativeSource = [
+ file("modules/graphics/src/main/native-glass/lens"),
+ file("modules/graphics/src/main/native-glass/lens/wm"),
+ file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
+ file("modules/graphics/src/main/native-glass/lens/input/udev"),
+ file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
+ARMV7HF.glass.eglfb.compiler = compiler
+ARMV7HF.glass.eglfb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX", "-DISEGLFB"].flatten()
+ARMV7HF.glass.eglfb.linker = linker
+ARMV7HF.glass.eglfb.linkFlags = [lensLFlags].flatten()
+ARMV7HF.glass.eglfb.lib = "glass_lens_eglfb"
+
+ARMV7HF.glass.directfb = [:]
+ARMV7HF.glass.directfb.nativeSource = [
+ file("modules/graphics/src/main/native-glass/lens"),
+ file("modules/graphics/src/main/native-glass/lens/wm"),
+ file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
+ file("modules/graphics/src/main/native-glass/lens/input/udev"),
+ file("modules/graphics/src/main/native-glass/lens/wm/screen/dfbScreen.c") ]
+ARMV7HF.glass.directfb.compiler = compiler
+ARMV7HF.glass.directfb.ccFlags = ["-ffast-math", extraCFlags, "-I$sdk/usr/include/directfb", "-DLINUX"].flatten()
+ARMV7HF.glass.directfb.linker = linker
+ARMV7HF.glass.directfb.linkFlags = [lensLFlags].flatten()
+ARMV7HF.glass.directfb.lib = "glass_lens_dfb"
+
+ARMV7HF.glass.fb = [:]
+ARMV7HF.glass.fb.nativeSource = [
+ file("modules/graphics/src/main/native-glass/lens"),
+ file("modules/graphics/src/main/native-glass/lens/wm"),
+ file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
+ file("modules/graphics/src/main/native-glass/lens/input/udev"),
+ file("modules/graphics/src/main/native-glass/lens/wm/screen/fbdevScreen.c") ]
+ARMV7HF.glass.fb.compiler = compiler
+ARMV7HF.glass.fb.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
+ARMV7HF.glass.fb.linker = linker
+ARMV7HF.glass.fb.linkFlags = [lensLFlags].flatten()
+ARMV7HF.glass.fb.lib = "glass_lens_fb"
+
+ARMV7HF.glass.eglx11 = [:]
+ARMV7HF.glass.eglx11.nativeSource = [
+ file("modules/graphics/src/main/native-glass/lens"),
+ file("modules/graphics/src/main/native-glass/lens/wm"),
+ file("modules/graphics/src/main/native-glass/lens/cursor/fbCursor"),
+ file("modules/graphics/src/main/native-glass/lens/input/udev"),
+ file("modules/graphics/src/main/native-glass/lens/wm/screen/x11ContainerScreen.c")]
+ //file("modules/graphics/src/main/native-glass/lens/wm/screen")]
+ARMV7HF.glass.eglx11.compiler = compiler
+ARMV7HF.glass.eglx11.ccFlags = ["-ffast-math", extraCFlags, "-DLINUX"].flatten()
+ARMV7HF.glass.eglx11.linker = linker
+ARMV7HF.glass.eglx11.linkFlags = [lensLFlags].flatten()
+ARMV7HF.glass.eglx11.lib = "glass_lens_eglx11"
+
+ARMV7HF.glass.gtk = [:]
+ARMV7HF.glass.gtk.nativeSource = file("modules/graphics/src/main/native-glass/gtk")
+ARMV7HF.glass.gtk.compiler = compiler
+ARMV7HF.glass.gtk.ccFlags = ["-ffast-math", gtkCFlags, "-DLINUX"].flatten()
+ARMV7HF.glass.gtk.linker = linker
+ARMV7HF.glass.gtk.linkFlags = [gtkLFlags, "-lstdc++"].flatten()
+ARMV7HF.glass.gtk.lib = "glass"
+
+ARMV7HF.decora = [:]
+ARMV7HF.decora.compiler = compiler
+ARMV7HF.decora.ccFlags = extraCFlags
+ARMV7HF.decora.linker = linker
+ARMV7HF.decora.linkFlags = extraLFlags
+ARMV7HF.decora.lib = "decora_sse"
+
+ARMV7HF.prism = [:]
+ARMV7HF.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
+ARMV7HF.prism.nativeSource = file("modules/graphics/src/main/native-prism")
+ARMV7HF.prism.compiler = compiler
+ARMV7HF.prism.ccFlags = [extraCFlags].flatten()
+ARMV7HF.prism.linker = linker
+ARMV7HF.prism.linkFlags = [extraLFlags, "-lX11", "-lXext", "-lXdmcp", "-lXau"].flatten()
+ARMV7HF.prism.lib = "prism_common"
+
+ARMV7HF.prismSW = [:]
+ARMV7HF.prismSW.javahInclude = ["com/sun/pisces/**/*"]
+ARMV7HF.prismSW.nativeSource = file("modules/graphics/src/main/native-prism-sw")
+ARMV7HF.prismSW.compiler = compiler
+ARMV7HF.prismSW.ccFlags = [extraCFlags].flatten()
+ARMV7HF.prismSW.linker = linker
+ARMV7HF.prismSW.linkFlags = [extraLFlags].flatten()
+ARMV7HF.prismSW.lib = "prism_sw"
+
+ARMV7HF.iio = [:]
+ARMV7HF.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
+ARMV7HF.iio.nativeSource = [
+ file("modules/graphics/src/main/native-iio"),
+ file("modules/graphics/src/main/native-iio/libjpeg7")]
+ARMV7HF.iio.compiler = compiler
+ARMV7HF.iio.ccFlags = iioCFlags
+ARMV7HF.iio.linker = linker
+ARMV7HF.iio.linkFlags = iioLFlags
+ARMV7HF.iio.lib = "javafx_iio"
+
+ARMV7HF.prismES2 = [:]
+ARMV7HF.prismES2.variants = ["eglfb", "eglx11"]
+ARMV7HF.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
+
+ARMV7HF.prismES2.eglfb = [:]
+ARMV7HF.prismES2.eglfb.nativeSource = [
+ file("modules/graphics/src/main/native-prism-es2"),
+ file("modules/graphics/src/main/native-prism-es2/GL"),
+ file("modules/graphics/src/main/native-prism-es2/eglfb")
+]
+ARMV7HF.prismES2.eglfb.compiler = compiler
+ARMV7HF.prismES2.eglfb.ccFlags = [ es2EglfbCFlags, "-I", ARMV7HF.glass.lensport.nativeSource ].flatten()
+ARMV7HF.prismES2.eglfb.linker = linker
+ARMV7HF.prismES2.eglfb.linkFlags = es2EglfbLFlags
+ARMV7HF.prismES2.eglfb.lib = "prism_es2_eglfb"
+
+ARMV7HF.prismES2.eglx11 = [:]
+ARMV7HF.prismES2.eglx11.nativeSource = [
+ file("modules/graphics/src/main/native-prism-es2"),
+ file("modules/graphics/src/main/native-prism-es2/GL"),
+ file("modules/graphics/src/main/native-prism-es2/eglx11")
+]
+ARMV7HF.prismES2.eglx11.compiler = compiler
+ARMV7HF.prismES2.eglx11.ccFlags = es2X11CFlags
+ARMV7HF.prismES2.eglx11.linker = linker
+ARMV7HF.prismES2.eglx11.linkFlags = es2X11LFlags
+ARMV7HF.prismES2.eglx11.lib = "prism_es2_eglx11"
+
+def closedDir = file("$projectDir/../rt-closed")
+ARMV7HF.font = [:]
+ARMV7HF.font.javahInclude = [
+ "com/sun/javafx/font/**/*",
+ "com/sun/javafx/text/**/*"]
+ARMV7HF.font.nativeSource = [file("modules/graphics/src/main/native-font")]
+ARMV7HF.font.compiler = compiler
+ARMV7HF.font.ccFlags = fontCFlags
+ARMV7HF.font.linker = linker
+ARMV7HF.font.linkFlags = fontLFlags
+ARMV7HF.font.lib = "javafx_font"
+
+ARMV7HF.fontT2K = [:]
+ARMV7HF.fontT2K.javahInclude = ["com/sun/javafx/font/t2k/**/*"]
+ARMV7HF.fontT2K.nativeSource = [
+ file("$closedDir/javafx-font-t2k-native/src"),
+ file("$closedDir/javafx-font-t2k-native/src/layout")]
+ARMV7HF.fontT2K.compiler = compiler
+ARMV7HF.fontT2K.ccFlags = [fontCFlags, "-DLE_STANDALONE"].flatten()
+ARMV7HF.fontT2K.linker = linker
+ARMV7HF.fontT2K.linkFlags = fontLFlags
+ARMV7HF.fontT2K.lib = "javafx_font_t2k"
+
+ARMV7HF.fontFreetype = [:]
+ARMV7HF.fontFreetype.javahInclude = ["com/sun/javafx/font/freetype/OSFreetype.class*"]
+ARMV7HF.fontFreetype.nativeSource = ["src/main/native-font/freetype.c"]
+ARMV7HF.fontFreetype.compiler = compiler
+ARMV7HF.fontFreetype.ccFlags = ["-DJFXFONT_PLUS", ccFlags, fontCFlags, freetypeCCFlags].flatten()
+ARMV7HF.fontFreetype.linker = linker
+ARMV7HF.fontFreetype.linkFlags = [linkFlags, fontLFlags, freetypeLinkFlags].flatten()
+ARMV7HF.fontFreetype.lib = "javafx_font_freetype"
+
+ARMV7HF.fontPango = [:]
+ARMV7HF.fontPango.javahInclude = ["com/sun/javafx/font/freetype/OSPango.class"]
+ARMV7HF.fontPango.nativeSource = ["src/main/native-font/pango.c"]
+ARMV7HF.fontPango.compiler = compiler
+ARMV7HF.fontPango.ccFlags = ["-DJFXFONT_PLUS", ccFlags, pangoCCFlags].flatten()
+ARMV7HF.fontPango.linker = linker
+ARMV7HF.fontPango.linkFlags = [linkFlags, pangoLinkFlags].flatten()
+ARMV7HF.fontPango.lib = "javafx_font_pango"
+
+ARMV7HF.webkit = [:]
+ARMV7HF.webkit.binDir = "$compilerHome/bin"
+ARMV7HF.webkit.compiler = compiler
+ARMV7HF.webkit.linker = linker
+ARMV7HF.webkit.ar = file("$compilerHome/bin/arm-linux-gnueabihf-ar").getAbsolutePath()
+ARMV7HF.webkit.objcopy = file("$compilerHome/bin/arm-linux-gnueabihf-objcopy").getAbsolutePath()
+ARMV7HF.webkit.strip = file("$compilerHome/bin/arm-linux-gnueabihf-strip").getAbsolutePath()
+ARMV7HF.webkit.ccFlags = extraCFlags.join(' ')
+ARMV7HF.webkit.linkFlags = extraLFlags.join(' ')
+
+ARMV7HF.media = [:]
+ARMV7HF.media.compiler = compiler
+ARMV7HF.media.linker = linker
+ARMV7HF.media.extra_cflags = mediaCFlags.join(' ')
+ARMV7HF.media.extra_ldflags = mediaLFlags.join(' ')
diff -r 25d3cad95e8b buildSrc/crosslibs/crosslibs-armv7hf.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/crosslibs/crosslibs-armv7hf.sh Wed Dec 04 15:35:16 2013 -0800
@@ -0,0 +1,181 @@
+#!/bin/bash
+#
+# Copyright (c) 2013 Shotaro Uchida <[email protected]>
+#
+# Script for Yocto Poky/Dylan
+#
+
+if [ -z $1 ]; then
+ echo "usage: crosslibs-armv7hf.sh ROOTFS"
+ exit 1
+else
+ FS=$1
+fi
+
+confirm() {
+ echo -n "Is this correct? [Y/n]: "
+ read -n 1 -r
+ echo
+ if [[ $REPLY == "y" || $REPLY == "Y" || $REPLY == "" ]]; then
+ CONFIRMED=1
+ else
+ CONFIRMED=0
+ fi
+}
+
+checkReinstall() {
+ if [[ -d $1 ]]; then
+ echo
+ echo $1 already exists.
+ echo -n "Delete and re-install? [y/N]: "
+ read -n 1 -r
+ echo
+ if [[ $REPLY == "y" || $REPLY == "Y" ]]; then
+ /bin/rm -rf $1
+ fi
+ fi
+}
+
+installPokyLibs() {
+ echo Using $FS as the Poky filesystem
+
+ echo Copying files to $POKYLIBS
+ mkdir -p $POKYLIBS
+ cd $FS
+ cp --parents -rdt $POKYLIBS \
+ usr/include/atk-1.0 \
+ usr/include/cairo \
+ usr/include/directfb \
+ usr/include/fontconfig \
+ usr/include/freetype2 \
+ usr/include/ft2build.h \
+ usr/include/gdk-pixbuf-2.0/ \
+ usr/include/gio-unix-2.0/ \
+ usr/include/glib-2.0 \
+ usr/include/gstreamer-0.10 \
+ usr/include/gtk-2.0 \
+ usr/include/libudev.h \
+ usr/include/libpng16 \
+ usr/include/libxml2 \
+ usr/include/libxslt \
+ usr/include/linux \
+ usr/include/pango-1.0 \
+ usr/include/pixman-1 \
+ usr/include/X11 \
+ usr/include/xcb \
+ usr/include/zlib.h \
+ usr/include/EGL \
+ usr/include/GLES2 \
+ usr/include/KHR \
+ usr/lib/glib-2.0/include \
+ usr/lib/gtk-2.0/include \
+ \
+ usr/lib/libudev* \
+ usr/lib/libasound* \
+ usr/lib/libatk-1.0* \
+ usr/lib/libcairo* \
+ usr/lib/libdirect* \
+ usr/lib/libdirectfb* \
+ usr/lib/libfontconfig* \
+ usr/lib/libfreetype* \
+ usr/lib/libfusion* \
+ usr/lib/libgdk-x11-2.0* \
+ usr/lib/libgdk_pixbuf-2.0* \
+ usr/lib/libgio-2.0* \
+ usr/lib/libGL* \
+ usr/lib/libglib-2.0* \
+ usr/lib/libgmodule-2.0* \
+ usr/lib/libgobject-2.0* \
+ usr/lib/libgst* \
+ usr/lib/libgthread-2.0* \
+ usr/lib/libgtk-x11-2.0* \
+ usr/lib/libm.* \
+ usr/lib/libpango-1.0* \
+ usr/lib/libpangocairo-1.0* \
+ usr/lib/libpangoft2-1.0* \
+ usr/lib/libpthread_nonshared.a \
+ usr/lib/librt* \
+ usr/lib/librt* \
+ usr/lib/libX11* \
+ usr/lib/libXau* \
+ usr/lib/libxcb* \
+ usr/lib/libXdmcp* \
+ usr/lib/libXext* \
+ usr/lib/libXtst.so* \
+ usr/lib/libxml2.so* \
+ usr/lib/libxslt.so* \
+ usr/lib/libz* \
+ \
+ usr/lib/pkgconfig \
+ usr/lib/pkgconfig \
+ usr/share/pkgconfig \
+ lib/libpthread* \
+ lib/libudev* \
+ \
+ |& grep -v warning
+
+ cat > $POKYLIBS/usr/lib/libpthread.so << EOF
+OUTPUT_FORMAT(elf32-littlearm)
+GROUP ( ../../lib/libpthread.so.0 libpthread_nonshared.a )
+EOF
+ if [[ ! $? -eq 0 ]]; then
+ echo libpthread patch failed.
+ exit 1
+ fi
+
+# Install an alternative pkg-config
+ mkdir -p $POKYLIBS/bin || exit 1
+ cp $SCRIPTDIR/pkg-config $POKYLIBS/bin || exit 1
+ chmod +x $POKYLIBS/bin/pkg-config || exit 1
+
+# Patch package configuration files
+ find $POKYLIBS/usr -name "*.pc" | xargs sed -i -e "s:=/usr/:=\${prefix}/:"
+ if [[ ! $? -eq 0 ]]; then
+ echo pkg-config patch failed.
+ exit 1
+ fi
+}
+
+installCrossCompiler() {
+ echo
+ echo Fetching and unpacking compiler in $CROSSLIBS
+ echo
+ echo "NOTE: if you use a proxy server then this download will probably fail. In that"
+ echo "case you need to set a value for the environment variable https_proxy and run"
+ echo "this script again."
+ echo
+ COMPILER_URL=https://launchpad.net/linaro-toolchain-binaries/trunk/2013.10/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux.tar.xz
+ wget -c $COMPILER_URL -O ${CROSSCOMPILER}.tar.gz
+ tar xJf ${CROSSCOMPILER}.tar.gz -C $CROSSLIBS
+}
+
+SCRIPTDIR=`dirname $0`
+SCRIPTDIR=`cd $SCRIPTDIR ; pwd`
+RT=`cd $SCRIPTDIR/../.. ; pwd`
+
+echo Using OpenJFX working directory at $RT
+confirm()
+if [[ $CONFIRMED -eq 0 ]]; then
+ echo -n "Enter the location of the OpenJFX working directory: "
+ read RT
+fi
+
+CROSSLIBS=`dirname $RT`/crosslibs
+echo Using crosslibs directory $CROSSLIBS
+
+mkdir -p $CROSSLIBS || exit 1
+
+POKYLIBS=$CROSSLIBS/armhf-beagleboard-00
+
+checkReinstall $POKYLIBS
+if [[ ! -d $POKYLIBS ]]; then
+ installPokyLibs
+fi
+
+CROSSCOMPILER=$CROSSLIBS/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux
+checkReinstall $CROSSCOMPILER
+if [[ ! -d $CROSSCOMPILER ]]; then
+ installCrossCompiler
+fi
+
+echo Done.
diff -r 25d3cad95e8b modules/graphics/src/main/native-prism-es2/eglfb/eglUtils.c
--- a/modules/graphics/src/main/native-prism-es2/eglfb/eglUtils.c Thu Nov 28 08:49:58 2013 -0800
+++ b/modules/graphics/src/main/native-prism-es2/eglfb/eglUtils.c Wed Dec 04 15:35:16 2013 -0800
@@ -136,6 +136,8 @@
// NOTE: EGL_TRANSPARENT_TYPE ?
+// Hack for Beagleboard
+#ifndef BEAGLEBOARD
if (attrs[RED_SIZE] == 5 && attrs[GREEN_SIZE] == 6
&& attrs[BLUE_SIZE] == 5 && attrs[ALPHA_SIZE] == 0) {
// Optimization for Raspberry Pi model B. Even though the result
@@ -157,6 +159,7 @@
eglAttrs[index++] = EGL_DEPTH_SIZE;
eglAttrs[index++] = attrs[DEPTH_SIZE];
+#endif
eglAttrs[index++] = EGL_RENDERABLE_TYPE;
eglAttrs[index++] = EGL_OPENGL_ES2_BIT;
eglAttrs[index] = EGL_NONE;
@FantomJAC
Copy link
Author

Works with Beagleboard-xM as well.
Should works with other AM/DM37x or OMAP3 devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment