MojoSDK on Fedora

From WebOS Internals
Revision as of 04:47, 12 September 2011 by Dillwead (talk | contribs) (Undo revision 18471 by Dillwead (talk))
Jump to navigation Jump to search

Installing the Mojo SDK on Fedora

This guide describes how to install the Mojo SDK and Novacom Debian files provided by Palm on a Fedora system. The procedure described is an extension of the post by mtk on the TreoCentral forums[1]. It is current as of Fedora 14 and palm-sdk_1.4.5-svn307799-sdk1457-pho465.

Commands shown in this guide use the standard notation for indicating which can be run as the normal user and which must be run as root: commands preceded by "#" are to be run as root, whereas those preceded by "$" are to be run as the normal user.

Install VirtualBox

VirtualBox is available from RPM Fusion. Install VirtualBox and load the kernel modules:

# yum install VirtualBox-OSE
# /etc/sysconfig/modules/VirtualBox-OSE.modules

Install the Mojo SDK

Download the Ubuntu deb package of the Mojo SDK from the Official Palm SDK Page. deb files are simple archives that can be extracted using ar:

$ ar xv palm-sdk_1.4.5-svn307799-sdk1457-pho465_i386.deb

Extract the contents of data.tar.gz and move them to their respective locations in your filesystem:

$ tar -zxvf data.tar.gz
# mv opt/PalmSDK /opt/.
# mv usr/local/bin/* /usr/local/bin/.
# mv usr/share/doc/palm-sdk /usr/share/doc/.

Extract the contents of control.tar.gz and run the post-install script:

$ tar -zxvf control.tar.gz
# ./postinst

Optionally clean up the extracted files:

$ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst

Install Novacom

The installation of the Novacom tool is almost identical to that of the Mojo SDK. Start by downloading the Ubuntu deb package of from the Official Palm SDK Page.

Extract the archive:

$ ar xv palm-novacom_1.0.46_i386.deb 

Extract the contents data.tar.gz and move them to their respective locations in your filesystem:

$ tar -zxvf data.tar.gz
# mv opt/Palm /opt/.
# mv usr/local/bin/* /usr/local/bin/.
# mv usr/share/doc/palm-novacom /usr/share/doc/.

Note: If you are using Fedora 15 or newer (checked with palm-novacom-1.0.76), you may need to get libusb-0.1.so.4 file from Fedora 14 package (maybe from here:[2]). Copy it to directory /opt/Palm/novacom and edit file starting the daemon (like /etc/init.d/novacomd) replacing line:

/opt/Palm/novacom/novacomd >> /var/log/novacomd 2>&1 &

by

export LD_LIBRARY_PATH=/opt/Palm/novacom; /opt/Palm/novacom/novacomd >> /var/log/novacomd 2>&1 &

Note: If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the Novacom driver to work.

yum install libusb.i686

Extract the contents of control.tar.gz and run the post-install script:

$ tar -zxvf control.tar.gz
# ./postinst

Optionally clean up the extracted files:

$ rm -fr debian-binary data.tar.gz control.tar.gz opt/ usr/ control md5sums postinst prerm postrm

Troubleshooting

If you see in your log file (/var/log/novacomd) or on your screen when you run novacomd from command lines like below:

[2011/8/4 20:10:48] novacom_usb_findandattach_thread:565: usb_handle 0x00000000, bus=002 dev=005
[2011/8/4 20:10:48] novacom_usb_rx_thread:413 -- usbll(00000000) error: reading packet, result(-1), errno 9
[2011/8/4 20:10:48] novacom_usb_rx_thread:434 -- usbll(00000000) reading packet, reads(2), duration(100ms), result(-1), last_errno 9

you are most likely using incompatible libusb version - please read the note about Fedora 15 above and try using libusb-0.1.so.4 from Fedora 14.

Run the Mojo SDK

The Mojo SDK should now be installed successfully. The first launch will load it into the VirtualBox environment. It can be launched from the command line:

$ palm-emulator

Other Notes

For development, using Eclipse and the plugins for Mojo are strongly recommended. Installation instructions of these plugins can be found at the Official Palm Eclipse plugin Installation Guide

Install Mojo SDK on Fedora 11 (Legacy Instructions)

Note: These instructions provide an alternate method of installing the Mojo SDK on Fedora. These are more involved and therefore might not be as easy as the previous instructions. They are currently left here for historical reasons but may be removed in the future.

  • Install VirtualBox RPM package available at:

VirtualBox Linux Downloads

NOTE: If you're running Fedora 64 bit, get the AMD64 version. ( Even if you have an Intel Processor ).

  • Install the RPM:
rpm -ivh VirtualBox-<version>_fedora11-1.<platform>.rpm
  • Download the Ubuntu deb package of the Mojo SDK from:

the Official PalmSDK Linux Page

  • Download 'alien' package conversion tool:

Debian Alien utility

You will need RPM building packages installed for the following method:

  • Build an RPM of alien and install it:
rpmbuild -tb alien_<version>.tar.gz
rpm -ivh ~/rpmbuild/RPMS/noarch/alien-<version>.rpm

If rpmbuild gives an error similar to: error: File /download/pre/alien_8.77.tar.gz: No such file or directory

You'll need to extract the archive manually and edit the alien.spec file. Inside that file, find all instances of the old version number ( in my case 8.77 ) and replace it with the version number of the file you downloaded. ( in my case, 8.78 ). Once this is done, regenerate the tar.gz file with the following syntax:

tar -czf alien_8.78.tar.gz alien

Once this completes, then build and install the RPM as above.

  • Use Alien to change the .deb file into a .tgz archive (the RPM feature of alien didn't work for me):
alien -tc palm_mojo_sdk-Ubuntu-<version>.deb

Alien should report that the .tgz version is generated.

  • Extract the .tgz version:
mkdir tmp
cd tmp
tar -xzf ../palm-sdk-<version>.tgz
  • Copy the extracted files into place:
cp -a opt/* /opt
cp -a usr/* /usr
  • Run the installation script:
install/doinst.sh

The script above should add a few entries into your /etc/hosts file.

  • Download the Novacom linux drivers linked on this page:

Palm Novacom Linux Driver Wiki Page


  • This too will be a .deb. You will convert and install it the same way you did the SDK:
alien -tc palm-novacom_<version>_i386.deb
mkdir novacom
cd novacom
tar -xzf ../palm-novacom-<version>.tgz
cd novacom
cp -a opt/* /opt
cp -a usr/* /usr


NOTE: If you are using Fedora 64bit, You'll need to install the 32bit version of libusb for the novacom driver to work.

yum install libusb.i586
  • Copy the novacomd-upstart script into place:
cp /opt/Palm/novacom/novacomd-upstart /etc/event.d/palm-novacomd
  • Start the novacomd driver:
start palm-novacomd
  • As your normal user account, launch the emulator. The first launch will install it into VirtualBox.
/opt/PalmSDK/Current/bin/palm-emulator

For development, you should strongly consider using Eclipse and the plugins for Mojo. Installation instructions of these plugins can be found at: Official Palm Eclipse plugin Installation Guide