Raspberry Pi2

gcbplusvspi2By now i’m sure you’ve heard about the Raspberry Pi2 or what i would like to call the Raspberry Tau if I hadn’t been threatened with bodily harm and the rescinding of Twiglet privileges if I do. The foundation sent me one last week and it crossed the pond and arrived on Thursday. it would have been here sooner if we hadn’t had a few snow flakes fall in NYC and FedEx hadn’t decided that Brooklyn didn’t exist and the only part of New York that counts for parcel deliveries is Manhattan but since 6pm on Thursday all my Bs & my B+ have been sulking as they have been abandoned while I have a play with the Pi2. I better not close my eyes to sleep as i’m sure I heard rumblings from them about attacking me and the Pi2 in our sleep. As i’m sure that there will be many sites and blog posts with pretty pictures and all the specs by now i’ll forgo raving about the specs or taking lots of photos and instead write about my experiences of the last few days rebuilding (not tweaked to use the ARMv7 additions) and using my standard set of programs.

I’m probably not a typical Raspberry Pi end user as I don’t really play many games on the Raspberry Pi, I also don’t play many games on any computer just the odd period every now and again when I go wesnoth crazy, doom/quake addicted or retromanic. i also don’t really do much Python programming apart from very very simple mickey mouse stuff which is a lot of hack and slash, cut and paste from others programs with a little bit of that Scone magic added to get them to do what I want and as i honestly can’t afford hardware of any type, even a 20MHz crystal or a bag of leds is pushing the budget to the edge I don’t have any extra hardware for the Raspberry Pi, (teeny bit of a lie as I do have a flirc, UnicornHAT & two PiGlows and of course a few cases but they had to be obtained using twitter RT competitions, yarrbooty winnings & favours done in lieu of). What I do use my Raspberry Pis for currently is messing around just hacking on stuff for the sake of hacking on it, the odd COBOL program especially if it does something that someone says can’t/shouldn’t be done in COBOL (i’ve used COBOL programs to control a PiGlow & currently adding UnicornHAT controlling to another GnuCOBOL program as well as some other weird things), getting/making sure that OpenEuphoria http://openeuphoria.org builds/runs/passes as many tests as possible and helping (trying to) with telehash http://telehash.org/ at least making sure that it always builds and passes tests on the Raspberry Pi (ARM).

As the final Pi2 enabled sd card image wasn’t ready until Sunday all my messing around has been done using the rc & individual debs and there has been no attempt, by me to tweak for ARMv7 or use all 4 cores so the timing numbers are to be taking with a pinch of salt although they will give you the general idea & over time as things get tweaked and improved things wil only get better.
GnuCOBOL is something I rebuild fairly often and use almost every day so that was the first thing I tested. to keep things equal I cloned my current B+ sd card and added the ARMv7 kernel etc. to the boot partition but left everything else the same after turning off overclock on the Pi2. I left my B+ overclocked as it’s been this way since the got the B+ so it’s speed is what i’m used to. after doing a fresh grab of the source on both Pis and making sure all the dependencies were installed (they were) I did a

time make check

which builds and runs a few tests to make sure everything is fine. Both passed all the expected to pass tests, skipped the ones expected to skip etc.

Wow that’s an almost 10 minute difference. Most of the difference is made up from the compiling stage but as I made no changes to the -j option to use more cores to compile that’s pretty impressive. I’ll be much more productive now :( I’d better start speeding up my trips to the kitchen to make coffee as I don’t have as long as I used to.

I also wanted to see what the difference was for just the tests without the compile stage. the Raspberry Pi B+ is on the left & the Raspberry Pi2 is on the right.


To cut a long story short I was impressed on the speed differences even with just compiling and making no explicit use of the extra cores or any tweaks of any kind. just clone, build and use. All my normal COBOL programs got nice speed ups and although it was nice before it’s even nicer now to use GnuCOBOL. To get some “real world” stats to show the improvement. I ran the telco benchmark http://speleotrove.com/decimal/telco.html using the million number datafile expon180.1e6 on both Raspberry Pis and although other factors such as I/O speed and sd card speed affect the timings it’s still a good indictation of what you’ll see just by using the Pi2 instead of a B+ with no changes to your source or binary what so ever.

again the B+ is on the left & the Pi2 on the right


For my next two tests I didn’t bother rebuilding the programs I just copied the binaries from the B+ to the Pi2 (copied as in already there as i cloned the sd card). The 1st one I tried was the sieve benchmark for OpenEuphoria

euibplusvspi2again a nice speedup for “free” and if I rebuilt the interpreter using gcc options for ARMv7 i’m sure i’d squeeze a bit more out of it. I also used OpenEuphoria for my normal daily mess around and other than the speedups there was no visual difference between using it on the B+ vs the Pi2. The other program that I use fairly regularly is VirtualT a Tandy Model 100/102/200 emulator so I tried that on the Pi2 and where as on the B+ I can run 1 session and at max cpu usage I get an emulated Model 100 running at about 30 to 40MHz and any extra sessions really slow things down on the Pi2 I ran 4 sessions over VNC, each running at max cpu usage emulating a 60 to 80MHz Model 100 and the Pi was still very responsive.

The other things I do a lot on my Raspberry Pis is play around with a lot of encryption stuff. Mainly telehash as the project is being run by the creator of Jabber/XMPP along the same lines but with privacy in mind from the very beginning and also because i’m interested in it to use it for chat systems, near rt data xfer, IoT and a ton of other things and i’ve also submitted patches to a couple of projects to get them to build on the Raspberry Pi. Telehash built out of the box and passed all the tests with again a nice speedup although again no special measures were taken to use the extra cores or any ARMv7 specific stuff or NEON.

In fact after 3 and a bit days of using the Pi2 I have only found 1 thing that I use regularly on a B+ that I had any problems with and only when building from source on the Pi2. The relic toolkit using binaries built on a B+ work fine and pass all the tests, however binaries built on a Pi2 failed all the tests with an Exception Illegal error that I think is caused by a gcc macro not giving the expected value currently and is therefore hitting the wrong bit of a conditional compilation section. It should be an easy fix I just need to find some time to take a look at it.

All the other encryption stuff builds, runs and passes ll the tests and uses I use them for which enforces my opinion that it’s just a slight problem with relic that should be fixable quite easily or might even fix itself with a gcc rebuild.

So the Raspberry Pi2 is a great new addition to the Raspberry Pi family and at the price can’t be beat.

Addendum: The Pi2 fits all current B+ cases with a couple of provisos. The builtin heatsink in the flirc case is slightly off by a few mm. it shouldn’t make much difference unless you are hammering all 4 cores in the Pi2 24/7365 in a really hot room and the Pibow Coupe for the B+ due to the fact that a few components have moved around on the Pi2 compared to the B+ without a new layer 3 won’t fit around a Pi2. However when confirming this with Paul Beech he stated this

Here's the situation. Anything B+ purchased in January
 or before will need a new layer 3 to fit (components moved around). If anyone is trying to use their B+ Pibow on a 2, 
they can mail [email protected] and we'll generally send them a new layer 3 within reason (<100 ask for it)
Anything we ship now will be B+ AND 2 compatible.
PiHut, Adafruit and I think ModMyPi have new Pibows already, ready for tomorrow.

So the Pi1 (not really) is dead, Long Live the Pi2


1 Comment

Add a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *


russelldavis.org © 2014 Frontier Theme