I recently acquired a slew of Phidget SBCs for my lab and have been working to upgrade their Java runtime to use the most recent version of JamVM. After successfully building a new kernel with JamVM 1.5.4 support, I decided to share the process for anyone else interested in upgrading JamVM! Note that this tutorial is for upgrading JamVM on the Phidget 1070 SBC, which has less RAM than their newer 1072. Furthermore, the newer 1072 runs a Debian distribution, which should make it easier to upgrade.
Prerequisites:
- Linux based computer (I used Ubuntu 10.10).
- Most recent Phidget SBC buildroot. View the README to make sure you have all required libraries for buildroot.
- JamVM 1.5.4 source.
Extract the the SBC buildroot into a convenient location, i.e. your home directory, ~username, and go into the directory. Run the basic configuration command; however, before you can compile you need to manually tweak some files.
First, I recommend creating a symbolic link within the buildroot directory to a list of downloaded source packages that you want the SBC to have. For example:
ln -s ~username/PhidgetDL dl
will link the dl directory within buildroot to your own local “PhidgetDL” directory. The buildroot process looks in here for all required software packages at compile time. If it sees that you have *.tar.gz files, it will extract them rather than hit a Sourceforge mirror and download. I found that the build process would halt if the mirror was unavailable; consequently, it was more convenient to download myself and place in the download directory. Place your JamVM tarball in this directory, as well as any other packages that the build process cannot download.
Since my priority was to upgrade JamVM, I mainly tweaked gnu-classpath and jamvm configuration files within the buildroot/package/java directory. Start by changing into the classpath directory. Within here, edit the classpath.mk file with the following line under CLASSPATH_CONFIG_OPT: --disable-gjdoc. This change will not affect your functionality, but it will save a little space and prevent an antlr build error.
Next, go into the jamvm directory and open the jamvm.mk file. Within jamvm.mk you need to change the version line to: JAMVM_VERSION=1.5.4. Also, you need to pass the option to disable thread local storage (TLS). This change is required since the uClibc version used in the SBC buildroot does not support TLS (as far as I can tell). In the future, this feature may be added if uClibc is migrated to 0.9.32 in the SBC buildroot. To disable TLS, pass in --disable-tls under the JAMVM_CONFIG_OPT section of the file.
Once you have made these changes, you can run make in the root of your buildroot directory. If everything is configured correctly, you will get a shiny new custom Linux build with JamVM 1.5.4. To finish the process, just point your web browser to your SBC’s address on your network and upload the new .bin file!
In the future, I hope to change the Phidget buildroot to use the most recent uClibc, which would then let me get TLS enabled again. If you have success with that upgrade, do tell! That is all for now.