Go Down

Topic: Linux PowerPC (Read 10086 times) previous topic - next topic


Mar 03, 2006, 07:26 am Last Edit: Mar 03, 2006, 07:27 am by fab Reason: 1
Hello world, I use a Debian GNU/Linux 3.1 on my TiBook G4 AND my led are blinking!

First of all tnx at Massimo and all Arduino's people!

If you are a enthusiastic linux powerpc owner and you want open your mind you need read how much follows...

step 1: RXTX are build for X86 architecture (little endian) so it don't works!

  • get librxtx source and recompile it!

(http://www.rxtx.org/) or (apt-get source librxtx)

  • remove in 'configure'  all '-source 1.3' (I use j2sdk 1.3)

  • remove in 'src/Zystem.java' (I don't know: I'm not a Java Man. I drink orzo coffe! )

else if (mode == J2SE_LOG_MODE)
                        java.util.logging.Logger.getLogger("gnu.io").fine (s);
                        return (true);

  • remove in 'src/RawImp.c' (it's a sola: it make a sys/io.h file not found!)

#ifndef __APPLE__  /* dima */
#include <sys/io.h>
#endif /* dima */
(see also http://lists.debian.org/debian-glibc/2003/03/msg00457.html)

  • compile'n'install! (./comfigure && make install) or (debian/rules binary && dpkg -i ../librxtx-java_2.1.7-1_powerpc.deb)

  • rename old RXTXcomm.jar file in 'trunk/build/shared/lib' in


  • copy new BIG Endian RXTXcomm.jar (on debian /usr/share/java/RXTXcomm.jar) in to 'trunk/build/shared/lib'

  • rename 'trunk/build/linux/dist/lib' in 'trunk/build/linux/dist/lib-little-endian'

  • create a new 'trunk/build/linux/dist/lib'

  • copy all new BIG Endian librxtx (on Debian 'cp /usr/lib/librxtx* trunk/build/linux/dist/lib')

step 2:  ./make.sh (!!!)  ;)

If you have only jre 1.3 comment in 'trunk/app/syntax/JEditTextArea.java':

    // no more need for reflection, pde requires use of java 1.4
    if (System.getProperty("java.version").startsWith("1.4")) {
    try {
        Class kWheelHandler =
        java.lang.reflect.Constructor konstructor =
          kWheelHandler.getConstructor(new Class[] { getClass() });
        konstructor.newInstance(new Object[] { this });
      } catch (Exception e) {
    //new WheelHandler(this);
    addMouseWheelListener(new MouseWheelListener() {
        public void mouseWheelMoved(MouseWheelEvent e) {
          if (!scrollBarsInitialized) return;
          int amt = e.getWheelRotation();
          vertical.setValue(vertical.getValue() + amt * 3);

That it's all!

ps: Sorry for my terrifull english!


It took me a couple of nights of hacking to get RXTX compiled and installed successfully on a PPC PowerBook G4 running Ubuntu 9.04 Jaunty. Ultimately, I was successful building from the rxtx-2.2pre2 source. Here's what I did.

Code: [Select]

unzip rxtx-2.2pre2.zip
cd rxtx-2.2pre2

Next, I edited the "configure" to remove "-source 1.3 -target 1.3" both times it appears.

The Zsystem.java file has moved from src/System.java to src/gnu/io/Zsystem.java. After finding its new home, I applied the edit suggested by fab, removing

Code: [Select]

else if (mode == J2SE_LOG_MODE)
                      java.util.logging.Logger.getLogger("gnu.io").fine (s);
                      return (true);

Finally, in src/RawImp.c, the code I removed looks a bit different. I removed these lines:

Code: [Select]
#ifndef __APPLE__  /* dima */
#ifndef PPC
#include <sys/io.h>
#endif /* PPC */
#endif /* dima */

Now, when I first attempted to compile, it failed with this error
Code: [Select]

./src/I2CImp.c:135: error: 'UTS_RELEASE'  undeclared (first use in this function)

Some further research pointed to a workaround solution, as noted here: (sorry the board will not let me post an active line because I'm a n00b, you'll have to reconstruct yourself) mailman.qbang.org / pipermail / rxtx / 2009-February / 4371059.html

In my case, I used "uname -r" to get my release info, and edited /usr/include/linux/version.h to include the following final line
Code: [Select]
#define UTS_RELEASE "2.6.28-6-powerpc"

At this point, I was able to successfully make and install
Code: [Select]
sudo make install

And Arduino 0017 now runs without complaints.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131