yocto 配方中 class-target 和 class-native 的区别
Difference between class-target and class-native in yocto recipe
我正在尝试了解 Yocto 食谱。
以下是 Yocto 食谱中的一行:
DEPENDS_append_class-target = " grub-efi-native"
我理解的是这个食谱依赖于包 "grub-efi-native",我想理解的是 class-目标字段。
手册中存在两个变量 class-target 和 class-native。
这是 Yocto 手册中的声明。
Inside the recipe, use _class-native and _class-target overrides to specify any functionality specific to the respective native or target case.
任何人都可以解释上面的语句是什么意思..这是否意味着它取决于目标二进制文件而不是主机二进制文件
Bitbake 可以使用相同的配方为目标或本机构建主机构建配方。这是通过在配方中加入 BBCLASSEXTEND = "native"
来实现的。这将使您能够使用 -native 来引用本机构建主机的配方构建。
但有时您想要构建该配方的方式会有所不同,具体取决于您是为目标构建还是为宿主构建,此时可以使用 _class-target 或 _class-native。
因此在您的示例中,DEPENDS_append_class-target = " grub-efi-native"
行意味着在为目标构建此配方时,DEPENDS 还将包括 grub-efi-native
。
我正在尝试了解 Yocto 食谱。
以下是 Yocto 食谱中的一行:
DEPENDS_append_class-target = " grub-efi-native"
我理解的是这个食谱依赖于包 "grub-efi-native",我想理解的是 class-目标字段。
手册中存在两个变量 class-target 和 class-native。
这是 Yocto 手册中的声明。
Inside the recipe, use _class-native and _class-target overrides to specify any functionality specific to the respective native or target case.
任何人都可以解释上面的语句是什么意思..这是否意味着它取决于目标二进制文件而不是主机二进制文件
Bitbake 可以使用相同的配方为目标或本机构建主机构建配方。这是通过在配方中加入 BBCLASSEXTEND = "native"
来实现的。这将使您能够使用 -native 来引用本机构建主机的配方构建。
但有时您想要构建该配方的方式会有所不同,具体取决于您是为目标构建还是为宿主构建,此时可以使用 _class-target 或 _class-native。
因此在您的示例中,DEPENDS_append_class-target = " grub-efi-native"
行意味着在为目标构建此配方时,DEPENDS 还将包括 grub-efi-native
。