category: RaspberryPi <div id="toc_heading"></div><div id="toc"></div> h2. Introduction This page details the process for upgrading an already-working RISC OS installation on a Raspberry Pi to RISC OS 5.31.[1] *Please note*: RISC OS 5.31 is a development release that contains untested, work-in-progress software. Some components may be unfinished and/or contain serious bugs: that is what development is about! You should only use RISC OS 5.31 if you are willing to accept the risks involved and have a suitable backup strategy in place. Having said that, many development builds of RISC OS do work well. It may simply be a matter of trying a few different nightly builds until you find one that meets your needs. fn1. <small>If you wish to upgrade to the latest stable release (5.30) please see [[RISC OS Upgrade]] instead.</small> h3. Before you start The process described on this page will only work if you are running RISC OS 5.28, 5.29 or 5.30. If you are running an older release of RISC OS, you must [[RISC OS Upgrade|upgrade to the latest stable release of RISC OS]] first. You will need to download the following software: * The *Beta ROM image* from the "Raspberry Pi downloads":/content/downloads/raspberry-pi page. * The *Beta HardDisc4 image* from the "Miscellaneous downloads":/content/downloads/common page. * [[Software information: Raspberry Pi: Firmware|Updated Raspberry Pi firmware]] suitable for RISC OS 5.31. If you are upgrading from 5.28 or 5.29, you will also need: * The *Stable HardDisc4 image* from the "Miscellaneous downloads":/content/downloads/common page. A certain level of RISC OS knowledge is assumed, including how to use [[CLI Basics|the command line]], how to use [[Software information: Configure|the !Configure application]] and how to edit text files. h2(#Boot). Step 1: Disc upgrades * If upgrading from RISC OS 5.28 or 5.29, unpack the "stable HardDisc4 image":/content/downloads/common and run the InSituBootUpdate file to update your !Boot directory to the 5.30 version. Reboot and fix anything that's broken. * Use the "Boot merge" facility (!Configure > Boot > Install) to install the new version of !Boot from the "Beta HardDisc4":/content/downloads/common image. Reboot and fix anything that's broken.[2] * Replace all the ordinary applications (i.e. the contents of every directory *except* !Boot) from the Beta HardDisc4 image. Simply delete the old application of the same name (e.g. !Maestro) and copy the new application across. fn2. <small>"Boot Merge" saves all replaced files in the !Boot.Backup directory - this will allow you to retrieve any changes you may have made to !Boot components (e.g. amendments to a built-in monitor definition file) if they have been overwritten.</small> h2(#Part2). Step 2: Upgrading the RISC OS ROM We recommend you continue using your updated !Boot for a week or so, to flush out any lurking problems before you upgrade the ROM. This gives you time to grab a selection of "Beta ROM images":/content/downloads/raspberry-pi of different dates[3] - just in case a serious bug was accidentally introduced in a nightly build. You should also check the "Bugs":/forum/forums/4 and "Community Support":/forum/forums/11 forums to see if there are any problems with recent nightly builds. fn3. <small>The build date is mentioned immediately below the download link itself. Although listed as nightly builds, the average build frequency is closer to "once every 3-4 days".</small> h3. Preparing for the upgrade * Edit the file called @CMDLINE/TXT@ inside !Boot.Loader (if it doesn't already exist, create it) so that the text @disable_gamma@ appears on the first line of the file.<br /> For example, if the file already contains "disable_mode_changes", you would edit the first line to read:<br />@disable_mode_changes disable_gamma@ * Check that @CONFIG/TXT@ (inside !Boot.Loader) contains - at minimum - the following lines:<br />@fake_vsync_isr=1@<br />@framebuffer_swap=0@<br />@gpu_mem=64@<br />@init_emmc_clock=100000000@<br />@ramfsfile=CMOS@<br />@ramfsaddr=0x508000@<br />@kernel=RISCOS.IMG@<br />If any lines are missing, you should add them. *Do not remove any entries at this stage*. * If you want to use the build on a Pi 4, make sure that the following 4 lines appear at the *beginning* of @CONFIG/TXT@:<br />@[pi4]@<br />@enable_gic=1@<br />@[all]@<br />@arm_64bit=0@<br />It's probably best to insert these lines even if you aren't using a Pi 4 - that way you won't be caught out if you subsequently start using a Pi 4. * Create an "OldFiles" directory inside !Boot.Loader, then copy the existing versions of RISCOS/IMG, BOOTCODE/BIN, START/ELF and FIXUP/DAT (for the Pi 4, copy START4/ELF and FIXUP4/DAT as well) into "OldFiles". This will allow you to regress to the old ROM version if necessary. h3(#ROM). Installing the 5.31 ROM * Enter the @*Unplug@ command. This should report "No modules are unplugged". If it does list any unplugged modules, enter @*RMInsert@ commands for each unplugged module.<br />For example, if the GPIO module is unplugged, you should enter:<br />@*RMInsert GPIO@<br />Please note that you *must* RMInsert every unplugged module[4], as the order of modules in the new ROM may be different (which could cause the wrong module to be unplugged at the next boot). * Check that !Boot.Loader contains a file called "CMOS". If it doesn't exist, use the *SaveCMOS command to create it:<br />@*SaveCMOS !Boot.Loader.CMOS@ * Install the [[Software information: Raspberry Pi: Firmware|updated firmware]] (BOOTCODE/BIN, START/ELF, FIXUP/DAT) into !Boot.Loader. If you're using a Pi 4, you will also need to install START4/ELF and FIXUP4/DAT. * Install the Beta ROM (RISCOS/IMG) into !Boot.Loader. * Close all Filer windows, wait 15 seconds, then shut down and restart RISC OS. fn4. <small>Yes, even BootFX. After you have booted into RISC OS 5.31 you can once more *RMKill BootFX, but it *must* be active on first boot.</small> h3. After rebooting on RISC OS 5.31 * Make a backup copy of your CMOS settings (either via "CMOS > Save" under !Configure, or by using *SaveCMOS) as some of the settings may have changed during the upgrade.[5] * If you want to unplug BootFX again, now is your chance to do so. fn5. <small> If you have upgraded from RISC OS 5.29 or earlier, none of your old "saved CMOS" files will work at RISC OS 5.31, so you will need a fresh backup anyway.</small> h3(#Problems). Common problems with the upgrade * <b>Monitor doesn't display a picture on boot</b><br />EITHER: You didn't upgrade some (or all) of the firmware,<br />OR: you didn't put "disable_gamma" on the first line of cmdline.txt. * <b>Desktop is displayed at a lower resolution than usual</b><br />Use "Configure > Screen" to change the monitor settings. To use EDID, choose a monitor type of "Auto(_your-monitor-name-here_)" (e.g. "Auto(L225W)") and a resolution of "Native". * <b>Configuration changes don't survive a reboot</b> ** CONFIG/TXT (inside !Boot.Loader) may be missing the lines that load the CMOS file on boot. Check that the following lines are present:<br />@ramfsfile=CMOS@<br />@ramfsaddr=0x508000@ ** Alternatively, the CMOS file (inside !Boot.Loader) is missing/corrupted/read-only, or another file called CMOS also exists in the root directory of the Filecore partition (i.e. you have a file called $.CMOS in addition to $.!Boot.Loader.CMOS). Delete any wayward file(s), then issue:<br />@*SaveCMOS !Boot.Loader.CMOS@ * <b>Unexpected "SWI not found" messages during boot-up</b><br />This usually indicates that one or more modules are unplugged. Enter @*Unplug@ and issue @*RMReinit@ commands for each of the modules on the list (e.g. you would use @*RMReinit GPIO@ to reinstate the GPIO module). * <b>Unexpected behaviour in applications after installing the 5.31 ROM</b> ** This can happen if you installed the ROM without upgrading !Boot (or perhaps the attempted upgrade of !Boot didn't go as well as you had hoped). ** Alternatively, one or more modules are unplugged (enter @*Unplug@ to check status). If any modules are unplugged, use @*RMReinit@ to reinstate them (e.g. you would use @*RMReinit GPIO@ to reinstate the GPIO module). ** Thirdly, there may be a bug in the specific ROM build you chose. Check the "forums":/forum/ to see if anyone else has reported a problem; if necessary replace the ROM with another 5.31 nightly build to see if that is any better.