This service is available only in Japanese-language.

machineの定義の仕方について

お世話になっております。

VirtualBox向けのイメージをyoctoで生成しようとしています。
X86がターゲットなので、yoctoでサポートしている”genericx86”をMACHINEのコンフィグとして使いつつ、
自社の独自パラメータ(IMAGE_FSTYPES += "vmdk"など)をMACHINEファイルに記述したく、以下のような記述を行ってイメージの作成を試みています。

<ベース>
Morty-16.0.4

<追記>
・meta-hogehoge(自社レイヤー)を作成(bblayerに追加)
・meta-hogehoge/conf/machine/hogehoge.confを作成
・hogehoge.confで以下のような記述
--
include conf/machine/genericx86.conf # meta-yocto-bsp/conf/machine/genericx86.confを使うつもり
~~ 自社のパラメータ群 ~~
--

<作成手順>
・oe-init-build-env hogehogeでbuild-hogehogeを生成
・build-hogehoge/conf/local.confでMACHINE ?= "hogehoge"を宣言
・bitbake core-image-minimalを実行

上記のような手順を行うと、以下のようなエラーが出ます。
ERROR: Nothing PROVIDES 'virtual/kernel'
ERROR: linux-yocto-tiny PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-rt PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-rt PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-rt PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-dev PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-tiny PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-tiny PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: linux-dummy PROVIDES virtual/kernel but was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-dummy
ERROR: linux-yocto PROVIDES virtual/kernel but was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'virtual/kernel']

Local.confでMACHINE ?= "genericx86"を宣言してイメージを作成する場合は上記のようなエラーが出ないので、
Machineにgenericx86を宣言する場合と、自作のものを宣言する場合で作法が違うと考えています。

これに関してアドバイスなど頂けないでしょうか?
よろしくお願いいたします。

linux-yocto関連のカーネルのレシピでは、COMPATIBLE_MACHINE 変数に COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm|qemuarmv5" といった記述があります。
追加レイヤー内での記述場所については要調査ですが、local.conf 内で COMPATIBLE_MACHINE += "hogehoge" と
新規に作成したマシンを追記することで、エラーは発生しなくなるかと。

コメントありがとうございます。
COMPATIBLE_MACHINEにhogehoge追加して、再度実行したところ、
以下のエラーに変わりました。

ERROR: Nothing PROVIDES 'core-image-minimal'
ERROR: core-image-minimal was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)

Core-image-minimalをbitbakeで指定して実行する際にCOMPATIBLE_MACHINEが参照できていない、ということでしょうか?
コメントいただけると幸いです。

vmdkを追加したことで依存するパッケージsyslinux等でMACHINEに依存する記述があり、当該マシンが含まれない場合は構築不可となっていたためのようです。
MACHINEOVERRIDES 変数に、ベースとした定義済みのマシン名を記載することで構築可能となります。
MACHINEOVERRIDES =. "genericx86:"
上記1行をhogehoge.conf に記載することで良いかと。

返信ありがとうございます。

Meta-hogehoge/conf/machine/hogehoge.confにMACHINEOVERRIDES =. "genericx86:"を追記して実行してみました。
結果、私の環境では依然と変わらないエラーが出ています。
ERROR: Nothing PROVIDES 'core-image-minimal'
ERROR: core-image-minimal was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)

続いて以下を試しました。
・コメント内で、「vmdkを追加したことで」と記載があったので、IMAGE_FSTYPES += "vmdk"を消して、
COMPATIBLE_MACHINEを追記した状態でbitbake実行
-> エラー
ERROR: Nothing PROVIDES 'core-image-minimal'
ERROR: core-image-minimal was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)

・上記の状態にMACHINEOVERRIDES =. "genericx86:"を追加して実行(この確認はあまり意味ないと思いますが)
-> エラー
ERROR: Nothing PROVIDES 'core-image-minimal'
ERROR: core-image-minimal was skipped: incompatible with machine hogehoge (not in COMPATIBLE_MACHINE)

という結果です。
回答者様の環境でbuildが通っているとなると、私の構築環境に依存している可能性が高いと思うのですが、
確認したほうがよさそうな場所あればご教授いただきたいです。

コメントありがとうございます。

すみません、話の流れからてっきり、
COMPATIBLE_MACHINEとMACHINEOVERRISESを両方定義するもんだと思っていたのですが、
MACHINEOVERRIDESの定義だけ追加する(MACHINE_COMPATIBLEは追加しない)を実施したところ、
所望のイメージのbuildが通りました。

アドバイスいただき大変助かりました。ありがとうございます。
また質問させていただくこともあるかと思いますが、
その際も何卒よろしくお願いいたします。