Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Board Detection

Guilherme Paes edited this page Mar 15, 2016 · 24 revisions

In order to discover the underlying board, Soletta searches for the board name in the following places in the listed order:

  • SOL_BOARD_NAME environment variable (Linux)
  • BOARD_NAME value configured during the build
  • Detect the board by processing the rules of files found in PKGSYSCONFDIR/boards and SOL_DATADIR/boards (Linux)
    • Default folders: '/etc/soletta/boards' and '/usr/share/soletta/boards'
    • '99_board_detect.json' that is shipped with Soletta has rules for some boards like Intel Edison, Intel Galileo, Intel Minnowboard Max and Raspberry Pi

Board Detection File

Board detection files are JSON files that are in compliance with this json schema and allows one to describe a set of rules that are used to identify a given board. In general, the file is an array of 'boards', on which each element is a 'board definition' (or 'board entry'). Soletta traverses the list until a successful validation occurs and the order of the boards listed matters so pay close attention to use this fact in your favor.

Board Definition

A 'board definition' is composed by the board 'name' and a 'validation array'. A successfully validation occurs when each 'rule' in the 'validation array' succeed. Than, 'name' string is used by Soletta as the current board name.

Validation Rule

A 'validation rule' or just 'rule' has three parts: file_path, match array, dont_match array. Only 'file_path' is required and in this case a rule succeed if the file exists.

'match' is an array of regular expressions that should have at least one match in the file pointed by 'file_path'. While 'dont_match' is the same except that the expressions cannot match the content of the file.

Clone this wiki locally