The OS Installer configuration manual
Type: objectThe 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"
The 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
Each item of this array must be:
{ "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.
Each item of this array must be:
"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"
[ { "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.
Each item of this array must be:
{ "description": "Board eMMC disk", "targetDev": "/dev/mmcblk0" }
"Board eMMC disk"
The block device that will be erased before flashing.
"/dev/mmcblk0"
[ { "description": "Board eMMC disk", "targetDev": "/dev/mmcblk0" } ]
The flash entry is an array of images and target devices to be flashed.
Each item of this array must be:
{ "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"
[ { "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.
Each item of this array must be:
"/dev/mmcblk0p1"
"/dev/mmcblk0p6"
[ "/dev/mmcblk0p1", "/dev/mmcblk0p6" ]
The 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.
Each item of this array must be:
{ "targetDev": "/dev/mmcblk0" }
The block device whose backup GPT table will be fixed.
"/dev/mmcblk0"
[ { "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.
Each item of this array must be:
{ "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
[ { "targetDev": "/dev/mmcblk0", "partNum": 6 } ]
The extract entry is an array of archives to extract to the specified target partitions.
Each item of this array must be:
{ "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.gz suffix.
"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"
[ { "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.
Each item of this array must be:
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."
[ { "action": "showMessage", "message": "Installation is complete. Remove USB / SD storage and press OK when done to reboot." }, { "action": "reboot" } ]