Add A New Recipe File

This chapter explains how to write a new recipe file for a platform. If you do not know what a recipe file is and which role it plays in the deployment procedure, please read the chapter Deployment with the Flashtool first. It is also recommended to

Recipe Files Name-Scheme

The name of a recipe file must follow this naming scheme:

{hardware-name}_{identifier}.yml

The name and identifier must not contain underscores, please use dashes instead.

The underscore is used to divide the recipe file name in the two parts platform name and identifier. It is important that the platform name is also registered on the buildserver. You will find the valid platform-strings for your embEDUx system in the User Documentation.

The next example shows how to use this name scheme for a Raspberry Pi. This name scheme is also used in the HTWG setup of embEDUx.

raspberry-pi.yml

raspberry-pi_media-center.yml

The name for a Raspberry Pi in this embEDUx configuration is "raspberry-pi". This name will be used in branches of the git repositories and on the buildbot server to identify a Raspberry Pi.

Recipe Skeletons

For the extensibility of the Flashtool, it provides the possibility to define different recipe skeletons. Each skeleton must have its counterpart implemented in the python code of the Flashtool. By now we support the mmc recipe skeleton which is used in every recipe file on the embEDUx repository.

The recipe skeleton mmc can handle the most deployment procedures for a wide range of embedded hardware. If you need to implement a new recipe skeleton, please read the section How to add a new deployment procedure.

MMC:

This recipe skeleton is used to configure platforms which use a MMC device as storage media. The template below shows, how to state this recipe skeleton in a recipe file.

---

type: mmc

recipe:
    partition_table: #partition table type
    partitions: # list with partition information
        -   name: # label
            size: # size of partition (allowed %/b/kb/mb/gb/)
            fs_type: # filesystem type (e.g. fat32, ext4)
            mount_point: # Mount point in System
            mount_opts:  # Mount options
            flags: # flags for partition
        -   #...
    load:
        Uboot:
            # device: or command:
        Linux_Boot:
            # device: or command:
        Linux_Root:
            # device: or command:
        Linux_Config:
            # device: or command:
        Rootfs:
            # device: or command:
        Misc_Boot:
            # device: or command:
        Misc_Root:
            # device: or command:

Example for a recipe file with a mmc recipe (utilite-pro.yml):

This recipe is also available in the HTWG configuration.

---
type: mmc

recipe:
    partition_table: msdos
    partitions:
        -   name: boot
            size: 100mb
            fs_type: fat32
            mount_point: /boot
            mount_opts:
            flags: lba
        -   name: rootfs
            size: max
            fs_type: btrfs
            mount_point: /
            mount_opts:
            flags: 
    load:
        Uboot:
            command: dd if=${file} of=${device} bs=1K skip=1 seek=1 oflag=dsync
        Linux_Boot:
            device: 0
        Linux_Root:
            device: 1
        Linux_Config:
            device: 1
        Rootfs_Root:
            device: 1
        Rootfs_Portage:
            device: 1

This recipe file will configure the deployment procedure for the utilite-pro as follow: