Archive

Archive for July, 2013

Raspberry Pi fails to boot with soft-float image

The latest supported Java version from Oracle for the Rasperry Pi (as of this writing) is Java SE 7 Embedded for Linux/ARM. It requires a license and it supports only the somewhat dated soft-float image. Anyone using it must stick with soft-float for now. Unfortunately recent versions of the Raspberry Pi fail to boot with the soft-float image! We got a batch where some units worked and some failed. Personally I think that a hardware change that breaks compatibility with old software should be branded as a new revision, but with the Raspberry that has not happened.

Units that fail to boot have the new square Hynix memory chip in the middle of the board. The label on the chip says Hynix or Samsung.
Hynix memory chip

Fortunately there is a workaround. The newer hard-float images work and the Linux kernel in the soft-float image works as well. Copy the three files bootcode.bin, start.elf and fixup.dat from the boot partition of the latest hard-float image to the old soft-float image and the problem is solved.

Credits to StackOverflow for the solution. Please note that simply copying start.elf is not enough, all three files are needed.

Categories: Java, Raspberry Pi

Pick a Java VM for Raspberry Pi

There are several possible Java engines for the Raspberry Pi, but it is not trivial to pick the right one. Oracle’s Java versions are the fastest by far, but they are not free. Oracle Java SE 7 Embedded for Linux/ARM requires a license and it supports only the old soft-float version of Raspbian, not the newer hard-float version. Oracle Java SE 8 Embedded supports hard-float and is the fastest option, but it is still in preview and may not be used in production at all.

OpenJDK is free, supports hard-float and is easy to install, but it is much slower (see chart).

Raspberry Pi Java VM performance

The test case is fairly simple (generate random numbers and compute their MD5 sum), but the results match other tests. Personally I would go for OpenJDK with Avian or one of Oracle’s Java versions, depending on the situation. Hopefully Java SE 8 will be released soon and without the need for a cumbersome license…

EDIT: With a more realistic and long-running test case Avian ran into problems. This illustrates the problem with micro-benchmarks. Be sure to test with real-world code before making a choice! Oracle’s JVM is still the fastest. The test measures the number of business transactions completed per minute.

Transactions per minute

Categories: Java, Raspberry Pi