User Tools

Site Tools


bos:start

Brinkhaus-OS (BOS) is an operating system template that can be used to equip an embedded PC with a real-time operating system used as standard for Brinkhaus projects.

Achieved goals
  • Standardized operating system template for edge PCs
  • Installation using special boot USB sticks; installation as automatic sequence
  • Modified kernel supports real-time behavior of apps
  • Standardized equipping with apps
  • Separation of data/settings/logs supports separate backup of apps
  • Boot stick creation and placement of BOS specific content on boot stick from code management; generation of boot stick image as automatic process
  • Protection of the core system via write protection of the main partition
  • Update with own installer application via A/B partition scheme
Initial setup

The PC to be set up with BOS must be connected to the Internet via DHCP. Before it is supplied with voltage, a USB stick provided by Brinkhaus must be inserted.

If you connect the PC to voltage, you can follow the automatic installation. After that you will have a standardized Edge PC set up as described below.

Operating system base

BOS is based on Debian 10. The system is automatically set up and recorded as described below. A minimal configuration - without graphical user interface - is performed.

The installed kernel was recompiled on the basis the standard Debian kernel sources with the option “PREEMPT”. It thus offers all standard interfaces, but additionally supports the creation of apps with stably reproducible timing. For programmers to achieve this, they must move their real-time tasks to suitable schedulers (in particular SCHED_FIFO).

Access within the system

There are no protections in the system beyond the standard Debian ones. In particular, there is no separation of apps into individual protection areas. Apps, so that they can access hardware, are run as user “root”.

Login

By default, there are two users: root and bos.

Both have the password “bos1234!”. You can log in to the system via SSH. It is not possible to log in directly via SSH as root. Instead you have to login as user bos. After that you can switch to a root shell via su.

Directory structure, partitioning in delivery state
  • 500MB EFI partition
  • 4GB system (mounted on /)
  • 4GB system (mounted on /reserve), used for updates
  • no swap
  • 2GB under /var/bos/apps
  • 2 GB under /var/bos/settings
  • 2 GB under /var/bos/logs

In each of the directories under /var/bos there is one APP_NAME directory per app with APP_NAME as the name of the app.

  • /var/bos/apps/APP_NAME: contains the actual app; at system start /var/bos/apps/APP_NAME/run.sh is executed
  • /var/bos/settings/APP_NAME: contains the settings of the app
  • /var/bos/logs/APP_NAME: contains the logs of the app
Starting apps

Under /var/bos/bin there are three scripts which are relevant for service activities.

  • reInitBosApps.sh : stops all services previously set up by this script. Creates hereafter per directory in /var/bos/apps a SystemD service in the mode “simple”, which starts on startup the script run.sh in the respective directory.
  • stopBosApps.sh: stops all services created with reInitBosApps manually by calling SystemD.
  • startBosApps.sh: starts all services created with reInitBosApps manually by calling SystemD.
Execution of containers

Containers can be a BOS app. For this it is recommended to export the container as a tar file. The tar file should then be placed in the app directory with the Dockerfile. The first step in run.sh is to execute a “docker load -i” on the tar file. Then you can start the container via “docker-compose up”.

Updates of apps and their settings via SFTP

Apps can be written and exchanged directory by directory via SFTP. Also their settings. Using the above scripts, the run-sh of apps can be raised to the status of SystemD services.

bos/start.txt · Last modified: 2021/07/11 15:52 by brinkhaus