Skip to content

Safecor core

Tristan Israël edited this page Jun 23, 2026 · 2 revisions

This page describes the Safecor core

Safecor is made of different scripts (shell and python) that configure the system to match the topollogy, and orchestrate the start and the behaviour of the system.

All the scripts come from the package safecor-core.

Scripts list

Type Name Description
Shell create-local-alpine-repository.sh Creates a local Alpine repository that contains all packages needed in the different DomUs. It is signed with a local temporary key.
Shell create-tty-terminal.sh Creates a TTY terminal for the remote serial console. The terminal is created only when the parameter DEBUG=ON is present in the kernel command line.
Shell create-tty-tunnel.sh Creates a tunnel for the TTY terminal between sys-usb and a local tty temporary device. The tunnel is created only when the parameter DEBUG=ON is present in the kernel command line.
Shell finish-core-init.sh Execute different actions at the end of the system boot. See more.
Shell generate-pgp-keys.sh Generates a local and temporary PGP key pair for the local Alpine repository signature.
Shell get-sys-gui-domid.sh Returns the ID of the XEN sys-gui domain.
Shell integrity-setup.sh Configure and start the system integrity mechanism.
Shell post-install.sh Execute different actions at the end of the first install of the system
Shell provision-domain.sh Creates a domain's environement by preparing an ISO image for the boot and a specific apkovl file to configure its boot.
Shell reindex-and-sign-repository.sh After packages have been added to the local repository, this script is called to reindex and sign the local repository files.
Shell set-xenstore-permissions.sh Sets the XenStore permissions.
Shell setup-alpine-repositories.sh Configures the Dom0 Alpine repository
Shell setup-xen-environment.sh Configures the XEN environement with vanilla ISO images, Linux kernel, modloop, etc. for the DomU's boot
Shell show-logs.sh When in debug mode, this script shows all the messages sent on the messaging bus filtered on the topic `system/events.
Shell show-messages.sh When in debug mode, this script shows all the messages sent on the messaging bus, not filtered.
Shell start-business-domain.sh Starts a business domain.
Shell start-mqtt-logger.sh Starts the MQTT logger. All messages sent on the messaging bus will be written in the system's log file.
Shell start-sys-gui.sh Starts the GUI Domain
Shell start-sys-usb.sh Starts the USB Domain
Python create-domains.py Creates all the Domains configurations by reading the topology. 
Python create-mqtt-tunnels.py Creates tunnels between the Domains messaging sockets and the MQTT broker. 
Python create-splash.py Creates a well-sized image for the system splash screen.
Python generate-x-config.py Creates a configuration file for Xorg 
Python get-total-memory.py Returns the total memory of the system 
Python orchestrator.py Starts Safecor's orchestrator. See more 
Python rotate-screen.py Rotates the screen depending on the value defined in the topology. 
Python start-safecor-core-controller.py Starts the Safecor's main controller. See more 
Python write-screen-information-to-xenstore.py Writes context information (screen dimension, rotation, etc) in the XenStore to share with the Domus. 

finish-core-init.sh

orchestrator.py

start-safecor-core-controller.py

Services list

This section describes the services used in Safecor core.

Service Description
create-mqtt-tunnels Creates tunnels for messaging between the Domains and the MQTT broker
debug Starts the debugging facility if activated explicitely. See debugging
libvirtd The libvirt daemon that acts as a proxy between the core and the XEN hypervisor
mosquitto MQTT broker for the messaging system
orchestrator Starts the orchestrator for Safecor Domains. It starts and monitors the Domains.
safecor-core-controller This is the core's controller that handles the messages for the core.
splash Starts a splash screen during the second phase of the boot process.
start-x Starts an Xorg server for the graphical user interface
syslog Logging facility

Clone this wiki locally