RaspberryPi – The Saga Continues

I’ve not had a great deal of luck playing with my RaspberryPi since I got it. Those who follow me on twitter will know my lament:

I’ve been through 3 SD cards and they all were faulty on arrival, either refusing to work at all or otherwise having so many bad-sector errors or other similar issues that they were essentially unusable – and this was just testign them out on my desktop or laptop, the RaspberryPi was even less happy about them.

Finally though I’ve found an SD card which so far has seemed to Just Work™. I bought a 32GB Sandisk SD Card from Amazon UK which has worked a treat. I also bought a new SD card USB adapter since my old one died, and that seems to Just Work™ too. After all the stupid buying, then getting refunds, rinse and repeat, it’s nice to finally be able to actually get started!

Since I want to play around with lower level stuff on the RaspberryPi, specifically games development, I wanted a distro that didn’t include any junk like X for example. I plan on doing everything directly through OpenGL|ES so any of the normal desktop stuff is pointless and a waste of space. I also want to try and squeeze as much performance as I can out of the device so I found a Raspbian Wheezy armhf minimal image. The image is built with support for hardware floating-point operations and is a very minimal, basic install so you end up with a lot of free space and much better performance for any app that requires floating point operations.

I had some weird issues when putting the image onto the SD card because unless I had it mounted, I lost the device files to be able to write to it. I just ended up writing to it whilst mounted and it didn’t seem to cause any harm. I then used gparted to resize the partitions to fill the 32GB before I tried it in the RaspberryPi.

I ran the following commands after booting the RaspberryPi for the first time on the new image:

After that, I installed rpi-update by Hexxeh by following the instructions on the rpi-update github page. I ran this and rebooted, then I finally decided to try out the demo code in /opt/vc/src but found it wouldn’t compile.

As it turned out, some of it was already pre-compiled, but the pre-compiled stuff was compiled without the hardware floating point instructions and was therefore incompatible with the rest of the system. I just changed into the lib folders and did a make clean and a make to rebuild them and found the demos I tried compiled fine and ran nicely.