[yocto] devtool modify both target and native recipe
Ola x Nilsson
ola.x.nilsson at axis.com
Tue Sep 24 03:09:45 PDT 2019
On Tue, Sep 17 2019, Josias Inacio da Silva Filho wrote:
> I have a recipe that supports building both native and target, however I noticed only one can be modified at a time.
>
> If I try doing:
> $ devtool modify myrecipe path_x
> $ devtool modify myrecipe-native path_x
>
> It complains saying I can only modify one variant at a time.
>
> The way to get around this issue was to go into build/workspace/appends/myrecipe and change this line:
>
> EXTERNALSRC_pn-myrecipe = path_x
>
> To this:
> EXTERNALSRC = path_x
>
> But I wanted to have a proper solution for this. I also saw this comment in the file:
> # NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND
Add a line for the native variant so you get:
EXTERNALSRC_pn-myrecipe = path_x
EXTERNALSRC_pn-myrecipe-native = path_x
Note that this will only work if S != B in your recipe, otherwise you
will probably end up with a mishmash of object files of different
architectures.
If you do use different checkouts
EXTERNALSRC_pn-myrecipe = path_x
EXTERNALSRC_pn-myrecipe-native = path_y
will work for S==B, but then you will have to extract the sources some
other way. devtool extract may work here, but I have not tested myself.
--
Ola x Nilsson
More information about the yocto
mailing list