SDK templates packages#

Template packages are used as a base to generate SimpleSwitch™ packages using the Generate a SimpleSwitch™ package.

A few of them already exist, but you can modify them or create your own.

Creating a new package template is as easy as creating any Yocto image, with two extra constraints:

  • There name must be in the format simpleswitch-NAME-template.bb, where NAME will be used with the --template parameter of the package creation script.

  • They must inherit from simpleswitch-package-template class.

Here is the code of simpleswitch-flutter-template.bb the recipe for the flutter template installed in the SDK.

# SPDX-FileCopyrightText: (C) 2022 Avnet Embedded GmbH
# SPDX-License-Identifier: LicenseRef-Avnet-OSS-1.0
LICENSE = "Avnet-OSS-1.0"

inherit simpleswitch-package-template

IMAGE_INSTALL += "flutter-wayland-client flutter-engine flutter-runner"
SIMPLESWITCH_INSTALL_DEJAVU_FONTS_BASE = "1"
SIMPLESWITCH_INSTALL_DISPLAY_DRIVERS = "1"