[yocto] Working on Dependent Recipes in eSDK

Aaron_Wright at selinc.com Aaron_Wright at selinc.com
Thu Oct 18 13:59:11 PDT 2018


> Paul Eggleton <paul.eggleton at linux.intel.com> wrote on 10/18/2018 
12:30:07 PM:
>
> I think we would *like* this to be possible, from what I can tell I 
think the 
> issue is that the copies of the library in the sysroots of other 
dependent 
> recipes aren't being updated. The eSDK (and devtool) were originally 
written 
> when there weren't recipe-specific sysroots, and this stuff was a bit 
simpler.
> 
> Moving back to the full build system won't automatically fix this, 
though it 
> does make workarounds possible - you'd need to rebuild the dependent 
recipes 
> to get their sysroots updated.
> 
> Cheers,
> Paul
> ... snip ...

I put together a devtool plugin to almost do what I want:

> from devtool import exec_build_env_command, DevtoolError
> 
> def sdk_sysroot(args, config, basepath, workspace):
>     """Entry point for the devtool sdk-sysroot command"""
> 
>     try:
>         exec_build_env_command(config.init_path, basepath, 'bitbake 
build-sysroots', watch=True)
>     except bb.process.ExecutionError as e:
>         raise DevtoolError('Failed to bitbake build-sysroots:\n%s' % 
(str(e)))
> 
> def register_commands(subparsers, context):
>     """Register devtool subcommands from the sdk plugin"""
>     if context.fixed_setup:
>         parser_sdk_sysroot = subparsers.add_parser(
>             'sdk-sysroot',
>             help='Update the SDK sysroot',
>             description='Updates the SDK sysroot so that changes made to 
recipes in the workspace will be available,',
>             group='sdk')
>         parser_sdk_sysroot.set_defaults(func=sdk_sysroot)

This allows me to "devtool modify <DEPENDENT_RECIPE>", edit the code, 
"devtool build <DEPENDENT_RECIPE>", "devtool sdk-sysroot", and use the new 
code from the dependent recipe immediately.

This makes me wonder if "bitbake build-sysroots" should not be a part of 
"devtool build", like it is for "devtool sdk-install" (where I stole it 
from).


More information about the yocto mailing list