Compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

xie_yonggang
This post was updated on .
Hi, I am trying to build jogl on beagleboard with TI omap 3530 processor and angstrom linux ,


what is the parameter to set in the gluegen.properties ?

here is my gluegen.properties file and


gluegen-cpptasks.file="${user.home}/gluegen-cpptasks-linux-32bit.xml"


gluegen-cpptasks-linux-32bit.xml file here
<project name="GlueGen-cpptasks" basedir="." >

<import file="../gluegen-cpptasks-base.xml" optional="false" />

<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir">
    <echo message="Custom forced compiler.cfg.linux, linker.cfg.linux" />
    <compiler id="compiler.cfg.linux" name="gcc">
      <compilerarg value="-m32" />
      <compilerarg value="-Wall" />
      <defineset>
        <define name="LINUX" />
      </defineset>
    </compiler>

    <linker id="linker.cfg.linux" name="gcc">
      <linkerarg value="-m32" />
    </linker>

</target>

<target name="gluegen.cpptasks.declare.compiler" depends="setup.java.home.dir">
  <echo message="Custom forced Linux.x86" />

  <property name="isLinux"    value="true"/>
  <!--
  <property name="isLinuxX86" value="true"/>
  -->
  <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
  <property name="linker.cfg.id.base"            value="linker.cfg.linux" /> 
  <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/i386" />
  <property name="java.includes.dir.platform"    value="${java.includes.dir}/linux" />
</target>

</project>



what do it set other than isLinux? is there a isLinuxARM ?
Reply | Threaded
Open this post in threaded view
|

Re: Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

Wade Walker
Administrator
Hi Xie,

This sounds like a question for Sven -- I haven't yet tried to build JOGL on/for a platform that only has GL ES available. Sven, is this possible?

I can see some examples in the code base (like gluegen/make/lib/gluegen-cpptasks-linux-32bit.xml) of how to do cross-compiler overrides. It should be possible to swap out the compiler and linker that way, the question is if the resulting JARs and DLLs will actually work on the target platform

Just to clarify, are you compiling on the BeagleBoard itself under Angstrom linux, or are you cross-compiling from another system?
Reply | Threaded
Open this post in threaded view
|

Re: Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

xie_yonggang

Hi Wade,

Thanks a lot for your reply, 
I am trying to compile the jogl source directly on beagleboard under angstrom Linux. 

Is it possible to build jogl on windows and deploy the binary directly to angstrom Linux?  I am aware that the processor difference between Intel and ARM , I wasn't so sure that the binary built on windows could be port directly to arm processor. 

Yonggang

在 2011-5-17,上午08:46,"Wade Walker [via jogamp]"<[hidden email]> 写道:

Hi Xie,

This sounds like a question for Sven -- I haven't yet tried to build JOGL on/for a platform that only has GL ES available. Sven, is this possible?

I can see some examples in the code base (like gluegen/make/lib/gluegen-cpptasks-linux-32bit.xml) of how to do cross-compiler overrides. It should be possible to swap out the compiler and linker that way, the question is if the resulting JARs and DLLs will actually work on the target platform

Just to clarify, are you compiling on the BeagleBoard itself under Angstrom linux, or are you cross-compiling from another system?



If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Cross-compile-jogl-on-beagleboard-using-ARM-Cortex-A8-and-angstrom-linux-tp2948554p2950654.html
To unsubscribe from Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux, click here.
Reply | Threaded
Open this post in threaded view
|

Re: Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

Wade Walker
Administrator
xie_yonggang wrote
I am trying to compile the jogl source directly on beagleboard under angstrom Linux.
If that's the case, then you'd need gcc and a JDK installed in Angstrom linux on the BeagleBoard, and you should be able to build from the command line as described at http://jogamp.org/wiki/index.php/Building_JOGL_on_the_command_line, assuming the build will work at all (still waiting on Sven for confirmation that it's even possible).

xie_yonggang wrote
Is it possible to build jogl on windows and deploy the binary directly to angstrom Linux?  I am aware that the processor difference between Intel and ARM , I wasn't so sure that the binary built on windows could be port directly to arm processor.
This seems to contradict your first sentence  This sounds like you want to cross-compile (i.e. compile ARM binaries on desktop Windows/Linux using something like CodeSourcery, then just copy the binaries to the BeagleBoard). This is more complex, since you have to have a cross-compilation environment set up -- are you an experienced embedded developer?
Reply | Threaded
Open this post in threaded view
|

Re: Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

xie_yonggang
No i am not an experienced embedded developer , i think i misinterpret the meaning of "cross-compilation". Cross-compilation seems to me not possible because ARM uses RISC and Intel uses CISC, the binary generated in CISC should not be usable in RISC.  please correct me if i am wrong.  

if cross compilation is possible, it will be nice because we will want to develop our application under windows environment and just copy to the beagleboard.
I have read your tutorial on setting up cross-compilation in eclipse , but i did not find any section about setting up for an ARM, most of them is for x86 based processors, are you planning to write one tutorial for ARM?

please also help me to get Sven to confirm about the compilation on beagleboard, thanks in advanced


Yonggang
Reply | Threaded
Open this post in threaded view
|

Re: Cross compile jogl on beagleboard using ARM Cortex-A8 and angstrom linux

Wade Walker
Administrator
xie_yonggang wrote
No i am not an experienced embedded developer
Neither am I, but I work at an embedded microprocessor company, so I've had a little exposure

xie_yonggang wrote
i think i misinterpret the meaning of "cross-compilation"
"Cross-compilation" means your compiler generates the binary for a processor that's different from the host it's running on. For example, with one of the CodeSourcery versions of gcc (http://www.codesourcery.com/), I can run gcc on x86 Linux, but it will produce an ELF binary that will run on ARM Linux. In this case the "host" processor is an x86, but the "target" processor is an ARM.

In a "normal" version of gcc that comes installed on Linux, the host and target are the same, so if you compile on x86, it produces x86 binaries that will not run on ARM. You can set up gcc to do cross-compilation yourself, but you have to build it from source (see http://en.wikipedia.org/wiki/Cross_compiler#GCC_and_cross_compilation), and you may need headers and libraries from the target platform.

It's now possible to run a full version of Linux on an ARM processor, so you can do "self-hosting" (compiling ARM binaries on ARM Linux) instead of the old-style embedded development that was always cross-compiled. But this will produce "normal" application programs that run under ARM Linux, not a "bare metal" binary that could be downloaded to an ARM-based phone, for example.

Could you describe what kind of program you're trying to write? What exact hardware/OS combination will it run on, who will use it, what is it for?