[yocto] Installing a package on the board at runtime

Andrea Galbusera gizero at gmail.com
Fri Apr 27 07:47:11 PDT 2018


Hi Alan,

On Fri, Apr 27, 2018 at 1:38 PM, Alan Martinovic
<alan.martinovic at senic.com> wrote:
> Hey,
> I know there is a method in devtool called devtool deploy-target.
> It's a great thing to install a package on the board at runtime.
>
> Is there something like that available without devtool?

The devtool deploy-target way of deploying recipes' artefacts is
mostly oriented to easing development loops with the eSDK. A more
controlled way of installing packages would be to have
package-management added to your IMAGE_FEATURES [1] to leverage a
fully fledged package manager on the target (like any mainstream
distro). You can choose among different format by setting the
PACKAGE_CLASSES configuration variable. Using a package manager on the
target won't differ from how you install/upgrade your desktop
distribution. The only extra step you'll need to accomplish is setting
up a proper package feed to let your targets grab the packages from
your build/deploy/<package_format> dir. See the manual at [2] for more
details.

Also, devtool works at a recipe scope, not at package level. You can
imagine it as a sort of 'make install' that leverages ssh to work
update the target filesystem. Recipes can provide more than one
package, then only a proper package manager will let you select any of
the packages a recipe provides for installation/upgrade.

> A digression:
> Am asking for a non devtool option because it
> seems like devtool is ignoring the patch and config files
> the recipe depends on (can't find any in workspace/sources).

This shouldn't be the case. When using 'devtool modify'
workspace/sources/<your-recipe> gets populated with a git repository
which includes a 'devtool' branch which includes any patch the recipe
declare in its SRC_URI. Those patches are already applied to the
fetched sources in the form of git commits on the 'devtool' branch
[3].

> My particular recipe has a custom build step that
> depends on rendering config file templates (which fails due to missing
> not finding the config file).

This might be due to errors in setting up the extra task: difficult to
say without looking at how the custom step is defined. Maybe you can
share your recipe together with the error logs bitbake is reporting.

[1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-features-image
[2] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#runtime-package-management-server
[3] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#devtool-modifying-a-recipe



More information about the yocto mailing list