Introduction
RISC OS Pyromaniac is intended to change its behaviour depending on the needs for the developer or the automation system. To allow this an extensible configuration system is used. The configuration system consists of groups of configurations, and options within those groups. Each option has a single string value to defines its state. Configurations are expressed as a .
-separated string, of group.option
.
Each configuration can be provided with a 'safe' configuration. This configuration is intended to be used when the system is in an open environment where access to the host system is not desirable. It does not guarantee that the user of the guest system will not be able to access the host system, but merely that the settings given restrict that access. When the safe configuration is in use, all configuration changes override the safe configuration. To use the safe configuration the command line option --config-safe
should be used.
A full list of the configuration options is generated at build time.
Command line configuration
The command line tool allows RISC OS Pyromaniac pyromaniac can be configured with the --config
option. Care should be used in changing some values, which may produce a system which RISC OS components cannot use. For example, to change the size of the application space, the following command line might be used:
python pyro.py --config memorymap.appspace_size=12M
- The
--list-config
switch can be used to list all the configuration options available their current settings. - The
--help-config
switch can be used to get more information about what the configuration options do and how they interact with the system.
System variables may be configured with the --set-variable
option, which will define the variables used on startup.
In system configuration
Within RISC OS, the Pyromaniac module provides an interface to access the configuration.
The *PyromaniacConfig
command gives control over the configuration within RISC OS itself.
The module may itself be configured to restruct access to configuration variables, so that the
guest system not expose the host system to attack.
For example, to change the VDU configuration for paged output to wait for a key at the end of a page:
*PyromaniacConfig vdu.paging=console
Help can be obtained with the -help
switch:
*PyromaniacConfig -help vdu
Configuration files
YAML configuration files may be supplied with --config-file
to set up a group of configuration options, modules to load and other settings. These configuration files can contain any of the non-informational command line options.
YAML configuration keys:
modules
: Describes the modules that are present. It may be a list of filenames (which will be used as RMA modules), or a dictionary containing the following keys.rma
: List of module filenames to load into RMA.rom
: List of module filenames to load ingo ROM.pymodule
: List of pymodule filenames or module names to loadinternal
: EitherTrue
to load all internal modules, or a list of the internal module names to load- Module names may include
${VARNAME}
strings which will be substituted for the named environment variable in the invoking system.
config
: A dictionary of configuration settings, for which the key may either be in the form of agroup.name
orgroup
. In the latter case, the value should be a dictionary with the names and values. Configuration values may include${VARNAME}
strings which will be substituted for the named environment variable in the invoking system. There are special configuration keys that may be set:safe
: When set toTrue
, the configuration will default to the settings deemed to be safe for the host system. All other configuration will be applied on top of these settings.
variables
: A dictionary of the variable names and the values that they should be assigned. Variable values may include${VARNAME}
strings which will be substituted for the named environment variable in the invoking system.execute
: A list of dictionaries containing the actions to be executed, usually only one key containing the action name. The available actions can be listed with the--list-actions
switch. The actions in the execution list can be:enter-module
: Module to entercommand
: Command to run (from the RISC OS filesystem, not the native system)run
: File to run (from the host filesystem, not the RISC OS system)system-boot
: Boot RISC OS using the configured boot settings.input
: Text to insert into the input buffer.wait
: Wait for a key to be pressed.reset
: Reset the system.
Example configuration files
Setting some variables, enabling debug and running commands:
%YAML 1.0
---
debug:
- cli
- fsrun
variables:
'Alias$WimpSlot': '||'
execute:
- command: "Dir testcode"
- command: "/test"
Loading modules into ROM, together with the internal Pyromaniac modules, and setting configuration:
%YAML 1.0
---
config:
memorymap.zeropage_enable: yes
memorymap.rom_size: 6M
modules.rominit_noisy: yes
modules:
internal: true
rom:
- modules/BASIC,ffa