# Deploy update modules using yocto

**URL:** <https://hub.mender.io/t/deploy-update-modules-using-yocto/815>\
**Category:** General Discussions\
**Tags:** yocto, update-modules\
**Created:** [July 11, 2019, 7:12am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815 "2019-07-11T07:12:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [July 11, 2019, 7:12am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/1 "2019-07-11T07:12:31Z")

</div>

Is there an easy way to include update modules in my yocto-based image?

For state scripts there’s the mender-state-scripts class one can inherit from. I’m hoping something similar exists.

Thanks for the help and the great product!

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 11, 2019, 8:11am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/2 "2019-07-11T08:11:57Z")

</div>

Hi @mterwoord,

You mean just installing the Update Modules on the client? Or would you like to generate Update Module Artifacts during a Yocto build as well?

You can make sure the Update Modules are installed by providing the following packageconfig as is done in meta-mender-demo,

[https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-demo/recipes-mender/mender/mender\_%.bbappend#L9](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-demo/recipes-mender/mender/mender_%25.bbappend#L9)

We do not have any classes to generate the actual Update Module artifacts, this is very depended on what Update Module you are using and hard to create generic solutions.

I have started on writing something for the [dir-overlay](https://hub.mender.io/t/directory-overlay/529) module, this can work as inspiration.

> <https://github.com/mirzak/meta-mender-community-1/commit/1f15abe7e7d9a763ef0212a58d525450b78e5ebe>

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [July 11, 2019, 8:34am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/3 "2019-07-11T08:34:19Z")

</div>

Yes, I mean installing the modules on the client.

I can’t find how to get a module installed.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 11, 2019, 8:36am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/4 "2019-07-11T08:36:24Z")

</div>

This is how, this will install all the modules that are available in the [mender client source](https://github.com/mendersoftware/mender/tree/master/support/modules)

> <https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-demo/recipes-mender/mender/mender_%25.bbappend#L9>

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [July 11, 2019, 8:36am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/5 "2019-07-11T08:36:59Z")

</div>

but where are those modules then defined?

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 11, 2019, 8:39am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/6 "2019-07-11T08:39:13Z")

</div>

I will result in calling this,

> <https://github.com/mendersoftware/mender/blob/master/Makefile#L95-L97>

> <https://github.com/mendersoftware/mender/blob/master/Makefile#L53-L59>

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [July 11, 2019, 8:42am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/7 "2019-07-11T08:42:14Z")

</div>

Cool. I searched around using github search, but install-modules didn’t show up there.  
How can I add extra modules? I have a variant of the directory module, which stops/starts a systemd service.

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [July 11, 2019, 8:43am UTC](https://hub.mender.io/t/deploy-update-modules-using-yocto/815/8 "2019-07-11T08:43:56Z")

</div>

You could create a custom recipe, and make sure to install it to `/usr/share//mender/modules/v3/`, or add it to the `mender_%.bbappend`
