Closed SimonSimCity closed 1 year ago
To stay in the spirit of yocto and keep things separated, I added a new target to build against. You can then place everything that belongs to device update into this target. This has the benefit, that you can still build your base target without having to modify your local.conf.
require recipes-config/images/your-base-image
DESCRIPTION = ""
LICENSE = ""
CORE_IMAGE_EXTRA_INSTALL += " \
azure-device-update \
adu-agent-service \
"
@Voxel07 Thanks for the hint - I only mentioned azure-device-update
as dependency in my code, updated now to adu-agent-service
which includes the former and adds a daemonized service.
For everyone bumping in here: I created a repository containing a branch for each version of yocto I got the meta-layer running on. Some of them, like the zeus
one also contain some useful additions and bugfixes: https://github.com/munit-solutions/meta-azure-device-update/tree/zeus
Hi @SimonSimCity, we currently support honister and have our latest Yocto layers published here: https://github.com/Azure/iot-hub-device-update-yocto
Since I couldn't find any information about it, I wanted to share how I updated the meta-layer of this repo from
warrior
tozeus
. I can verify these commands by running them in a fresh docker-container only having a couple of modules installed. If you don't have such an image yet, https://github.com/crops/yocto-dockerfiles/tree/master/dockerfiles might be a good starting point.For this purpose, I assume you are starting off with a fresh project. Create a new folder and run the following commands. They will lead you into the meta-layer where we have to run more commands as follows.
Download the meta-layer from https://github.com/Azure/iot-hub-device-update/releases/download/0.7.0/meta-azure-device-update.1.zip and extract the files:
Before we come to the zeus-warrior related changes, there are a couple of git-related settings you have to change so the recipes are pointing to existing git repositories and branches:
Now to the changes needed to get it to build on
zeus
:After updating the meta-files, you go one level up, initialize the yocto-build-env and add the layers by running these commands:
I added the following settings to the
build/conf/local.conf
:The files referenced in the last two lines are needed for swupdate and can be generated by using the following command:
Now you should be able to build by running
bitbake core-image-base
🎉Hope this is helpful to someone. In case anything of what I did was stupid, please tell me! I'm not yet very familiar with yocto but open for improvements, which I'll update right away.
It would also be nice if @microsoftopensource would put this into a separate repository so the community can at least add patches for the individual yocto-releases - even though there aren't any plans to do so yet (https://github.com/Azure/iot-hub-device-update/issues/56#issuecomment-836327243).