The OS Installer configuration manual

Type: object

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.


Example:

{
    "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"
        }
    ]
}

Type: object

The logging entry enables logging to file. On-screen logging is enabled regardless of this entry.


Example:

{
    "logFile": "installer.log"
}

Type: string

The name of the log file to create.


Example:

"installer.log"

Additional Properties of any type are allowed.

Type: object

Type: array

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:


Type: object

Example:

{
    "description": "Configuration data",
    "backupDev": "/dev/mmcblk0p6",
    "backupFolders": [
        "folder/subfolder/"
    ],
    "backupRequiredFreeBytes": 104857600,
    "backupName": "configuration_data",
    "restoreDev": "/dev/disk/by-partlabel/data"
}

Type: string

The description of the stuff that will be backup


Example:

"Configuration data"

Type: string

The block device partition where the files to backup reside.


Example:

"/dev/mmcblk0p6"

Type: array

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:


Example:

[
    "folder/subfolder/"
]

Type: integer Default: 0

Required free space in bytes in the FFLASH partition to host the backup archive file.


Example:

104857600

Type: string

The backup archive file name.


Example:

"configuration_data"

Type: string

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.


Example:

"/dev/disk/by-partlabel/data"

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "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"
    }
]

Type: array

The erase entry specifies which block device will be erased before flashing.

Each item of this array must be:


Type: object

Example:

{
    "description": "Board eMMC disk",
    "targetDev": "/dev/mmcblk0"
}

Type: string

Example:

"Board eMMC disk"

Type: string

The block device that will be erased before flashing.


Example:

"/dev/mmcblk0"

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "description": "Board eMMC disk",
        "targetDev": "/dev/mmcblk0"
    }
]

Type: array

The flash entry is an array of images and target devices to be flashed.

Each item of this array must be:


Type: object

Example:

{
    "description": "Embedded OS",
    "srcImage": "embedded-os_0.1.wic.gz",
    "targetDev": "/dev/mmcblk0"
}

Type: string

Example:

"Embedded OS"

Type: string

The file name of the image that will be flashed.


Example:

"embedded-os_0.1.wic.gz"

Type: string

The block device where the image will be flashed to.


Example:

"/dev/mmcblk0"

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "description": "Embedded OS",
        "srcImage": "embedded-os_0.1.wic.gz",
        "targetDev": "/dev/mmcblk0"
    }
]

Type: object

The check-partitions entry allows to wait for the listed partitions to be available after the flash process is complete.


Example:

{
    "scan": true,
    "targetPartitions": [
        "/dev/mmcblk0p1",
        "/dev/mmcblk0p6"
    ]
}

Type: boolean Default: false

Force a rescan of the partition tables.


Example:

true

Type: array

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:


Example:

[
    "/dev/mmcblk0p1",
    "/dev/mmcblk0p6"
]

Additional Properties of any type are allowed.

Type: object

Type: array

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:


Type: object

Example:

{
    "targetDev": "/dev/mmcblk0"
}

Type: string Default: ""

The block device whose backup GPT table will be fixed.


Example:

"/dev/mmcblk0"

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "targetDev": "/dev/mmcblk0"
    }
]

Type: array

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:


Type: object

Example:

{
    "targetDev": "/dev/mmcblk0",
    "partNum": 6
}

Type: string

The block device where the partition that will be grown resides.


Example:

"/dev/mmcblk0"

Type: integer

The number of the partition that will be grown.


Example:

6

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "targetDev": "/dev/mmcblk0",
        "partNum": 6
    }
]

Type: array

The extract entry is an array of archives to extract to the specified target partitions.

Each item of this array must be:


Type: object

Example:

{
    "description": "Application data",
    "archiveName": "application_data",
    "extractDev": "/dev/disk/by-partlabel/app"
}

Type: string

The description of the contents of the archive that will be extracted.


Example:

"Application data"

Type: string

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.


Example:

"application_data"

Type: string

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.


Example:

"/dev/disk/by-partlabel/app"

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "description": "Application data",
        "archiveName": "application_data",
        "extractDev": "/dev/disk/by-partlabel/app"
    }
]

Type: array

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:


Type: object

The message to show in a prompted dialog when the flash process is complete.


Example:

{
    "action": "showMessage",
    "message": "Installation is complete. Remove USB / SD storage and press OK when done to reboot."
}

Type: string

The type of action to perform. Valid actions are: showMessage or reboot.


Example:

"showMessage"

Type: string

The message that will be prompted at the end of the flash.


Example:

"Installation is complete. Remove USB / SD storage and press OK when done to reboot."

Additional Properties of any type are allowed.

Type: object

Example:

[
    {
        "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