Duinsoft - RISC OS
Monday 27 February 2017      | home | tools | contact

Upgrading RISC OS on a Raspberry Pi - the hard way

When my old Iyonix choked on its third PSU replacement, I switched to a recently acquired Raspberry Pi for my RISC OS needs. The Pi's SD card had the March 2013 RC8 image (with some additions), i.e. RISC OS 5.19. After the first noises about a new release the new image didn't show up quickly enough to my liking, so I went ahead and upgraded to 5.21 using the available hard disc and ROM images.

I actually compared the HardDisc4 image manually and copied only the new bits, but in hindsight I could just as easily have dropped the whole thing on my existing installation and let the OS sort things out. On the other hand, doing it this way did make me aware the default image was missing some Pi specific bits. Fortunately, the bits from RC8 still seemed to work well enough with the 5.21 ROM. I sorted out the differences a while later, when the RC11 image finally became available.

To anyone else wanting to do this...

Are you nuts? Just use the package manager PackMan to upgrade... Oh, wait. That won't work. The only thing remotely resembling a Raspberry Pi system is five months old [as of mid August 2013, that is...]...
Well, then just flash RC11 to another SD card and transfer all your changes to it using an SD card reader in your USB hub. Or hot swap the cards if you don't have a card reader or a USB hub. Bit of a pain? Yeah, I guess...


A few things to keep in mind

The procedure described below is only meant for upgrading a Raspberry Pi RC8 image to RC11+ (the + indicating that this isn't really a RC11 because you'll be using more recent images).

On any full path name of directories and files appearing in the text, I've replaced the first part (SDFS::RISCOSpi.$) with just $, mainly because it's shorter.

If anything mentioned here is unclear, ask for clarification before proceding! I don't mean just terminology. English isn't my native language and sometimes that shows.

The upgrades must be applied to the original structures on the SD card, with the boot structure in particular in its original location. The directory $.!Boot contains an image file called Loader which exactly overlaps the FAT32 partition, so the firmware boot process and RISC OS can access the same files. This will no longer work correctly if you delete Loader or move it or $.!Boot to another location.

No need to unzip things first. You can just copy every item you need from a SparkFS Filer window. However, should you -for whatever reason- decide to unzip things first after all, make sure to do that in a RISC OS environment or all file types will be lost. I.e. don't ever unzip on another (non RISC OS) machine and copy the unzipped items to the Pi (unless your unzip tool properly supports the -F option, of course).

A final warning

I can't verify what you're doing and that alone makes it impossible to accept any kind of responsibility for whatever might go wrong.

Step by step (more or less)

Additional notes

The procedure described above is based on the development versions of the images and not the RC11 ones dated 8 and 9 July 2013. That's just because I used development versions myself.

Ordinarilly, RISC OS stores some of its system settings in CMOS RAM and others in the directory $.!Boot.Choices.Boot. The Pi doesn't have CMOS RAM, so these settings are instead stored inside the ROM image. If you replace the ROM image, any personalised settings will of course be lost. Hence the !SaveCMOS application.

The settings in $.!Boot.Choices.Boot will usually remain intact if an upgrade does not involve a new hard disc image or if the image is copied over the existing one (remember, !Boot.Choices is empty in a HardDisc4 archive). This may seem convenient, but can be the source of all kinds of problems if any of the old settings are incompatible with the new ROM. In such a case it's advisable to start with a new, clean boot structure, so the OS will fill $.!Boot.Choices.Boot with defaults from $.!Boot.RO520Hook.Boot.

Most of the issues with the RISC OS 5.20 and 5.21 upgrades mentioned on the RISC OS Open forum are related to incompatible settings. However, as these issues mainly show up on older hardware like the Iyonix, I decided to leave the old $.!Boot.Choices.Boot in place when I upgraded my own installation. This didn't cause any problems, so for this procedure I left it in as well.

As a consequence, there are two files that don't contain everything they should contain: $.!Boot.Choices.Boot.Desktop and $.!Boot.Choices.Boot.PreDesktop. That isn't really a problem, as the missing bits currently don't actually do anything important, but it isn't correct either. If you compare these two files to the defaults in $.!Boot.RO520Hook.Boot, you should be able to figure out what's missing.
Hint: look at line 4, 16 and 29 in $.!Boot.RO520Hook.Boot.Desktop and line 69 and 98 in $.!Boot.RO520Hook.Boot.PreDesktop.
You may also notice the old Desktop file in $.!Boot.Choices.Boot has some redundant lines (the ones containing 'Boot:^.Utilities.400' to 'Boot:^.Utilities.310'). These lines and can be removed.

More upgrading - somewhat optional

The separate zip you downloaded from this site only contains four files that HardDisc4's !Boot doesn't provide. There's more, of course. However, I can't include that in the zip. The Pi distribution has the author's permission to distribute these applications and I don't.
The text file Replace in $.tmp.rc11-bits/zip contains a list of items that are new in RC11. If you want them upgraded as well, I suggest you visit the applications' websites and download the most recent versions. Here's a list:


The last one is extra. Fat32FS belongs in $.!Boot.Choices.Boot.PreDesk (and also in the RO###Hook.Boot.PreDesk directories) and the version in both RC8 and RC11 is pretty outdated, so do yourself a favour...