Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between class-target and class-native in yocto recipe

I am trying to understand Yocto Recipes.

Following is one of the line from a Yocto Recipe:

DEPENDS_append_class-target = " grub-efi-native"

What I understood is this recipe depends on package "grub-efi-native", what I am trying to understand is class-target field.

There are two variables which are present in the manual class-target and class-native.

This is the statement from the Yocto Manual.

Inside the recipe, use _class-native and _class-target overrides to specify any functionality specific to the respective native or target case.

Can anyone explain what the above statement means.. Does it mean that it depends on the target binary and not host binary

like image 836
md.jamal Avatar asked Apr 05 '18 06:04

md.jamal


1 Answers

Bitbake can use the same recipe to build a recipe for either the target, or the native build host. This is enabled by having BBCLASSEXTEND = "native" in the recipe. This will enable you to use -native to refer to a build of the recipe for the native build host.

But sometimes there's a difference in how you want to build that recipe depending on if you're building for the target or the host, this is when _class-target or _class-native can be used.

So in your example the DEPENDS_append_class-target = " grub-efi-native" line means that when building this recipe for the target, DEPENDS will also include grub-efi-native.

like image 138
Erik Botö Avatar answered Sep 22 '22 12:09

Erik Botö