Paul's Raspberry Pi Journal

From Resin 4.0 Wiki

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
<font color="black face="comic sans ms" size="3" color="#009">
+
<font color="black face="tahoma" size="3" color="#009">
  
== Paul's Raspberry Pi Journal ==
+
= Intro =
 
+
=== Intro ===
+
  
 
Hi!  I'm [http://www.caucho.com/about/ Paul Cowan], a software engineer at [http://www.caucho.com/ Caucho Technology].  Caucho is primarily a Java EE application server vendor.  Our application server is called [http://www.caucho.com/resin-application-server/ Resin].  I mostly write Java code, but I'm also a computer hobbyist and like to tinker with anything techie.
 
Hi!  I'm [http://www.caucho.com/about/ Paul Cowan], a software engineer at [http://www.caucho.com/ Caucho Technology].  Caucho is primarily a Java EE application server vendor.  Our application server is called [http://www.caucho.com/resin-application-server/ Resin].  I mostly write Java code, but I'm also a computer hobbyist and like to tinker with anything techie.
Line 9: Line 7:
 
During Caucho's last engineer meeting in San Francisco (October 2012), I brought up [http://www.raspberrypi.org/ Raspberry Pi] as an avenue we could explore for Resin.  It probably wouldn't directly sell Resin licenses, but it would be a great marketing vehicle.  Everybody like it, Caucho is cool like that, and so I'm off.
 
During Caucho's last engineer meeting in San Francisco (October 2012), I brought up [http://www.raspberrypi.org/ Raspberry Pi] as an avenue we could explore for Resin.  It probably wouldn't directly sell Resin licenses, but it would be a great marketing vehicle.  Everybody like it, Caucho is cool like that, and so I'm off.
  
=== About Resin ===
+
= About Resin =
  
 
Resin is a fairly light-weight for an app server and embeds well.  It's really a nice platform on which to build just about anything in Java, since it can make just about any app HTTP enabled and handles all the mundane services like logging and you don't really want to have to deal with.  It also provides a dependency injection container... Now you may be asking "why do I can about dependency injection when I'm just playing around with hobby projects."  Well personally I pump out Java code much faster using dependency injection and just find it easier to write in that style.   
 
Resin is a fairly light-weight for an app server and embeds well.  It's really a nice platform on which to build just about anything in Java, since it can make just about any app HTTP enabled and handles all the mundane services like logging and you don't really want to have to deal with.  It also provides a dependency injection container... Now you may be asking "why do I can about dependency injection when I'm just playing around with hobby projects."  Well personally I pump out Java code much faster using dependency injection and just find it easier to write in that style.   
Line 15: Line 13:
 
Resin also includes [http://quercus.caucho.com/ Quercus, a Java based PHP interpreter].  I'm not really planning to make PHP a focus of this project, but it's handy to have available just in case.
 
Resin also includes [http://quercus.caucho.com/ Quercus, a Java based PHP interpreter].  I'm not really planning to make PHP a focus of this project, but it's handy to have available just in case.
  
=== About This Journal ===
+
= About This Journal =
  
 
The Raspberry Pi platform and community certainly seems to be evolving rapidly, but it still seems like there's not enough documentation out there.  In particular Java support is kinda spotty, and I haven't found anything on JEE on a Raspberry Pi.  So I'm going to document my experience in hope it is useful to other Java developers getting started with Raspberry Pi.   
 
The Raspberry Pi platform and community certainly seems to be evolving rapidly, but it still seems like there's not enough documentation out there.  In particular Java support is kinda spotty, and I haven't found anything on JEE on a Raspberry Pi.  So I'm going to document my experience in hope it is useful to other Java developers getting started with Raspberry Pi.   
  
=== Hardware ===
+
= Hardware =
  
 
* [http://www.newark.com/jsp/search/productdetail.jsp?sku=43W5302 Raspberry Pi Model B] board from [http://www.newark.com/ Newark Element 14] (Upgraded from 256 Mb model for free)
 
* [http://www.newark.com/jsp/search/productdetail.jsp?sku=43W5302 Raspberry Pi Model B] board from [http://www.newark.com/ Newark Element 14] (Upgraded from 256 Mb model for free)
Line 41: Line 39:
 
|}
 
|}
  
=== Getting Started ===
+
= Getting Started =
  
 
I started with [http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html this write from Oracle] and the [http://www.raspberrypi.org/downloads Raspberry Pi downloads page].  It becomes apparent pretty quickly that there's a float-point compatibility issue with Java on Raspberry Pi.  Here's a summary of what I understand regarding the state of Raspberry Pi operating systems and Java support as of 11/2012:
 
I started with [http://www.oracle.com/technetwork/articles/java/raspberrypi-1704896.html this write from Oracle] and the [http://www.raspberrypi.org/downloads Raspberry Pi downloads page].  It becomes apparent pretty quickly that there's a float-point compatibility issue with Java on Raspberry Pi.  Here's a summary of what I understand regarding the state of Raspberry Pi operating systems and Java support as of 11/2012:
  
==== OS ====
+
== OS ==
  
 
* The "official" distro is Raspbian Wheezy, which is offered for download on on [http://www.raspberrypi.org/downloads raspberrypi.org/downloads]
 
* The "official" distro is Raspbian Wheezy, which is offered for download on on [http://www.raspberrypi.org/downloads raspberrypi.org/downloads]
Line 53: Line 51:
 
* There are [http://elinux.org/RPi_Distributions#Available_Distributions various other linux distros supporting ARM processor]
 
* There are [http://elinux.org/RPi_Distributions#Available_Distributions various other linux distros supporting ARM processor]
  
==== Java Compatability ====
+
== Java Compatability ==
  
 
* Currently NO Java distro that I'm aware of has support for Raspberry Pi's hardware floating point unit (hard-float)
 
* Currently NO Java distro that I'm aware of has support for Raspberry Pi's hardware floating point unit (hard-float)
 
* Therefore we need OS distro that support soft-float, ARMv6, little-endian
 
* Therefore we need OS distro that support soft-float, ARMv6, little-endian
* The Oracle article is discussing using Debian Squeeze, which is suspect is because it was the best distro available at the time with soft floating-point support.
+
* The Oracle article is discussing using Debian Squeeze, which I suspect is because it was the best distro available at the time with soft floating-point support.
* However there is now a [http://www.raspberrypi.org/downloads Soft-float Debian wheezy Rasbian image] available at [http://www.raspberrypi.org/downloads raspberrypi.org/downloads], so I'm going to try that to start out
+
* However there is now a [http://www.raspberrypi.org/downloads Soft-float Debian wheezy Rasbian image] available at [http://www.raspberrypi.org/downloads raspberrypi.org/downloads], so I'm going to try that to start out
 +
 
 +
I should mention that my understand is you can't just use any ARM linux distro straight up.  The boot sequence for a Raspberry Pi dependent on the SD card.  It actually boots from a small RISC core on the GPU, but the GPU firmware is loaded from the SD card.  [http://elinux.org/RPi_Software#Overview More here].
 +
 
 +
= Imaging =
  
 
</font>
 
</font>

Revision as of 00:00, 30 November 2012

Contents

Intro

Hi! I'm Paul Cowan, a software engineer at Caucho Technology. Caucho is primarily a Java EE application server vendor. Our application server is called Resin. I mostly write Java code, but I'm also a computer hobbyist and like to tinker with anything techie.

During Caucho's last engineer meeting in San Francisco (October 2012), I brought up Raspberry Pi as an avenue we could explore for Resin. It probably wouldn't directly sell Resin licenses, but it would be a great marketing vehicle. Everybody like it, Caucho is cool like that, and so I'm off.

About Resin

Resin is a fairly light-weight for an app server and embeds well. It's really a nice platform on which to build just about anything in Java, since it can make just about any app HTTP enabled and handles all the mundane services like logging and you don't really want to have to deal with. It also provides a dependency injection container... Now you may be asking "why do I can about dependency injection when I'm just playing around with hobby projects." Well personally I pump out Java code much faster using dependency injection and just find it easier to write in that style.

Resin also includes Quercus, a Java based PHP interpreter. I'm not really planning to make PHP a focus of this project, but it's handy to have available just in case.

About This Journal

The Raspberry Pi platform and community certainly seems to be evolving rapidly, but it still seems like there's not enough documentation out there. In particular Java support is kinda spotty, and I haven't found anything on JEE on a Raspberry Pi. So I'm going to document my experience in hope it is useful to other Java developers getting started with Raspberry Pi.

Hardware

I ordered the Pi early in October, but it was backordered by about 4 weeks. 10/15 they sent me an email my order was upgraded for free from 256 Mb to the 512 Mb model. It was delivered 10/18, so about 2 weeks early.

I use an IOGear DVI KVM so monitor and keyboard aren't a problem. In fact the KVM combines the mouse and keyboard into a single USB cable, so that leaves me a free USB port on the RasPi. However I needed an adapter and HDMI cable. Monoprice is great for this kind of stuff.

  • PNY 8 Gb SD card from BJ's (I think... I stoled it from the family camera :) )
  • MicroUSB cable and AC adapter from my Kindle
Raspi-1.gif Raspi-2.gif Raspi-3.gif Raspi-4.gif

Getting Started

I started with this write from Oracle and the Raspberry Pi downloads page. It becomes apparent pretty quickly that there's a float-point compatibility issue with Java on Raspberry Pi. Here's a summary of what I understand regarding the state of Raspberry Pi operating systems and Java support as of 11/2012:

OS

  • The "official" distro is Raspbian Wheezy, which is offered for download on on raspberrypi.org/downloads
  • This distro is variant of Raspbian Wheezy from raspbian.org but with a light-weight desktop GUI, Midor webbrowser, and a few other development extra specifically for Raspberry Pi
  • Raspbian Wheezy is a variant of Debian Wheezy but compiled for ARM processor with optimization specifically for Raspberry Pi (hardware floating-point)
  • Debian Wheezy is the "testing" distro of Debian, while Debian Squeeze is the current stable release
  • There are various other linux distros supporting ARM processor

Java Compatability

  • Currently NO Java distro that I'm aware of has support for Raspberry Pi's hardware floating point unit (hard-float)
  • Therefore we need OS distro that support soft-float, ARMv6, little-endian
  • The Oracle article is discussing using Debian Squeeze, which I suspect is because it was the best distro available at the time with soft floating-point support.
  • However there is now a Soft-float Debian wheezy Rasbian image available at raspberrypi.org/downloads, so I'm going to try that to start out

I should mention that my understand is you can't just use any ARM linux distro straight up. The boot sequence for a Raspberry Pi dependent on the SD card. It actually boots from a small RISC core on the GPU, but the GPU firmware is loaded from the SD card. More here.

Imaging

Personal tools
TOOLBOX
LANGUAGES