The OS Installer configuration manual describes all required and optional entries of the installation.json
configuration file. The related installation_schema.json
schema file can be used to validate a custom configuration JSON, for example using the jsonschema Python module.
{
"logging": {
"logFile": "installer.log"
},
"backup": [
{
"description": "Configuration data",
"backupDev": "/dev/mmcblk0p6",
"backupFolders": [
"folder/subfolder/"
],
"backupRequiredFreeBytes": 104857600,
"backupName": "configuration_data",
"restoreDev": "/dev/disk/by-partlabel/data"
},
{
"description": "Log files",
"backupDev": "/dev/mmcblk0p5",
"backupFolders": [
"logs/"
],
"backupRequiredFreeBytes": 524288000,
"backupName": "device_logs"
}
],
"erase": [
{
"description": "Board eMMC disk",
"targetDev": "/dev/mmcblk0"
}
],
"flash": [
{
"description": "Embedded OS",
"srcImage": "embedded-os_0.1.wic.gz",
"targetDev": "/dev/mmcblk0"
}
],
"check-partitions": {
"scan": true,
"targetPartitions": [
"/dev/mmcblk0p1",
"/dev/mmcblk0p6"
]
},
"gpt-fix-backup": [
{
"targetDev": "/dev/mmcblk0"
}
],
"grow-partitions": [
{
"targetDev": "/dev/mmcblk0",
"partNum": 6
}
],
"extract": [
{
"description": "Application data",
"archiveName": "application_data",
"extractDev": "/dev/disk/by-partlabel/app"
}
],
"finish": [
{
"action": "showMessage",
"message": "Installation is complete. Remove USB / SD storage and press OK when done to reboot."
},
{
"action": "reboot"
}
]
}
The logging entry enables logging to file. On-screen logging is enabled regardless of this entry.
{
"logFile": "installer.log"
}
The name of the log file to create.
"installer.log"
Additional Properties of any type are allowed.
Type: objectThe backup entry is an array that can be used to setup backup of folders to archive files before flashing and restore of archive files after flashing
{
"description": "Configuration data",
"backupDev": "/dev/mmcblk0p6",
"backupFolders": [
"folder/subfolder/"
],
"backupRequiredFreeBytes": 104857600,
"backupName": "configuration_data",
"restoreDev": "/dev/disk/by-partlabel/data"
}
The description of the stuff that will be backup
"Configuration data"
The block device partition where the files to backup reside.
"/dev/mmcblk0p6"
An array of folders to include in the backup archive. The path should be relative to the root of the block device partition that contains the files to backup.
"folder/subfolder/"
[
"folder/subfolder/"
]
Required free space in bytes in the FFLASH partition to host the backup archive file.
104857600
The backup archive file name.
"configuration_data"
The block device partition where the backup archives will be restored. The files will be restored to the same relative path of the backup phase. If this entry is not specified, the backup will not be restored.
"/dev/disk/by-partlabel/data"
Additional Properties of any type are allowed.
Type: object[
{
"description": "Configuration data",
"backupDev": "/dev/mmcblk0p6",
"backupFolders": [
"folder/subfolder/"
],
"backupRequiredFreeBytes": 104857600,
"backupName": "configuration_data",
"restoreDev": "/dev/disk/by-partlabel/data"
},
{
"description": "Log files",
"backupDev": "/dev/mmcblk0p5",
"backupFolders": [
"logs/"
],
"backupRequiredFreeBytes": 524288000,
"backupName": "device_logs"
}
]
The erase entry specifies which block device will be erased before flashing.
{
"description": "Board eMMC disk",
"targetDev": "/dev/mmcblk0"
}
"Board eMMC disk"
The block device that will be erased before flashing.
"/dev/mmcblk0"
Additional Properties of any type are allowed.
Type: object[
{
"description": "Board eMMC disk",
"targetDev": "/dev/mmcblk0"
}
]
The flash entry is an array of images and target devices to be flashed.
{
"description": "Embedded OS",
"srcImage": "embedded-os_0.1.wic.gz",
"targetDev": "/dev/mmcblk0"
}
"Embedded OS"
The file name of the image that will be flashed.
"embedded-os_0.1.wic.gz"
The block device where the image will be flashed to.
"/dev/mmcblk0"
Additional Properties of any type are allowed.
Type: object[
{
"description": "Embedded OS",
"srcImage": "embedded-os_0.1.wic.gz",
"targetDev": "/dev/mmcblk0"
}
]
The check-partitions entry allows to wait for the listed partitions to be available after the flash process is complete.
{
"scan": true,
"targetPartitions": [
"/dev/mmcblk0p1",
"/dev/mmcblk0p6"
]
}
Force a rescan of the partition tables.
true
A list of partitions that will be checked after flashing. The OS Installer will wait for their availability.
"/dev/mmcblk0p1"
"/dev/mmcblk0p6"
[
"/dev/mmcblk0p1",
"/dev/mmcblk0p6"
]
Additional Properties of any type are allowed.
Type: objectThe gpt-fix-backup entry is an array of block devices that need fixing of the backup GPT table. Unless the exact target block device is known beforehand the backup GPT table, which resides at the end of the disk, needs to be fixed.
{
"targetDev": "/dev/mmcblk0"
}
The block device whose backup GPT table will be fixed.
"/dev/mmcblk0"
Additional Properties of any type are allowed.
Type: object[
{
"targetDev": "/dev/mmcblk0"
}
]
The grow-partitions entry is an array of partitions that will be grown to fill all the available following free disk space.
{
"targetDev": "/dev/mmcblk0",
"partNum": 6
}
The block device where the partition that will be grown resides.
"/dev/mmcblk0"
The number of the partition that will be grown.
6
Additional Properties of any type are allowed.
Type: object[
{
"targetDev": "/dev/mmcblk0",
"partNum": 6
}
]
The extract entry is an array of archives to extract to the specified target partitions.
{
"description": "Application data",
"archiveName": "application_data",
"extractDev": "/dev/disk/by-partlabel/app"
}
The description of the contents of the archive that will be extracted.
"Application data"
The file name of the archive to extract, without the tar file extension suffix. The following archive types will be autodetected: tar.gz
, tar
, tar.bz2
, tar.xz
.
"application_data"
The block device partition where the archive will be restored. The files will be extracted in the root folder of the partition, respecting the internal directory structure of the archive.
"/dev/disk/by-partlabel/app"
Additional Properties of any type are allowed.
Type: object[
{
"description": "Application data",
"archiveName": "application_data",
"extractDev": "/dev/disk/by-partlabel/app"
}
]
The finish entry is an array of actions that will be performed at the end of the flash process.
The message to show in a prompted dialog when the flash process is complete.
{
"action": "showMessage",
"message": "Installation is complete. Remove USB / SD storage and press OK when done to reboot."
}
The type of action to perform. Valid actions are: showMessage or reboot.
"showMessage"
The message that will be prompted at the end of the flash.
"Installation is complete. Remove USB / SD storage and press OK when done to reboot."
Additional Properties of any type are allowed.
Type: object[
{
"action": "showMessage",
"message": "Installation is complete. Remove USB / SD storage and press OK when done to reboot."
},
{
"action": "reboot"
}
]
Additional Properties of any type are allowed.
Type: object