Executing Gummiworms The trials and tribulations of a grumpy curmudgeonly old git

28Jan/1214

Setting up a VM for Raspberry Pi development using Virtualbox, Scratchbox2 & qemu (Part 3)

I don't claim that the following is the best way to install scratchbox2, qemu and a seed rootfs and configure them to produce binaries that will run on the real Raspberry Pi hardware. I don't even claim it is the correct way but it works for me and I can almost do it in my sleep by now. The way I do things will probably seem a bit inefficient and in some cases just plain wrong but it's how I work and hopefully they are easy to follow and adapt to your style of working. I also make no guarantees that it will actually work for you at all. Hopefully it will but if it doesn't sorry but oh well. I made the decision when I first started building the development vm that I would place all the required software under the users home directory rather than installing it globally as

  1. Installing in subdirectories in the user's home directory makes it easy  to keep things organised.
  2. It makes things almost idiotproof when you want to upgrade the ARM toolchain, scratchbox2, qemu or change the seed rootfs etc. as it's pretty much just rename the old directory, create a new directory and if neccessary rerun sb2-init.
Share
27Jan/120

Setting up a VM for Raspberry Pi development using Virtualbox, Scratchbox2 & qemu (Part 2)

If you decided to use a Debian or Ubuntu based distro then when you booted the Raspberry Pi Development VM that you just created you will have probably noticed an error message flash on the screen saying

 piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr

 

and you'll want to fix that before doing anything else. The Fedora16 VM doesn't produce this error so Fedora users can skip straight to the guest addition installation instructions. I wrote a short post about this error last year but to save you having to go there to read that post the fix [Credit for that fix goes to http://finster.co.uk & Karl Foley] is:

  • Start a terminal
  • sudo vi /etc/modprobe.d/blacklist.conf
  • Add the line blacklist i2c_piix4 to the end of the file and save
  • sudo update-initramfs -u -k all
  • sudo reboot
Share
26Jan/125

Fate of the Raspberry Pi Development VM


[update: looks like i EOL'ed the VM a day or so too soon seeing as I now have SDL working correctly (mostly) in it now. I'll either do one more release or roll a script and detailed instructions on how to install and configure scratchbox2, qemu and a rootfs (and sbrsh/sbrshd for using the real raspberry pi hardware with scratchbox2) before I do actually EOL it. It might take me a day or so to get to it though.]

In a few weeks we'll have our sticky paws on the real Raspberry Pi hardware which on the whole will obsolete the current VM. I could build sbrsh/sbrshd (mount nfs on the real hardware and use that for cpu transparancy, currently using qemu) which might be useful and there are a couple of tiny buglets and uglyness that I could fix but as it takes about 4 hours to create and clone the vm and configure everything and about 8 to 10 hours to upload somewhere using  ALL my upstream bandwidth is it worth it?

I don't mind continuing with the VM if anyone else really wants/needs it but if it's only me that is using it then i'll probably not bother as the VM is good enough for a few more weeks until i/we have the real hardware and i'm kind of running short of tuits for anything that isn't related to a couple of projects i'm currently working on at the moment  that will enable me to afford the odd raspi, one, three, fifteen...., but I don't want to leave anyone in the lurch if they really use the VM and would prefer not to have to set it up themselves or don't know how to do it.

So can i have a show of hands in the comments of who would like me to do another release of the VM and/or add sbrsh/sbrshd.

Share
25Jan/122

The Raspberry Pi (part three)

[Disclaimer: All opinions in this post are mine and mine alone. Although I am a moderator on the forums on http://raspberrypi.org I don't speak for the foundation and any factual errors,  upset I may cause  or spelling mistakes are completely my responsibility]

 

I took a bit of a break from writing this series of posts while I did some work on the development vm which I could do lying down using my eCafe Slim ARM based netbook (ta muchly Obarthelemy) as i'm still in a bit of pain from various aches and pains that being an old fogie seem to bring so sitting down typing for long periods is a right PITB. Now get off my lawn you darn kids. I also wanted to spend some time doing some research for a non-Raspberry Pi related project (although I might try to bring the Raspberry Pi into it if I can at some stage if I can).

 

So where were we upto at the end of part two? Ah yes The logo competition and MakerFaire NY 2011. i did mention MakerFaire and post a video of Eben's presentation a MakerFaire but I'll expand on that a bit for this post.

Share
23Jan/129

Building newLISP for the Raspberry Pi using the development VM

I just put together another quick screencast of the development vm in action. A tiny bit more complicated than tiny basic for curses this time as i had to install a library and edit the makefile a tad and i also ran the test suite inside sb2 as well.

YouTube Preview Image

ok enough messing around with the vm for the time being. it's time to start writing the raspberry pi (part three) blog post.

Share
22Jan/120

Video of the Development VM in action

I just did a quick screen capture video of the Raspberry Pi development VM in action and have uploaded it to youtube. I'm not very good with making screencasts so please forgive how rubbish it looks.

YouTube Preview Image
Share
20Jan/1214

New Raspberry Pi development vm version 0.2

[update: There is a tiny little buglet in the vm that slipped passed me as it didn't crop up when I was testing that yum worked as I didn't install a library that needed to go in the top level of the rootfs. If you get a lot of errors about unpacking or mkdir... when trying to install something using yum then you'll need to do the following

cd $HOME/raspberry_pi_development/f13arm_rootfs
sudo chmod -R 777 *

and that should fix it. sorry about that.

the torrent is now available.]

I have put together a new VM for developing software for the Raspberry Pi. I've made a few tweaks and cleaned up a lot of stuff and it's a much more pleasant setup and easier to use and update without making a whole new VM. I also used fedora13 for ARM as the seed rootfs so it should be possible to just swap files from/to a real Raspberry Pi and it should just run and you can update the seed rootfs as well (hopefully I guessed Raspberry Pi standardized educational disto correctly). I was planning to use fedora16 as the guest OS in the VM but after struggling with some of it's foibles for several hours and having to rebuild it a few times i gave up and reverted back to a ubuntu based release. it's currently compressing and uploading and with my upstream speed being so rubbish it'll take about 8 to 18 hours to finish but once it is finished i'll post a link to it and hopefully someone will make a torrent of it.

http://russelldavis.org/RaspberryPi/raspberrypi_dev_vm_02.torrent

Below is the README that is included with the exported appliance.

-------

RaspberryPi Development Virtual Machine 0.2

This is an exported virtualbox virtual machine for developing software for
the RaspberryPi. It is setup using the git versions of scratcbox2 & qemu (19/01/12), the fedora 13 for ARM as rootfs seed & arm-2011.03 codesourcery toolchain.

The root password is toor and the username and password for the normal user
is raspberry/password

To compile software for the raspberrypi as you would normally on an x86 machine
prefixing sb2 to any command. e.g. instead of gcc hello.c -o hello you would type sb2 gcc hello.c -o hello

To update, install or remove libraries and software in the seed rootfs use the command sb2 -eR yum ... where update, install, remove etc.

If you want to build and install libraries to use when building other software
that are not availble via fedora yum then rather than prefixing with sb2 prefix the command with sb2 -eR e.g. sb2 -eR make && make install

You can upgrade scratchbox2, qemu, the rootfs or toolchain quite easily as they are all in seperate dirs inside the raspberry_pi_development directory. it shoudl be possible to just swap them out when/if you need/want.

I have installed apache2 adn linked the $HOME/build directory so you can download anything you build to another system. You will probably want to change the network settings for the VM from NAT to Bridged though.

An ssh server is also installed so you can ssh in to the vm if you want as well (same proviso as above though. You'll need to change from NAT to Bridged to get it working).

If you have any other questions about the VM then you can send them via my blog (http://russelldavis.org) or post on the raspberry pi forum. (http://raspberrypi.org)

I have added one of my favourite bash aliases to the .bashrc doch is very handy in case you forget to use the sudo prefix to a command. just type doch and it'll redo the command but with sudo added.

Russell Davis (ukscone) 20/01/12

Share
17Jan/120

The Raspberry Pi (part two)

[Disclaimer: All opinions in this post are mine and mine alone. Although I am a moderator on the http://raspberrypi.org I don't speak for the foundation and any factual errors,  upset I may cause  or spelling mistakes are completely my responsibility]

Chapter the Second in which we meet the Alpha board, the Beta board and the people who whine a lot.

[As an aside, The above line is in the style of one of my favourite children's book that is fun to read as an adult as you'll appreciate it more. They rereleased it about a year or so ago as well so it isn't as hard to find as it used to be. In the 80s I was given a copy by my at the time girlfriend C.H.M.  and have reread it so many times i've had to replace it 3 times (once was because I gave my copy to a kid). If you spot it in a book store (support you local independant book store) buy a copy of Noel Langley's The Land of Green Ginger. ISBN: 978-1567923339 ]

Ok back to the Raspberry Pi.

Share
14Jan/121

The Raspberry Pi (part one)

[Disclaimer: All opinions in this post are mine and mine alone. Although I am a moderator on the http://raspberrypi.org I don't speak for the foundation and any factual errors,  upset I may cause  or spelling mistakes are completely my responsibility]

I first heard about the Raspberry Pi in May 2011, I actually stumbled across it while looking for more details about another device, a bluetooth keyboard in a ZX Spectrum case which unfortunately doesn't seem to have materialized :( , and I have been closely following the project since July 2011, when the Raspberry Pi Charitable Foundation created their website and forum. I haven't written about the Raspberry Pi before, apart from a quick scratchbox2 for the Raspberry Pi setup post and a premade Raspberry Pi VM post, so while I am taking a bit of a break from the myriad things that normally distract me I am going to rectify that situation. I also have a bit of an ulterior motive, but more about that later.

The Raspberry Pi as I am sure you all know by now is a small, credit card size, inexpensive, $25/$35, Single Board Computer aimed at schools and school children in the United Kingdom. The brainchild of Cambridge University Graduate, Ph.D & Executive MBA (Not quite sure what an Executive MBA is but i'm sure it's impressive and anything PHB-y about it is cancelled out by the Ph.D :) ) Eben Upton & several of his friends, colleagues & professors from Cambridge University and surrounding area. The Raspberry Pi is aimed to help solve the terrible state of affairs in the UK in the last ten to fifteen years or so where incoming university freshmen wishing to study Computer Science are completely unprepared for the course of study due to lack of real computer science and programming lessons in the curriculum but instead a catchall subject called ICT, that is effectively an update to the old typing & secretarial skills lessons that were available in the 70s & 80s when I was at school.

Share
10Sep/1117

Virtualbox VM for RaspberryPi development

[update: this vm is obsolete. please use the one in the follow post http://russelldavis.org/2012/01/20/new-raspberry-pi-development-vm-v0-2/ ] I am currently in the process of uploading a have uploaded created virtual machine running debian with lxde in which I have installed and configured scratchbox2, qemu and the codesourcery toolchain so that it is possible to build software for the RaspberryPi (although noone actually has one other than the lucky few developers that have access to a alphaboard).

The vm file will be is available from about (it's about 1.3GB so is about 7 hours from completing the upload)  11pm 10/09/11 (uk date format) at http://russelldavis.org/RaspberryPi/RaspberryPi.zip and as a torrent (created by #raspberrypi user obarthelemy)

http://thepiratebay.org/torrent/6667294

http://www.demonoid.me/files/details/2726361/

Although this virtual machine is meant to be used for developing for the RaspberryPi it should be usable for any ARM based device especially if you have a rootfs from the device that you can use to seed the scratchbox2 environment (see http://russelldavis.org/2010/10/20/setting-up-scratchbox2-to-build-software-for-zubuntu/ & http://russelldavis.org/2010/11/03/mounting-a-raw-disk-image/ & http://russelldavis.org/2011/09/07/setting-up-scratchbox2-from-scratch-for-the-raspberry-pi/ ).

I did forget a couple of important things in the included README. I have installed apache2 and symbolic linked $HOME/raspberrypi-development/build into /var/www and you should build everything in (or under) the $HOME/raspberrypi-development/build directory.

Share