RISC OS Open

RISC OS  OPEN


A fast and easily customised operating system for devices using ARM processor cores.

Documentation: Using the Cortex-A8 port

Getting a ROM image and !Boot sequence

The first thing to do is obviously to get a ROM image. If you want to build one yourself, view the instructions on this page. If you want to use a prebuilt ROM image, you can download one from this page

You may also want to download the HardDisk4 zipfile which contains the RISC OS 5 !Boot sequence and other utilities.

Running a build on a beagleboard

There are two ways to run RISC OS on a beagleboard – the easy way and the hard way. If you get stuck, it may be worth reading over the official Beagleboard rev B/C validation/x-loader & u-boot upgrade instructions

The easy way

The easy way involves placing the ROM image on a FAT-formatted SD card along with a u-boot boot script.

  1. First make sure that you’re using a version of u-boot that supports boot scripts (e.g. version 2009.01 or above). If not, see below for instructions on how to update.
  2. Grab a blank SD card and add the following files:
    1. The beagleboard u-boot boot script from the boot script archive renamed as ‘boot.scr’ (Note: For versions of u-boot before 2009.01 the script may have to be named ‘reset.scr’)
    2. Your RISC OS ROM image, renamed as ‘riscos’
  3. Insert the card into your beagleboard and power on. If all goes well RISC OS should boot. If not then it’s possible you’ve changed your u-boot environment variables to disable boot scripts.

When you want to update the RISC OS ROM image, all you need to do is replace the ROM file on the card.

Updating u-boot and x-loader

If you don’t have a suitable version of u-boot in NAND, you can update to a new one using the following steps. Note that these steps are suitable for both revision B & C boards.
  1. Format an SD card so it can be understood by the OMAP boot ROM. Note that this will have to be a 4-bit, 3V card.
    1. Windows users can use this Windows-only formatter utility, which only understands USB SD card readers, to format the card to FAT32. Note that the standard Windows format might not do the trick, hence the suggestion of this utility in most beagle guides.
    2. Linux users can use fdisk or gparted to format the card. All it needs to be is a bootable FAT32 partition. There’s an fdisk guide here and a gparted guide here (although that guide also details creating an ext3 partition for linux)
  2. Copy the following files to the card, using the indicated names, in the following order:
    1. MLO
    2. u-boot.bin
    3. u-boot-f.bin
    4. boot.scr
    5. x-load.bin.ift
  3. Insert the card into the beagleboard
  4. With the USER button held down, turn the power on.
  5. Over the serial TTY you should then see status messages similar to those shown here as x-loader and u-boot are replaced.
  6. Enter ‘saveenv’ to write the default environment variables to NAND (else you’ll keep getting ‘bad CRC or NAND’ warnings on boot)

The hard way

There are actually three hard ways – manual booting, booting as a uImage, and booting without u-boot.

Hard way 1 – Manual booting

  1. Stick the RISC OS ROM image on an SD card.
  2. Turn on your beagleboard and get to a u-boot prompt.
  3. Enter the following to load and boot the ROM image (assuming it’s called ‘riscos’)
    mmcinit;fatload mmc 0:1 0x80000000 riscos;go 0x80000000

Hard way 2 – Booting as a uImage

A uImage is an operating system kernel with a u-boot header attached, containing information such as the load & execution address of the image, the operating system name and version contained within, etc. To boot RISC OS as a uImage, follow the following steps:

  1. Get yourself a copy of the u-boot mkimage tool.
  2. Transform the raw RISC OS ROM image into a u-boot uImage:
    mkimage -A arm -O linux -T kernel -C none -a 0x81000000 -e 0x81000040 -n "RISC OS" -d riscos uImage.bin
    (Assuming the ROM image is named ‘riscos’)
  3. Copy the uImage.bin onto a blank SD card
  4. Place the card in your beagleboard, turn the power on, and RISC OS should boot. If not then it’s possible that you’ve changed your u-boot environment variables to not automatically load kernels from SD cards, or you simply don’t have x-loader/u-boot in NAND.

When you want to upgrade your RISC OS ROM, you’ll obviously have to go through the mkimage step again. Technically this uImage could also be written to NAND and booted from there, but you’ll have to be careful with the NAND boot commands since the default only loads 4MB of data and the uImage will be slightly larger than that.

Hard way 3 – Booting without u-boot

Currently the only way to boot without u-boot is to get x-loader to boot your ROM image directly. However currently there is a bug in the RISC OS video driver which will prevent video output from working unless the ROM is loaded via u-boot.

If you’ve got a ‘new’ version of x-loader in your NAND which supports automatic loading of u-boot from SD cards (e.g. x-loader version 1.4.2 or above) then all you need to do is copy the RISC OS ROM image to an SD card and name it as ‘u-boot.bin’.

If you’ve got an older version of x-loader, and don’t feel like upgrading, then you’ll have to create a bootable SD card and use that:
  1. First you need to format the card correctly so it can be understood by the OMAP boot ROM.
    1. Windows users can use this Windows-only formatter utility, which only understands USB SD card readers, to format the card to FAT32. Note that the standard Windows format might not do the trick, hence the suggestion of this utility in most beagle guides.
    2. Linux users can use fdisk or gparted to format the card. All it needs to be is a bootable FAT32 partition. There’s an fdisk guide here and a gparted guide here (although that guide also details creating an ext3 partition for linux)
  2. Next copy the ‘MLO’ file to the card. This is a copy of x-loader that’s loaded by the boot ROM. If you don’t have a copy, you should be able to grab a suitable one from here
  3. Then copy the RISC OS ROM image, as u-boot.bin
  4. You should then be able to put the SD card into your beagleboard and reboot with the user button held down to force a boot from the SD card slot.

Running a build on a DevKit8000

TODO - someone who owns a DevKit8000 needs to fill this section in! In general, the steps should be roughly the same as for a beagleboard, except a DevKit8000-specific version of u-boot and/or x-loader will be required, and the DevKit8000-specific boot script

A quick up and running way for the DevKit8000.

  1. Format a device with !SCSIForm and copy the contents of the HardDisk4 archive to it.
  2. Connect it to the board.
  3. Copy a ROM image to an SD card and name it “riscos”.
  4. Place card into slot on board.
  5. Connect board serial to your terminal program.
  6. Boot board.
  7. Press any key to interupt boot sequence.
  8. Enter the following three lines at the prompt.
    1. OMAP3 Devkit8000 # setenv bootcmd ‘mmcinit;fatload mmc 0:1 80000000 riscos;go 8000004’ [return]
    2. OMAP3 Devkit8000 # saveenv [return]
This sets the board to output the video to the HDMI connector, reads the file “riscos” from the SD card into memory, then runs it. If all goes well, you will then drop into the Supervisor prompt. Then type
  1. SCSI [return]
  2. !Boot [return]

Hopefully it will then boot to the desktop !! To update the ROM, just copy the new image to the SD card

Running a build under QEMU

Note that no guarantee is made of the suitability of QEMU to run the current version of OMAP3 RISC OS. At the time of writing QEMU’s OMAP3 emulation capability is rather poor, and the last time running a build under QEMU was attempted, both emulator patches and RISC OS source changes were required.

  1. Dowload the source code for the QEMU variant of your choice (either QEMU-OMAP3 or the more actively developed Maemo QEMU)
  2. Apply the appropriate patch to the source, to add support for palettised framebuffers and some missing CP15 registers: QEMU-OMAP3 or Maemo QEMU
    1. To apply the patch, use the ‘patch’ Linux tool – e.g. ‘patch -u -p1 -i patchfile’ from within the main source folder
  3. Configure and compile QEMU
    1. ./configure --target-list=arm-softmmu
    2. make
  4. Even if you’re not using QEMU-OMAP3, you’ll want to download its source code so you can get the bb_nandflash.sh and bb_nandflash_ecc scripts that are used to build NAND images.
  5. Check that QEMU is working by following the instructions in the QEMU-OMAP3 user manual to run the emulator using the BeagleBoard test Linux kernel. If you don’t want to do this, at least make sure you grab the x-loader binary (from image-v0.01.tar.bz2)
  6. If everything is working OK, you can now try running a RISC OS ROM image.
    1. Use the bb_nandflash.sh and bb_nandflash_ecc scripts to build a NAND image, containing the RISC OS ROM image in place of u-boot
    2. Launch QEMU with ’./qemu-system-arm -M beagle -mtdblock beagle-nand.bin’

To make things easier, you can create a script that will build the NAND image for you:

#!/bin/bash
rm -f beagle-nand.bin
./bb_nandflash.sh x-load-bin.ift beagle-nand.bin x-loader
./bb_nandflash.sh riscos.rom beagle-nand.bin u-boot
./bb_nandflash_ecc beagle-nand.bin 0x0 0xe80000

The script will put the ‘riscos.rom’ ROM image into a NAND image, ‘beagle-nand.bin’, suitable for use by QEMU.

   .