I have a BSP from the LDK and want to use it#

I have a BSP from the LDK and want to use it

I have a new BSP from the LDK and want to use it. How do I proceed?

Scotty’s LDK based upgrade

To enable a seamless integration of a LDK based BSP, we need a couple of configuration files

Configuration files

First we will need an empty kas yaml file, e.g. if your MACHINE is called sm2s-newmachine, let’s create it as

snippets/machine/sm2s-newmachine.yml in your BSP repository, with the following content

header:
   version: 17
repos:

Next create the LDK configuration file named snippets/machine/sm2s-newmachine.yml.ldk with the following content

ldk:
   project_id: "<BSP number>"
   branch: "<suggested branch of the LDK>"
   config:
      id: "<BSP number>/msc-ldk-bsp-recipes"
      location: "<BSP number>/msc-ldk-bsp-recipes.git/layers-bsp.csv"
template:
   header:
      version: 17

which is the most basic configuration file.

Now you can run

scotty upgrade <path/to/checkout>/snippets/machine/sm2s-newmachine.yml

and scotty will try to generate a full kas configuration for the BSP

Mirrors

You can instruct scotty to use mirrored repositories instead of sources fetched from gitolite.

Note

Ask for a mirror repository to be created

For that you’ll need to edit snippets/machine/sm2s-newmachine.yml.ldk and add

ldk:
   ldkrepo:
      - id: <name as mentioned in <BSP number>/msc-ldk-bsp-recipes.git/layers-bsp.csv>
        mirror_url: <URL of the mirrored repository>

you can also override the branch selected, which needs to be done when open source repositories are used, e.g.

ldk:
   ldkrepo:
      - id: thirdparty/meta-arm
        mirror_url: https://github.com/avnet-embedded/meta-arm
        branch_override: scarthgap

would refer to https://github.com/avnet-embedded/meta-arm@scarthgap instead of the gitolite repo+tag

Patches

To reference patches you can add to snippets/machine/sm2s-newmachine.yml.ldk

ldk:
   ldkrepo:
      - id: <name as mentioned in <BSP number>/msc-ldk-bsp-recipes.git/layers-bsp.csv>
        mirror_url: <URL of the mirrored repository>
        patches:
         <id of the patch>:
            repo: <repository where the patch is stored>
            path: <path in the repo to the file>
Skip repositories

To skip repositories from being created in the configuration, add to snippets/machine/sm2s-newmachine.yml.ldk

ldk:
   ldkrepo:
      - id: <name as mentioned in <BSP number>/msc-ldk-bsp-recipes.git/layers-bsp.csv>
        skip: true

for instance meta-openembedded, poky and yocto are already referenced by other kas configuration files, hence they should not be configured by a BSP kas configuration file.

Fine tune resulting file

To fine tune the resulting file snippets/machine/sm2s-newmachine.yml, you can add any valid kas configuration to template in snippets/machine/sm2s-newmachine.yml.ldk, e.g.

template:
   header:
      version: 17
   machine: sm2s-newmachine
   repos:
      meta-openembedded:
         layers:
            meta-filesystems:
            meta-networking:

would instruct kas to set MACHINE automatically and setup meta-filesystems and meta-networking if this configuration file is used.