RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Upgrading your Raspberry Pi to RISC OS 5.27

category: RaspberryPi

Introduction

This page details the process for upgrading an already-working RISC OS installation on a Raspberry Pi to RISC OS 5.27.

Please note: RISC OS 5.27 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.27 if you are willing to accept the risks involved and have a suitable backup strategy in place.

Having said that, many builds of RISC OS 5.27 do work well. It may simply be a matter of trying a few different daily builds until you find one that meets your needs.

 

Prerequisites

You will need to download the following software:

  • The Beta ROM image from the Raspberry Pi downloads page.
  • The Beta HardDisc4 image from the Miscellaneous downloads page.
  • Updated Raspberry Pi firmware suitable for RISC OS 5.27.

A certain level of RISC OS knowledge is assumed, including how to use the command line, how to use the !Configure application and how to edit text files.

 

What release are you upgrading from?

The exact procedure to follow depends on the release of RISC OS you are currently running. Choose the appropriate entry from this list:

  • RISC OS 5.24, 5.25 or 5.26
  • RISC OS 5.23 (RC15)
  • RISC OS 5.21 (RC11, RC12, RC12a, RC14)
  • RISC OS 5.19 (RC10 or earlier)

 


Disc upgrades and monitor settings

Starting with releases prior to RISC OS 5.24

These releases – with the possible exception of RC151 – are too old to retain the existing !Boot as it stands, so you will have to build a new !Boot directory based on the 5.27 version of !Boot. The process is as follows:

  • If you are upgrading from RISC OS 5.23 (e.g. RC15), you may find a !!ZeroPain directory in !Boot.Choices.Boot.PreDesk – copy this somewhere safe, as it will be removed during the !Boot upgrade.
  • Enter the *Unplug command. If this lists any unplugged modules, find out if any replacement modules are being loaded (the most likely location is !Boot.Choices.Boot.PreDesk) and keep a copy somewhere safe, as they will be removed during the !Boot upgrade.
  • Go to the RISC OS Upgrade page and follow the section titled Procedure for upgrading from RISC OS 5.19 or earlier2 to rebuild !Boot and upgrade the disc-based applications – use the Beta HardDisc4 image, not the “stable” image mentioned on the page. DON’T upgrade the OS ROM just yet.
  • If you had been loading revised versions of unplugged modules, temporarily re-install them. This is just a stop-gap solution as the 5.27 ROM will have the latest versions of all modules.
  • If you saved a copy of !!ZeroPain above, re-install it in !Boot.Choices.Boot.PreDesk

Once you have confirmed that !Boot – and the other applications in the Beta HardDisc4 image – still work properly, go to Monitor configuration checks below.

1 With RC15 it is theoretically possible to download the 5.24 stable disc image and run the “InSituBootUpdate” file inside that archive – you might then be able to go to the RISC OS 5.24 section on this page to complete the upgrade. This is completely untested with RC15 and you would do so at your own risk.

2 Avoiding a rebuild of !Boot with older releases is, at best, difficult. For builds based on 5.21 (i.e. Pi releases RC11 to RC14) you would need to run the InSituBootUpdate supplied with the 5.22 HardDisc4 image followed by the InSituBootUpdate supplied with the 5.24 HardDisc4 image (and finding a copy of the 5.22 HardDisc4 image can be rather tricky). If you are upgrading from RISC OS 5.19 (Pi releases up to RC10) you cannot use the InSituBootUpdate process at all.

 

Starting with RISC OS 5.24 or later

  • Use the “Boot merge” facility (!Configure > Boot > Install) to install the new version of !Boot from the Beta HardDisc4 image. Reboot and fix anything that’s broken.3
  • 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.

3 “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.

 

Monitor configuration checks

MonitorType and WimpMode

At RISC OS 5.27, two CMOS RAM configuration settings – “MonitorType” and “WimpMode” – must hold valid information. Releases up to RISC OS 5.26 are rather forgiving of unusual values in these two fields, but from RISC OS 5.27 they must be correct or the monitor may not display a picture.

To check the settings:

  • Open a Task window (ctrl-F12) and enter the following two commands:
    *Status MonitorType
    *Status WimpMode
  • If the MonitorType is set to a number between 0 and 8, you must change it:
    *Configure MonitorType Auto
    If the monitor type is “EDID” you do not need to change it.
  • If the WimpMode is set to a number, you must change it:
    *Configure WimpMode Auto

 

“disable_mode_changes” (Optional setting)

In early releases of RISC OS 5 for the Raspberry Pi, the monitor pixel resolution chosen at boot-up was controlled by two settings supplied to the Raspberry Pi bootloader (the “hdmi_group” and “hdmi_mode” lines in config.txt).

From RISC OS 5.24 onwards, RISC OS will by default select a monitor pixel resolution according to the settings chosen in the “Screen” section of the !Configure application, thus ignoring the “hdmi_group” and “hdmi_mode” settings.

If you want RISC OS to continue using the “hdmi_group” and “hdmi_mode” settings4 you should add disable_mode_changes to CMDLINE/TXT inside !Boot.Loader. If the file doesn’t exist, create it.

4 For example, you may be using a display that only supports a specific pixel resolution, or perhaps you want to use the “AnyMode” utility.

 

Restart to check new monitor settings

  • If you have changed any of the monitor settings, shut down and restart the machine.
  • After the restart, you may find that the RISC OS desktop is displayed at a lower resolution than usual. To correct this, use the !Configure application to select a screen resolution more to your liking. For example, to use the monitor’s EDID settings, choose a monitor type of “Auto(your-monitor-name-here)” (e.g. “Auto(L225W)”) and a resolution of “Native”.5

5 If the menu option says “Auto(Unidentified)” it means that EDID has not worked. In this instance you should choose another monitor type from the list, or consider using disable_mode_changes until you install the 5.27 ROM.

 


Upgrading the RISC OS ROM

We recommend you continue using your updated !Boot for a week or two, so as to flush out any lurking problems before you upgrade the ROM. This gives you time to grab a selection of Beta ROM images of different dates6 – just in case a serious bug was accidentally introduced in a daily build. You should also check the Bugs and Community Support forums to see if there are any problems with recent daily builds.

6 The build date is mentioned immediately below the download link itself. Although listed as daily builds, the average build frequency is closer to “once every 3-4 days”.

 

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.
    For example, if the file already contains “disable_mode_changes”, you would edit the first line to read:
    disable_mode_changes disable_gamma
  • Check that !Boot.Loader contains a file called “CMOS”. If it doesn’t exist, use the *SaveCMOS command to create it:
    *SaveCMOS !Boot.Loader.CMOS
  • Check that “CONFIG/TXT” (inside !Boot.Loader) contains – at minimum – the following lines:
    fake_vsync_isr=1
    framebuffer_swap=0
    gpu_mem=64
    init_emmc_clock=100000000
    ramfsfile=CMOS
    ramfsaddr=0x508000
    kernel=RISCOS.IMG
    If any lines are missing, you should add them. Do not remove any entries at this stage.
  • Copy the existing versions of RISCOS/IMG, BOOTCODE/BIN, START/ELF and FIXUP/DAT from !Boot.Loader to another location, in case you need to regress to the old ROM version.

 

Installing the 5.27 ROM

  • Enter the *Unplug command. This should report “No modules are unplugged”. If it does list any unplugged modules, enter *RMReinit commands for each unplugged module.
    For example, if the GPIO module is unplugged, you should enter:
    *RMReinit GPIO
    Please note that you must RMReinit every unplugged module, as the order of modules in the ROM may have changed (which could cause the wrong module to be unplugged).
  • Install the updated firmware (BOOTCODE/BIN, START/ELF, FIXUP/DAT) into !Boot.Loader.
  • Install the Beta ROM (RISCOS/IMG) into !Boot.Loader.
  • Reboot.

 

After rebooting on RISC OS 5.27

  • Go to !Boot.Choices.Boot.Predesk and delete the !!ZeroPain directory (if present). If you want to continue using ZeroPain, install the latest version from the Beta ROM archive. Note that RISC OS 5.27 will run happily without ZeroPain.
  • If you were temporarily loading revised versions of unplugged modules, remove them from your disc image. The RISC OS 5.27 ROM contains the latest versions of all modules (and if you followed the instructions above there are no longer any modules unplugged) so there should be no need to softload any of these modules.
  • 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.7
  • If you want to use EDID8 but previously added “disable_mode_changes” to CMDLINE/TXT, now is the time to remove it. Your CMDLINE/TXT should now read:
    disable_gamma
  • If you have upgraded from RC14 or earlier, you may want to edit CONFIG/TXT to remove any no-longer-needed entries (e.g. “hdmi_group” and “hdmi_mode” are only necessary if you have specified “disable_mode_changes” in CMDLINE/TXT).

7 If you have upgraded from RC10 or earlier, none of your old “saved CMOS” files will work at RISC OS 5.27, so you will need a fresh backup anyway.

8 You cannot use EDID if you also want to use AnyMode. There are other edge cases (e.g. the Pi-Top v1) where custom monitor settings are preferable to EDID.

 

Common problems with the upgrade

  • The mouse pointer is visible but the rest of the screen is black (either on boot or when selecting a 256-colour screen mode)
    You upgraded the ROM but didn’t upgrade the firmware (bootcode.bin, start.elf, fixup.dat).
  • Monitor doesn’t display a picture on boot
    EITHER: You didn’t set MonitorType and WimpMode to “Auto”,
    OR: you didn’t put “disable_gamma” on the first line of cmdline.txt.
  • Desktop is displayed at a lower resolution than usual
    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”.
  • Configuration changes don’t survive a reboot
    (1) CONFIG/TXT (inside !Boot.Loader) may be missing the lines that load the CMOS file on boot. Check that the following lines are present:
    ramfsfile=CMOS
    ramfsaddr=0x508000
    (2) 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:
    *SaveCMOS !Boot.Loader.CMOS
  • Unexpected behaviour in applications after installing the 5.27 ROM
    • 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, there may be a bug in the specific ROM build you chose, in which case you should replace the ROM with another 5.27 daily build to see if that is any better.
    • A third possibility is that 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).

 


Revised on December 15, 2019 09:27:35 by Stuart Painting (5389)? (46.69.191.41)
Edit | Back in time (3 revisions) | See changes | History | Views: Print | Source

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys