以下の内容はhttps://mickey-happygolucky.hatenablog.com/entry/2025/12/04/085041より取得しました。


YoctoProject bitbake-setupのGeneric Configuration

はじめに

以下の続き

bitbake-setupが参照するGeneric Configurationの内容を調べる。

Generic Configuration

Setupを作成するために参照されるファイルで、JSON形式で記述されている。 bitbake-setup initはGeneric Configurationを元にプロンプトを表示している。

bitbake-setup initはRegistoryから.conf.jsonの拡張子のファイルを探し設定を開始する。

bitbakeリポジトリではdefault-registoryに、デフォルトで使用可能なGeneric Configurationを提供している。

基本構造

Generic Configurationは以下の要素から構築されている。

以下にトップレベルの内容を抜粋する。

{
    "description": "Poky - The Yocto Project testing distribution",
    "expires": "2026-05-31",
    "sources": {
        ...
    },
    "bitbake-setup": {
        ...
    },
    "version": "1.0"
}

構成している要素を以下に示す。

要素 概要 必須
description コンフィグレーションの概要 o
expires 有効期限(YYYY-MM-DDTHH:MM:SS) x
sources Fetch対象のGitリポジトリ x
bitbake-setup コンフィグレーションのリスト o
version バージョン o

以下のような構造になる。

sources

ダウンロードしてくるデータのGitリポジトリを指定する。

{
   "sources": {
       "bitbake": {
           "git-remote": {
               "remotes": {
                   "origin": {
                       "uri": "https://git.openembedded.org/bitbake"
                   }
               },
               "branch": "master",
               "rev": "master"
           },
           "path": "bitbake"
       }
   }
}

構成している要素を以下に示す。

要素 概要 必須
uri git形式のURI o
rev チェックアウト対象のリビジョン o
branch チェックアウト対象のブランチ o
path ダウンロード先のディレクト x

revにブランチ名を指定した場合、そのブランチの最新を取得する。また、bitbake-setup updateしたタイミングで取得済みのソースが更新される。

以下のような構造になる。

bitbake-setup

Setupを作成するためにメインで参照される要素。bitbake-setupはこの設定を元にプロンプトを表示する。 1つ以上のconfigurationsの要素から構成される。configurationsは必要に応じて再帰的にネストすることができる。

以下はpoky-master.conf.jsonの例。

{
    "bitbake-setup": {
        "configurations": [
        {
            "bb-layers": ["openembedded-core/meta","meta-yocto/meta-yocto-bsp","meta-yocto/meta-poky"],
            "setup-dir-name": "$distro-master",
            "oe-fragments-one-of": {
                "machine": {
                    "description": "Target machines",
                    "options" : ["machine/qemux86-64", "machine/qemuarm64", "machine/qemuriscv64", "machine/genericarm64", "machine/genericx86-64"]
                },
                "distro": {
                    "description": "Distribution configuration variants",
                    "options" : ["distro/poky", "distro/poky-altcfg", "distro/poky-tiny"]
                }
            },
            "configurations": [
            {
                "name": "poky",
                "description": "Poky - The Yocto Project testing distribution"
            },
            {
                "name": "poky-with-sstate",
                "description": "Poky - The Yocto Project testing distribution with internet sstate acceleration. Use with caution as it requires a completely robust local network with sufficient bandwidth.",
                "oe-fragments": ["core/yocto/sstate-mirror-cdn"]
            }
            ]
        }
        ]
    },
}

各configurationを構成している要素を以下に示す。(抜粋)

要素 概要 必須
name コンフィグレーションの名前 o
description コンフィグレーションの概要 o
configurations ネストされたconfigurations x
bb-layers bblayers.confに追加されるレイヤのリスト x
setup-dir-name Setupディレクトリ名の提案 x
oe-fragments-one-of 選択可能なOE_FRAGMENTSのリスト x
oe-fragments OE_FRAGMENTS x

bb-layersの値は、各Setupのlayersディレクトリからの相対パスを指定する。

以下のような構造になる。

まとめ

Generic ConfigurationのJSONファイルの構造を調べた。

  • sourcesは取得するレイヤなどのリポジトリの情報
  • configurationsはプロンプトを表示するための情報
    • OE_FRAGMETNSやbblayers.confの値が決定される

要素の完全なリストはマニュアルを参照のこと。




以上の内容はhttps://mickey-happygolucky.hatenablog.com/entry/2025/12/04/085041より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14