Giter Site home page Giter Site logo

johnmcculloch1 / risc_os_linux_source Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timothyebaldwin/risc_os_linux_source

0.0 0.0 0.0 36.78 MB

Linux port of RISC OS. Please note that the Linux2-rebased is a rebased copy of Linux2 and will be rebased often.

Makefile 2.35% Perl 1.64% Shell 0.08% Awk 0.03% C 94.53% Forth 0.16% F# 0.30% HTML 0.31% Roff 0.47% C++ 0.13%

risc_os_linux_source's Introduction

Linux port of RISC OS

It is currently being discussed on the RISC OS Open website. There is no sound support at present, and is incomplete in other ways. You should not reguard any new APIs to be stable.

It should run on a 32-bit capable ARM Linux system natively, or slow on other Linux systems with the aid of a slightly modified QEMU. Unfortunately server class ARM hardware is typically 64-bit only.

The RISC OS "ROM" Image is a Linux executable.

If you run RISC OS directly then, unlike virtual machines such as RPCEmu, there is no restriction on what RISC OS programs can do to the Linux environment beyond that provided by Linux. If you use the provided scripts then RISC OS should be prevented from causing harm.

You can disable the secure sandbox by seting the environment variable RISC_OS__INSECURE to YES when running run_RISC_OS, for example:

RISC_OS__INSECURE=YES ./run_RISC_OS

RISC OS Open Limited’s DDE is required to build RISC OS, this is proprietary software that may be brought from RISC OS Open Limited

Compiling on RISC OS

This Linux port of RISC OS can be built in similar fashion to the traditional method as documented on the RISC OS website, it is not necessary to run InstallTools as the relevant files will be accessed from the DDE without copying. However this will not build the SDL front-end which connects RISC OS to the Linux graphics system, without it RISC OS is limited to a text only interface.

Compiling on Linux

It can also be built on Linux using the Makefiles, which runs the majority of the build on RISC OS, by default using a binary of the Linux port that is automatically downloaded from github and RISC OS Open Limited’s DDE in ../DDE. Allegro (for RPCEmu), Bash, Bubblewrap, GCC, GNU Make, Libattr, Libseccomp and SDL 2 are also required by Makefiles and support code. Either Bubblewrap must be setuid root, or unprivileged user namespaces must be enabled, or insecure mode enabled.

On Debian and Ubuntu the dependencies are in the packages "bash bubblewrap gcc g++ make liballegro4-dev libattr1-dev libpixman-1-dev libseccomp-dev libsdl2-dev", on Fedora the dependencies are in the packages "allegro-dev bash gcc gcc-c++ glib2-devel libattr-devel libseccomp-devel patch pixman-devel SDL2-devel".

Additional packages are required for building QEMU.

The following variables are accepted by the Makefiles:

Variable
ACORN_CPP Path to AcornC.C++ diectory of DDE, default is ../DDE/AcornC.C++
TARGET What to build, such as IOMD32 for a RiscPC/A7000 ROM image. Only Linux and IOMD32 are supported by this source.
METHOD How to build, valid values are rpcemu and Linux.
JOBS Number of CPUs to use for building, if 0 or unset build sequentially.
LINUX_ROM Location of Linux RISC OS executable to use for building.
QEMU Location of qemu-arm executable.
PHASES Space separated list of build phases to run.
INSECURE Set to YES to enable insecure mode.

The following targets are provided by the Makefiles:

Target Action
build Build RISC OS (or some other thing).
check Build and test RISC OS.
fast Runs only rom_install and join phases and tests.

This following items will be download to ~/Downloads if needed:

  • RISC OS 5.22 Disc Archive
  • RISC OS 5.22 IOMD ROM Image
  • RPCEmu 0.8.15
  • QEMU 3.0.0

IXFS

File type handling

Unlike other software IXFS by default stores RISC OS file types in POSIX extended attributes, by default only writing extensions if writing a POSIX extended attribute fails. How IXFS handles file types can be configured using the special field.

Special Field Mode Name Write extension Read and strip extension Read extended attribute
R Raw Never No Yes
P Pure Remove if wrong Yes Only if no extension
Normal If needed Yes Only if no extension
W Write Always Yes Only if no extension
X Exclusive Always Yes Never

Case sensitivity

As is standard for RISC OS filing systems IXFS is case insensitive by default, if 2 filenames only differ by case it is unpredictable which file is acted upon unless the exact filename is provided to IXFS. Case sensitivity may be enabled by adding "C" to the special field.

Linux RISC OS command line options

Option Action
--abort-on-input Abort on debug terminal input
--help Display help message
--isreboot Indicate hard reset to RISC OS (not power on)
--nvram FILE Filename for nvram
--noaborts Disable aborts - RISC OS will die with SIGSEGV
--noseccomp Disable seccomp support
--notimers Disable HAL timers

Linux RISC OS error codes

Return Code Error
100 Reboot requested
101 Memory mapping failed, try running "sudo sysctl vm.mmap_min_addr=8192"
102 Unrecognised command line option
103 Unable to open NVRAM file.
104 Permission denied when attempting to open NVRAM file.
105 Read only filesystem when attempting to open NVRAM file.
106 Unable to read size of NVRAM file.
107 Unable to enlarge NVRAM file.
108 Failed to reserve address space.
109 Unable to fork
110 Parent process exited (no message)
111 Cloning ptrace thread failed
112 Failed to set alternative signal stack.
113 SWI intercept failure
114 RISC OS kernel returned to HAL
115 Interrupt test failed
116 Exec failed
117 HAL_DebugRX called and --abort-on-input given.

To do List

  • Complete the key map.
  • Fix the realtime clock.
  • Make data aborts raise errors.
  • Support writing timestamps in IXFS.
  • Support reading timestamps in IXFS to centisecond resolution.
  • Test timestamps.
  • Add sound modules.
  • Add sound output.
  • Officially allocate names and SWI numbers etc.
  • Fix failure to truncate of unbuffered files when opened for output, and associated race condition.
  • Fix spurious calls of FSEntry_Args 6 (flush file to disc) when files are closed.
  • Perform proper error handling in IXFS.
  • Split video keyboard and mouse driver into separate module.
  • Detect screen updates to avoid copying full screen 20 times a second.
  • Finish video keyboard and mouse driver.
  • Fix overwriting of ROM image when rebuilding RISC OS, which will cause a crash if the overwritten ROM image is currently being run.
  • Provide a means to run Linux programs.
  • Implement PMP dynamic areas.
  • Replace the changes that are labeled "Hack"
  • Replace the branch table at the beginning of the HAL.
  • Write test cases for VFP errors.
  • Implement VFPSupport.
  • Possibly add a binary release to the ABRelase phase.

risc_os_linux_source's People

Contributors

timothyebaldwin avatar janrinze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.