2009-11-27

Run OpenGL demos on Mini2440

Mini2440-Arm9 has no graphic hardware accelerator. In order to make opengl program run on it, I think we need do following things:

=======================
Install a crossing toolchain
=======================
  • Extract the package to root
>tar zxvf arm920t-eabi.tgz –C /
  • Export path of toolchains, run also add following line in /root/.bashrc
==================================
Cross-compile mesa library (openGL in Linux)
==================================
  • Download and unpack mesa libraries. See the tutorial here (http://www.mesa3d.org/)
  • You need to use arm-gcc instead of your host gcc to build the mesa library. Max just create a symbolic link refer to the arm-gcc, by
>ln -s /opt/toolchains/arm920t-eabi/bin/arm-linux-gcc /usr/bin/gcc
>cd ~/project/mesa/Mesa-7.5.1
>./configure --host=arm-linux --prefix=/usr/local/mesa
>make
>make install
  • Then, you can find the library and include files at /usr/local/mesa.
=======================
Copy the demo to target board
=======================
My mini2440 is remotely loaded by nfs network on my host machine. The root directory of mini2440 is located at /disk1/nfs/root/ on my host machine. Just copy some demo executables (you can find at for examples Mesa-7.5.1/progs/xdemos) to /disk1/nfs/root/. And start the demos by minicom. See the tutorial.

3 comments:

  1. Hey, thanks for this help !
    But what are the performance of OpenGl on the mini2440 ?
    I am facing some graphic performance issues on the mini2440, and I was wondering if it will be better with openGl....

    Thanks in advance for your help...

    ReplyDelete
  2. Hi,

    Can you share your compiled mesa libraries? I am having trouble compiling mesa. I get the following error.

    CC glai_dispatch.lo : No such file or directory.

    Thanks,
    Anvesh

    ReplyDelete
  3. This was very useful, thanks for posting all steps in such a good manner, couldn't find anything better on internet.

    ReplyDelete